Versions in this module Expand all Collapse all v0 v0.0.1 Nov 7, 2020 Changes in this version + func Broadcast(ctx context.Context, msg *pb.SyncMessage) error + func Send(ctx context.Context, msg *pb.SyncMessage) error + type Client struct + func Connect(address string, config *tls.Config) *Client + func (c *Client) GetMessage() (*pb.SyncMessage, error) + func (c *Client) Send(msgType string, name string, o interface{}) error + func (c *Client) SendMsg(msg *pb.SyncMessage) error + func (c *Client) SetConnectionSateHandler(h ConnectionStateHandler) + func (c *Client) Stop() error + type ConnectionStateHandler interface + ConnectionState func(active bool) + type ConnectionStateHandlerFunc func(bool) + func (f ConnectionStateHandlerFunc) ConnectionState(active bool) + type HandleMessageFunc func(msg *pb.SyncMessage) + type Handler interface + ClientQuit func(ctx context.Context, info *PeerInfo) + NewClient func(ctx context.Context, info *PeerInfo) + OnMessage func(ctx context.Context, msg *pb.SyncMessage) + type Hub struct + func Serve(l net.Listener, handler Handler) (*Hub, error) + func (s *Hub) Broadcast(ctx context.Context, msg *pb.SyncMessage) + func (s *Hub) Stop() error + func (s *Hub) Sync(stream pb.Nodes_SyncServer) error + type MessageHandler interface + Handle func(message *pb.SyncMessage) + type PeerInfo struct + Address string + ID string + func Peer(ctx context.Context) *PeerInfo + type Sender interface + Send func(message *pb.SyncMessage) error Other modules containing this package github.com/omecodes/zebou/v2