kubernetes

package
v0.0.49-alpha.55.7 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2025 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GRPCName = "grpc"
)

Variables

This section is empty.

Functions

func NewConnManager

func NewConnManager(namespace string, watchNames []string, options ...grpc.DialOption) (discovery.SvcDiscoveryRegistry, error)

NewConnManager creates a new connection manager that uses Kubernetes services for service discovery.

Types

type ConnManager

type ConnManager struct {
	// contains filtered or unexported fields
}

func (*ConnManager) AddOption

func (k *ConnManager) AddOption(opts ...grpc.DialOption)

AddOption appends gRPC dial options to the existing options.

func (*ConnManager) Close

func (k *ConnManager) Close()

Close closes all gRPC connections managed by ConnManager.

func (*ConnManager) GetConn

func (k *ConnManager) 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 (*ConnManager) GetConns

func (k *ConnManager) GetConns(ctx context.Context, serviceName string, opts ...grpc.DialOption) ([]*grpc.ClientConn, error)

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

func (*ConnManager) GetSelfConnTarget

func (k *ConnManager) GetSelfConnTarget() string

GetSelfConnTarget returns the connection target for the current service.

func (*ConnManager) GetUserIdHashGatewayHost

func (k *ConnManager) GetUserIdHashGatewayHost(ctx context.Context, userId string) (string, error)

func (*ConnManager) IsSelfNode

func (k *ConnManager) IsSelfNode(cc grpc.ClientConnInterface) bool

func (*ConnManager) Register

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

func (*ConnManager) UnRegister

func (k *ConnManager) UnRegister() error

Jump to

Keyboard shortcuts

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