hydra

package
v0.7.5 Latest Latest
Warning

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

Go to latest
Published: May 30, 2022 License: Apache-2.0, MIT, Apache-2.0, + 1 more Imports: 36 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Hydra

type Hydra struct {
	Heads           []*head.Head
	SharedDatastore datastore.Datastore
	// contains filtered or unexported fields
}

Hydra is a container for heads and their shared belly bits.

func NewHydra

func NewHydra(ctx context.Context, options Options) (*Hydra, error)

NewHydra creates a new Hydra with the passed options.

func (*Hydra) GetRoutingTableSize

func (hy *Hydra) GetRoutingTableSize() int

func (*Hydra) GetUniquePeersCount

func (hy *Hydra) GetUniquePeersCount() uint64

GetUniquePeersCount retrieves the current total for unique peers

type Options

type Options struct {
	Name              string
	DatastorePath     string
	PeerstorePath     string
	ProviderStore     string
	DelegateTimeout   time.Duration
	ReframeAddr       string
	GetPort           func() int
	NHeads            int
	ProtocolPrefix    protocol.ID
	BucketSize        int
	BsCon             int
	EnableRelay       bool
	Stagger           time.Duration
	IDGenerator       idgen.IdentityGenerator
	DisableProvGC     bool
	DisableProviders  bool
	DisableValues     bool
	BootstrapPeers    []multiaddr.Multiaddr
	DisablePrefetch   bool
	DisableProvCounts bool
	DisableDBCreate   bool
}

Options are configuration for a new hydra.

Jump to

Keyboard shortcuts

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