in api/v1/client/client.go [14:30]
func NewClient(remoteAddr string, options interceptor.ClientInterceptorLogOptions) (pb.OperationContainerClient, error) {
conn, err := grpc.Dial(
remoteAddr,
grpc.WithTransportCredentials(insecure.NewCredentials()),
grpc.WithChainUnaryInterceptor(
interceptor.DefaultClientInterceptors(options)...,
),
)
if err != nil {
// logging for transparency, error handled by retry interceptor
log.Error("did not connect: " + err.Error())
}
return pb.NewOperationContainerClient(conn), err
// TODO: Figure out how to close the connection when the program exits.
// defer conn.Close()
}