Documentation
¶
Index ¶
- func Serve(configs *ServerConfig) (pb2.Registry, error)
- type MsgClient
- func (m *MsgClient) Certificate(id string) ([]byte, error)
- func (m *MsgClient) ConnectionInfo(id string, protocol pb2.Protocol) (*pb2.ConnectionInfo, error)
- func (m *MsgClient) DeregisterEventHandler(id string)
- func (m *MsgClient) DeregisterService(id string, nodes ...string) error
- func (m *MsgClient) FirstOfType(t pb2.Type) (*pb2.Info, error)
- func (m *MsgClient) GetNode(id string, nodeID string) (*pb2.Node, error)
- func (m *MsgClient) GetOfType(t pb2.Type) ([]*pb2.Info, error)
- func (m *MsgClient) GetService(id string) (*pb2.Info, error)
- func (m *MsgClient) RegisterEventHandler(h pb2.EventHandler) string
- func (m *MsgClient) RegisterService(info *pb2.Info) error
- func (m *MsgClient) Stop() error
- type ServerConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type MsgClient ¶
type MsgClient struct {
// contains filtered or unexported fields
}
MsgClient is a zebou messaging based client client
func NewMSGClient ¶
NewMSGClient creates and initialize a discovery client based
func (*MsgClient) Certificate ¶
Certificate returns the PEM encoded certificate of the service info from local store that matches id
func (*MsgClient) ConnectionInfo ¶
ConnectionInfo finds the service frolm local store that matches id, and return the connection info of the node that implement the given transport protocol
func (*MsgClient) DeregisterEventHandler ¶
DeregisterEventHandler removes the event handler that match id
func (*MsgClient) DeregisterService ¶
DeregisterService sends a deregister message to the discovery server
func (*MsgClient) FirstOfType ¶
FirstOfType returns the first service from local store of type t
func (*MsgClient) GetNode ¶
GetNode returns the gRPC node of the service info from local store that matches id
func (*MsgClient) GetService ¶
GetService returns service info from local store that matches id
func (*MsgClient) RegisterEventHandler ¶
func (m *MsgClient) RegisterEventHandler(h pb2.EventHandler) string
RegisterEventHandler adds an event handler. Returns an id that is used to deregister h
func (*MsgClient) RegisterService ¶
RegisterService sends register message to the discovery server