discovery

package
v0.0.48 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: Apache-2.0 Imports: 2 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Conn

type Conn interface {
	GetConns(ctx context.Context, serviceName string, opts ...grpc.DialOption) ([]*grpc.ClientConn, error)
	GetConn(ctx context.Context, serviceName string, opts ...grpc.DialOption) (*grpc.ClientConn, error)
	GetSelfConnTarget() string
	AddOption(opts ...grpc.DialOption)
	CloseConn(conn *grpc.ClientConn)

	GetClientLocalConns() map[string][]*grpc.ClientConn //del

	GetUserIdHashGatewayHost(ctx context.Context, userId string) (string, error) //del
}

type SvcDiscoveryRegistry

type SvcDiscoveryRegistry interface {
	Conn
	Register(serviceName, host string, port int, opts ...grpc.DialOption) error
	UnRegister() error //del
	// CreateRpcRootNodes When an upstream node accesses a downstream RPC node,
	//it is imperative to call this method, such as from an API.
	//Failing to do so can cause the RPC node to be inaccessible and block until it is refreshed after 30 minutes.
	// This occurs because if the RPC node starts after the upstream node, the directory node in ZooKeeper needs to be created first.
	//Otherwise, when the RPC node starts, the upstream node will not receive the ZooKeeper EventNodeChildrenChanged event.
	CreateRpcRootNodes(serviceNames []string) error      //del
	RegisterConf2Registry(key string, conf []byte) error //del
	GetConfFromRegistry(key string) ([]byte, error)      //del
	Close()
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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