gossipobserver

package
v0.0.0-...-102eb4e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 18, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GossipObserverUnit

type GossipObserverUnit struct {
	// contains filtered or unexported fields
}

func NewGossipObserver

func NewGossipObserver(config *PolicyObserverConfig) (*GossipObserverUnit, error)

func (*GossipObserverUnit) AddGossip

func (p *GossipObserverUnit) AddGossip(msg *pb.GossipMessage) error

Inserts the gossip message into the log of observed gossips

func (*GossipObserverUnit) GossipIsObserved

func (p *GossipObserverUnit) GossipIsObserved(msg *pb.GossipMessage) bool

Returns true if the gossip message has already been observed, returns false otherwise

func (*GossipObserverUnit) LatestGossip

func (p *GossipObserverUnit) LatestGossip() *pb.GossipMessageID

hacky af...

type PolicyObserverConfig

type PolicyObserverConfig struct {
	// Output directory of the logfiles
	OutputDirectory string

	// The prefix used on the logfile names
	LogfilePrefix string

	// The capacity of the in-memory queue. When the capacity is reached, the
	// least recently element is evicted from the queue.
	Capacity int
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL