Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContainsString ¶ added in v0.4.0
ContainsString tells whether a contains x.
func MissingStrings ¶ added in v0.4.0
MissingStrings returns the disjunction between given slices: a - b.
Types ¶
type Buffer ¶ added in v0.4.0
type Buffer struct { Elements []Element `json:"elements"` Len int `json:"len"` Mux *sync.Mutex `json:"mux"` }
Buffer is the buffer with messages.
func (*Buffer) ElementsFromIDs ¶ added in v0.4.0
ElementsFromIDs returns a slice with elements from given IDs list.
func (*Buffer) IncrementGossipCount ¶ added in v0.4.0
func (buf *Buffer) IncrementGossipCount()
IncrementGossipCount increments gossip count for each elements from buffer.
type Element ¶ added in v0.4.0
type Element struct { ID string `json:"id"` Timestamp time.Time `json:"timestamp"` Msg interface{} `json:"msg"` CallbackType string `json:"callbackType"` GossipCount int64 `json:"gossipCount"` // number of rounds since the element is in buffer }
Element is an element from messages buffer.
func NewElement ¶ added in v0.4.0
NewElement creates new buffer element with given message and callback type.
Click to show internal directories.
Click to hide internal directories.