Versions in this module Expand all Collapse all v0 v0.33.29 Nov 27, 2026 Changes in this version + var ErrInvalidConfig = errors.New("invalid configuration") + var ErrInvalidOptions = errors.New("invalid connection options") + func Connect(options *ConnectionOptions) (*grpc.ClientConn, error) + func NewConnection(opts ...ConnectionOption) (*grpc.ClientConn, error) + type Config struct + APIKey string + Address string + CACertPath string + ClientCertPath string + ClientKeyPath string + Headers map[string]string + Insecure bool + NoProxy bool + NoTLS bool + Token string + func (cfg *Config) Connect(opts ...ConnectionOption) (*grpc.ClientConn, error) + func (cfg *Config) ToConnectionOptions() ([]ConnectionOption, error) + type ConnectionOption func(*ConnectionOptions) error + func WithAPIKeyAuth(key string) ConnectionOption + func WithAddr(addr string) ConnectionOption + func WithCACertPath(path string) ConnectionOption + func WithChainStreamInterceptor(mw ...grpc.StreamClientInterceptor) ConnectionOption + func WithChainUnaryInterceptor(mw ...grpc.UnaryClientInterceptor) ConnectionOption + func WithClientCert(certPath, keyPath string) ConnectionOption + func WithDialOptions(opts ...grpc.DialOption) ConnectionOption + func WithHeader(key, value string) ConnectionOption + func WithInsecure(insecure bool) ConnectionOption + func WithNoProxy(noProxy bool) ConnectionOption + func WithNoTLS(noTLS bool) ConnectionOption + func WithTokenAuth(token string) ConnectionOption + func WithURL(svcURL *url.URL) ConnectionOption + type ConnectionOptions struct + Creds credentials.PerRPCCredentials + DialOptions []grpc.DialOption + StreamClientInterceptors []grpc.StreamClientInterceptor + UnaryClientInterceptors []grpc.UnaryClientInterceptor + func NewConnectionOptions(opts ...ConnectionOption) (*ConnectionOptions, error) + func (o *ConnectionOptions) Apply(opts ...ConnectionOption) error + func (o *ConnectionOptions) ToDialOptions() ([]grpc.DialOption, error) + type TLSConfig struct + CA string + Cert string + Key string + func (c *TLSConfig) ClientConfig(skipVerify bool) (*tls.Config, error) + func (c *TLSConfig) ClientCredentials(skipVerify bool) (credentials.TransportCredentials, error) + func (c *TLSConfig) HasCA() bool + func (c *TLSConfig) HasCert() bool + func (c *TLSConfig) ServerConfig() (*tls.Config, error) + func (c *TLSConfig) ServerCredentials() (credentials.TransportCredentials, error)