kubernetes

package
v0.0.50-alpha.76 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2025 License: Apache-2.0 Imports: 17 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) DelData

func (k *KubernetesConnManager) DelData(ctx context.Context, key string) error

func (*KubernetesConnManager) GetConn

func (k *KubernetesConnManager) GetConn(ctx context.Context, serviceName string, opts ...grpc.DialOption) (grpc.ClientConnInterface, 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.ClientConnInterface, error)

GetConns returns gRPC client connections for a given Kubernetes service name.

func (*KubernetesConnManager) GetKey

func (k *KubernetesConnManager) GetKey(ctx context.Context, key string) ([]byte, error)

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) IsSelfNode

func (*KubernetesConnManager) Register

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

func (*KubernetesConnManager) SetKey

func (k *KubernetesConnManager) SetKey(ctx context.Context, key string, data []byte) error

func (*KubernetesConnManager) UnRegister

func (k *KubernetesConnManager) UnRegister() error

func (*KubernetesConnManager) WatchKey

Jump to

Keyboard shortcuts

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