Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func StreamServerInterceptor ¶
func StreamServerInterceptor() grpc.StreamServerInterceptor
StreamServerInterceptor returns a new streaming server interceptor for service discovery.
func UnaryServerInterceptor ¶
func UnaryServerInterceptor() grpc.UnaryServerInterceptor
UnaryServerInterceptor returns a new unary server interceptor for service discovery.
Types ¶
type Discovery ¶
type Discovery interface {
// Return service unique ID and rpc address registered for the component.
RegisteredNode(component string) (int64, string)
// Register rpc address of the component node.
RegisterNode(component, rpcAddr string, rpcSvc []string, ttl time.Duration) (int64, error)
// Get rpc service nodes.
GetNodes(svc string) map[string]int
}
func ContextDiscovery ¶
Click to show internal directories.
Click to hide internal directories.