diff --git a/libs/grpc/clients/watched.go b/libs/grpc/clients/watched.go deleted file mode 100644 index d49a4de37..000000000 --- a/libs/grpc/clients/watched.go +++ /dev/null @@ -1,28 +0,0 @@ -package clients - -import ( - "fmt" - "log" - - "github.com/satont/twir/libs/grpc/generated/watched" - "github.com/satont/twir/libs/grpc/servers" - "google.golang.org/grpc" - "google.golang.org/grpc/balancer/roundrobin" - "google.golang.org/grpc/credentials/insecure" -) - -func NewWatched(env string) watched.WatchedClient { - serverAddress := createClientAddr(env, "watched", servers.WATCHED_SERVER_PORT) - - conn, err := grpc.Dial( - serverAddress, - grpc.WithTransportCredentials(insecure.NewCredentials()), - grpc.WithDefaultServiceConfig(fmt.Sprintf(`{"loadBalancingConfig": [{"%s":{}}]}`, roundrobin.Name)), - ) - if err != nil { - log.Fatalf("did not connect: %v", err) - } - c := watched.NewWatchedClient(conn) - - return c -} diff --git a/libs/grpc/clients/watched.ts b/libs/grpc/clients/watched.ts deleted file mode 100644 index 1adeef4a9..000000000 --- a/libs/grpc/clients/watched.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { ChannelCredentials, createChannel, createClient } from 'nice-grpc'; - -import { WatchedClient, WatchedDefinition } from '../generated/watched/watched.js'; -import { PORTS } from '../servers/constants.js'; -import { CLIENT_OPTIONS, createClientAddr, waitReady } from './helper.js'; - -export const createWatched = async (env: string): Promise => { - const channel = createChannel( - createClientAddr(env, 'watched', PORTS.WATCHED_SERVER_PORT), - ChannelCredentials.createInsecure(), - CLIENT_OPTIONS, - ); - - await waitReady(channel); - - const client = createClient(WatchedDefinition, channel); - - return client as any; -};