Documentation ¶
Index ¶
- type Message
- type Node
- func (n *Node) Addr() string
- func (n *Node) HttpAddr() string
- func (n *Node) Id() string
- func (n *Node) IdToAddr(id []byte) (string, error)
- func (n *Node) LiveMembers() []string
- func (n *Node) Messenger(ctx context.Context, args *pb.Msg) (*pb.MsgResponse, error)
- func (n *Node) OpenStream(dest string, input, reply chan []byte)
- func (n *Node) SaveCertificate() error
- func (n *Node) SavePrivateKey() error
- func (n *Node) SendMessage(dest string, ch chan *Message, data []byte)
- func (n *Node) SendMessages(dest []string, ch chan *Message, data []byte)
- func (n *Node) SendStream(ch chan<- []byte, data []byte)
- func (n *Node) SetExternalGossipContent(data []byte)
- func (n *Node) SetGossipHandler(newHandler processMsg)
- func (n *Node) SetMsgHandler(newHandler processMsg)
- func (n *Node) SetResponseHandler(newHandler func([]byte))
- func (n *Node) SetStreamHandler(newHandler streamMsg)
- func (n *Node) Sign(content []byte) ([]byte, []byte, error)
- func (n *Node) Spread(ctx context.Context, args *pb.State) (*pb.StateResponse, error)
- func (n *Node) Start()
- func (n *Node) Stop()
- func (n *Node) Stream(srv pb.Gossip_StreamServer) error
- func (n *Node) Verify(r, s, content []byte, id string) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Node ¶
type Node struct {
// contains filtered or unexported fields
}
func (*Node) LiveMembers ¶
func (*Node) OpenStream ¶
func (*Node) SaveCertificate ¶
func (*Node) SavePrivateKey ¶
func (*Node) SendMessages ¶
func (*Node) SendStream ¶
func (*Node) SetExternalGossipContent ¶
Exposed to let ifrit client set directly
func (*Node) SetGossipHandler ¶
func (n *Node) SetGossipHandler(newHandler processMsg)
Expose so that client can set new handler directly
func (*Node) SetMsgHandler ¶
func (n *Node) SetMsgHandler(newHandler processMsg)
Expose so that client can set new handler directly
func (*Node) SetResponseHandler ¶
Expose so that client can set new handler directly
func (*Node) SetStreamHandler ¶
func (n *Node) SetStreamHandler(newHandler streamMsg)
Expose so that client can set new handler directly
Source Files ¶
Click to show internal directories.
Click to hide internal directories.