kubernetes

package
v3.8.1-rc.4 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2024 License: Apache-2.0 Imports: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewK8sDiscoveryRegister

func NewK8sDiscoveryRegister(gatewayName string) (discovery.SvcDiscoveryRegistry, error)

Types

type K8sDR

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

K8sDR represents the Kubernetes service discovery and registration client.

func (*K8sDR) AddOption

func (cli *K8sDR) AddOption(opts ...grpc.DialOption)

func (*K8sDR) Close

func (cli *K8sDR) Close()

func (*K8sDR) CloseConn

func (cli *K8sDR) CloseConn(conn *grpc.ClientConn)

func (*K8sDR) CreateRpcRootNodes

func (cli *K8sDR) CreateRpcRootNodes(serviceNames []string) error

func (*K8sDR) GetClientLocalConns

func (cli *K8sDR) GetClientLocalConns() map[string][]*grpc.ClientConn

do not use this method for call rpc.

func (*K8sDR) GetConfFromRegistry

func (cli *K8sDR) GetConfFromRegistry(key string) ([]byte, error)

func (*K8sDR) GetConn

func (cli *K8sDR) GetConn(ctx context.Context, serviceName string, opts ...grpc.DialOption) (*grpc.ClientConn, error)

func (*K8sDR) GetConns

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

GetConns returns the gRPC client connections to the specified service.

func (*K8sDR) GetSelfConnTarget

func (cli *K8sDR) GetSelfConnTarget() string

func (*K8sDR) GetUserIdHashGatewayHost added in v3.5.0

func (cli *K8sDR) GetUserIdHashGatewayHost(ctx context.Context, userId string) (string, error)

func (*K8sDR) Register

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

func (*K8sDR) RegisterConf2Registry

func (cli *K8sDR) RegisterConf2Registry(key string, conf []byte) error

func (*K8sDR) UnRegister

func (cli *K8sDR) UnRegister() error

Jump to

Keyboard shortcuts

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