boot

package
v0.0.0-...-055f8da Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2023 License: Apache-2.0, MIT Imports: 6 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Namespace

type Namespace struct {
	Match   func(string) bool
	Target  discovery.Discovery
	Default discovery.Discovery
}

func (Namespace) Advertise

func (n Namespace) Advertise(ctx context.Context, ns string, opt ...discovery.Option) (time.Duration, error)

func (Namespace) FindPeers

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

type StaticAddrs

type StaticAddrs []peer.AddrInfo

StaticAddrs is a set of bootstrap-peer addresses.

func NewStaticAddrStrings

func NewStaticAddrStrings(ss ...string) (as StaticAddrs, _ error)

func NewStaticAddrs

func NewStaticAddrs(as ...ma.Multiaddr) (StaticAddrs, error)

NewStaticAddrs from one or more multiaddrs.

func (StaticAddrs) Advertise

func (as StaticAddrs) Advertise(_ context.Context, _ string, opt ...discovery.Option) (time.Duration, error)

Advertise is a nop that defaults to PermanentAddrTTL.

func (StaticAddrs) Close

func (StaticAddrs) Close() error

Close is a nop method. It exists to satisfy boot.DiscoveryCloser.

func (StaticAddrs) Filter

func (as StaticAddrs) Filter(f func(peer.AddrInfo) bool) StaticAddrs

func (StaticAddrs) FindPeers

func (as StaticAddrs) FindPeers(_ context.Context, _ string, opt ...discovery.Option) (<-chan peer.AddrInfo, error)

FindPeers converts the static addresses into AddrInfos

func (StaticAddrs) Len

func (as StaticAddrs) Len() int

func (StaticAddrs) Less

func (as StaticAddrs) Less(i, j int) bool

func (StaticAddrs) Swap

func (as StaticAddrs) Swap(i, j int)

Directories

Path Synopsis
Package socket implements signed sockets for bootstrap services.
Package socket implements signed sockets for bootstrap services.
Package bootutil provides utilities for parsing and instantiating boot services
Package bootutil provides utilities for parsing and instantiating boot services

Jump to

Keyboard shortcuts

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