Documentation ¶
Index ¶
- type KubernetesConnManager
- func (k *KubernetesConnManager) AddOption(opts ...grpc.DialOption)
- func (k *KubernetesConnManager) Close()
- func (k *KubernetesConnManager) CloseConn(conn *grpc.ClientConn)
- func (k *KubernetesConnManager) GetConn(ctx context.Context, serviceName string, opts ...grpc.DialOption) (*grpc.ClientConn, error)
- func (k *KubernetesConnManager) GetConns(ctx context.Context, serviceName string, opts ...grpc.DialOption) ([]*grpc.ClientConn, error)
- func (k *KubernetesConnManager) GetSelfConnTarget() string
- func (k *KubernetesConnManager) GetUserIdHashGatewayHost(ctx context.Context, userId string) (string, error)
- func (k *KubernetesConnManager) Register(serviceName, host string, port int, opts ...grpc.DialOption) error
- func (k *KubernetesConnManager) UnRegister() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type KubernetesConnManager ¶
type KubernetesConnManager struct {
// contains filtered or unexported fields
}
func NewKubernetesConnManager ¶
func NewKubernetesConnManager(namespace string, options ...grpc.DialOption) (*KubernetesConnManager, error)
NewKubernetesConnManager creates a new connection manager that uses Kubernetes services for service discovery.
func (*KubernetesConnManager) AddOption ¶
func (k *KubernetesConnManager) AddOption(opts ...grpc.DialOption)
AddOption appends gRPC dial options to the existing options.
func (*KubernetesConnManager) Close ¶
func (k *KubernetesConnManager) Close()
Close closes all gRPC connections managed by KubernetesConnManager.
func (*KubernetesConnManager) CloseConn ¶
func (k *KubernetesConnManager) CloseConn(conn *grpc.ClientConn)
CloseConn closes a given gRPC client connection.
func (*KubernetesConnManager) GetConn ¶
func (k *KubernetesConnManager) GetConn(ctx context.Context, serviceName string, opts ...grpc.DialOption) (*grpc.ClientConn, error)
GetConn returns a single gRPC client connection for a given Kubernetes service name.
func (*KubernetesConnManager) GetConns ¶
func (k *KubernetesConnManager) GetConns(ctx context.Context, serviceName string, opts ...grpc.DialOption) ([]*grpc.ClientConn, error)
GetConns returns gRPC client connections for a given Kubernetes service name.
func (*KubernetesConnManager) GetSelfConnTarget ¶
func (k *KubernetesConnManager) GetSelfConnTarget() string
GetSelfConnTarget returns the connection target for the current service.
func (*KubernetesConnManager) GetUserIdHashGatewayHost ¶
func (*KubernetesConnManager) Register ¶
func (k *KubernetesConnManager) Register(serviceName, host string, port int, opts ...grpc.DialOption) error
func (*KubernetesConnManager) UnRegister ¶
func (k *KubernetesConnManager) UnRegister() error
Click to show internal directories.
Click to hide internal directories.