hydra

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2020 License: Apache-2.0, MIT, Apache-2.0, + 1 more Imports: 24 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) GetUniquePeersCount

func (hy *Hydra) GetUniquePeersCount() uint64

GetUniquePeersCount retrieves the current total for unique peers

type Options

type Options struct {
	Name             string
	DatastorePath    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
}

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