boot

package
v0.0.0-...-4e97f33 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2021 License: Apache-2.0, MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MemoryDiscovery

type MemoryDiscovery struct {
	Local *peer.AddrInfo
	I     int
	Hosts []host.Host

	Topo Topology

	Sa boot.StaticAddrs
	// contains filtered or unexported fields
}

func (*MemoryDiscovery) Advertise

func (m *MemoryDiscovery) Advertise(ctx context.Context, ns string, opt ...discovery.Option) (_ time.Duration, err error)

func (*MemoryDiscovery) FindPeers

func (m *MemoryDiscovery) FindPeers(ctx context.Context, ns string, opt ...discovery.Option) (<-chan peer.AddrInfo, error)

type RedisDiscovery

type RedisDiscovery struct {
	ClusterSize int
	C           tsync.Client
	Local       *peer.AddrInfo
	I           int

	Topo Topology
	// contains filtered or unexported fields
}

func (*RedisDiscovery) Advertise

func (r *RedisDiscovery) Advertise(ctx context.Context, ns string, opt ...discovery.Option) (_ time.Duration, err error)

func (*RedisDiscovery) FindPeers

func (r *RedisDiscovery) FindPeers(ctx context.Context, ns string, opt ...discovery.Option) (<-chan peer.AddrInfo, error)

type Ring

type Ring struct{ ID peer.ID }

func (Ring) GetNeighbors

func (r Ring) GetNeighbors(sa boot.StaticAddrs) boot.StaticAddrs

type Topology

type Topology interface {
	GetNeighbors(boot boot.StaticAddrs) boot.StaticAddrs
}

Jump to

Keyboard shortcuts

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