gossip

package
v1.22.0-beta.2 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2021 License: Apache-2.0 Imports: 2 Imported by: 188

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register added in v1.16.0

func Register(name string, f newGossipFunc)

Types

type GossipState

type GossipState interface {
	Snapshot() *GossipStateSnapshot
	UpdateValues(removeKeys []string, putKeys map[string]string) error
	Start() error
}

func GetGossipState added in v1.16.0

func GetGossipState(protocol, listen, channelName, gossipName string, gossipSecret []byte, gossipSeeds SeedProvider) (GossipState, error)

type GossipStateSnapshot

type GossipStateSnapshot struct {
	Values  map[string]string
	Version uint64
}

type MultiGossipState added in v1.16.0

type MultiGossipState struct {
	Primary   GossipState
	Secondary GossipState
}

MultiGossipState enables ramping between gossip mechanisms. This will replicaet all UpdateValue operations to the Secondary while still calling the primary for all Snapshot information

func (*MultiGossipState) Snapshot added in v1.16.0

func (m *MultiGossipState) Snapshot() *GossipStateSnapshot

func (*MultiGossipState) Start added in v1.16.0

func (m *MultiGossipState) Start() error

func (*MultiGossipState) UpdateValues added in v1.16.0

func (m *MultiGossipState) UpdateValues(removeKeys []string, putKeys map[string]string) error

type SeedProvider

type SeedProvider interface {
	GetSeeds() ([]string, error)
}

type StaticSeedProvider

type StaticSeedProvider struct {
	Seeds []string
}

func NewStaticSeedProvider

func NewStaticSeedProvider(seeds []string) *StaticSeedProvider

func (*StaticSeedProvider) GetSeeds

func (s *StaticSeedProvider) GetSeeds() ([]string, error)

Directories

Path Synopsis
dns
provider
Package provider implements a dnsprovider backed by the gossip store.
Package provider implements a dnsprovider backed by the gossip store.

Jump to

Keyboard shortcuts

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