gossip

package module
v0.0.0-...-d7b0689 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2023 License: Apache-2.0 Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRumor

func NewRumor(rumorId uuid.UUID, expiry time.Time, creatorAccountId common.AccountId, creatorAddr common.Address) rumor

Types

type Gossip

type Gossip interface {
	AddToGossip(rumor Rumor)
	GossipLoop(clientCache client.GrapevineClientCache)
	AddServer(addr common.Address)
	GetMongers() []common.Address
}

func NewGossip

func NewGossip(ctx common.CallCtx, self common.Address) Gossip

type GossipMongers

type GossipMongers interface {
	AddMonger(addr common.Address)
	RemoveMonger(addr common.Address)
	GetRandomServerAddress() *common.Address
	GetMongers() []common.Address
}

func NewGossipMongers

func NewGossipMongers(ctx common.CallCtx, self common.Address) GossipMongers

type Rumor

type Rumor interface {
	GetRumorId() uuid.UUID
	GetExpiry() time.Time
	GetCreator() common.Contact
	IsExpired() bool
	ToProtobuf() *proto.Gossip
	String() string
}

type Rumors

type Rumors interface {
	AddRumor(rumor Rumor)
	GetProtobuf() *proto.GossipRequest
}

func NewRumors

func NewRumors(ctx common.CallCtx) Rumors

type SearchRumor

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

func NewSearchRumor

func NewSearchRumor(rumor rumor, query string) SearchRumor

func (SearchRumor) GetCreator

func (r SearchRumor) GetCreator() common.Contact

func (SearchRumor) GetExpiry

func (r SearchRumor) GetExpiry() time.Time

func (SearchRumor) GetQuery

func (r SearchRumor) GetQuery() string

func (SearchRumor) GetRumorId

func (r SearchRumor) GetRumorId() uuid.UUID

func (SearchRumor) IsExpired

func (r SearchRumor) IsExpired() bool

func (SearchRumor) String

func (r SearchRumor) String() string

func (SearchRumor) ToProtobuf

func (r SearchRumor) ToProtobuf() *proto.Gossip

Jump to

Keyboard shortcuts

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