Before I connect to my Temporal cluster, I need to connect to the TLS server to get certificate then I could connect to the Temporal cluster. In go language, I could do like below:
If you need to pass custom serverName to SSL that is indeed different than your target you are connecting to you could register a custom ChannelInitializer via ServiceStubsOptions.Builder#setChannelInitializer
it takes a builder for the gRPC channel, and then can call io.grpc.ManagedChannelBuilder.overrideAuthority on this builder: