Client deals with TLS connections to the discovery server
type Client struct { TLSCertHash []byte *comm.GRPCClient }
func NewClient(conf Config) (*Client, error)
NewClient creates a new comm client out of the given configuration
func (c *Client) NewDialer(endpoint string) func() (*grpc.ClientConn, error)
NewDialer creates a new dialer from the given endpoint
Config defines configuration of a Client
type Config struct { CertPath string KeyPath string PeerCACertPath string Timeout time.Duration }
func (conf Config) ToSecureOptions(newSelfSignedTLSCert genTLSCertFunc) (*comm.SecureOptions, error)
ToSecureOptions converts this Config to SecureOptions. The given function generates a self signed client TLS certificate if the TLS certificate and key aren't present at the config