Documentation ¶
Index ¶
Constants ¶
View Source
const ( // NOCALLBACK is callback type for messages without callback NOCALLBACK = callback.NOCALLBACK )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Bmmc ¶ added in v0.1.2
type Bmmc struct {
// contains filtered or unexported fields
}
Bmmc is the protocol
func (*Bmmc) AddMessage ¶ added in v0.1.2
AddMessage adds new message in messages buffer.
func (*Bmmc) GetMessages ¶ added in v0.1.2
func (b *Bmmc) GetMessages() []interface{}
GetMessages returns a slice with all messages from messages buffer
func (*Bmmc) RemovePeer ¶ added in v0.1.6
RemovePeer removes given peer from peers buffer
type Config ¶
type Config struct { // Addr is HTTP address for node which runs gossip and http servers // Required Addr string // Port is HTTP port for node which runs gossip and http servers // Required Port string // Beta is the expected fanout for gossip rounds // Optional Beta float64 // Logger // Optional Logger *log.Logger // Callbacks funtions // Optional Callbacks map[string]func(interface{}, *log.Logger) error // Gossip round duration // Optional RoundDuration time.Duration }
Config is the config for the protocol
Click to show internal directories.
Click to hide internal directories.