kubernetes

package
v0.0.50-alpha.35 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 23, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

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 (k *KubernetesConnManager) GetUserIdHashGatewayHost(ctx context.Context, userId string) (string, error)

func (*KubernetesConnManager) Register

func (k *KubernetesConnManager) Register(serviceName, host string, port int, opts ...grpc.DialOption) error

func (*KubernetesConnManager) UnRegister

func (k *KubernetesConnManager) UnRegister() error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL