peers

package
v0.4.3 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2018 License: Apache-2.0 Imports: 23 Imported by: 4

Documentation

Index

Constants

View Source
const (
	// PeersBootstrapperName is the name of the peers bootstrapper
	PeersBootstrapperName = "peers"
)

Variables

This section is empty.

Functions

func NewPeersBootstrapperProvider

func NewPeersBootstrapperProvider(
	opts Options,
	next bootstrap.BootstrapperProvider,
) (bootstrap.BootstrapperProvider, error)

NewPeersBootstrapperProvider creates a new bootstrapper provider to bootstrap from peers.

Types

type Options

type Options interface {
	// Validate validates the options
	Validate() error

	// SetResultOptions sets the instrumentation options
	SetResultOptions(value result.Options) Options

	// ResultOptions returns the instrumentation options
	ResultOptions() result.Options

	// SetAdminClient sets the admin client
	SetAdminClient(value client.AdminClient) Options

	// AdminClient returns the admin client
	AdminClient() client.AdminClient

	// SetDefaultShardConcurrency sets the concurrency for
	// bootstrapping shards when performing a non-incremental bootstrap.
	SetDefaultShardConcurrency(value int) Options

	// DefaultShardConcurrency returns the concurrency for
	// bootstrapping shards when performing a non-incremental bootstrap.
	DefaultShardConcurrency() int

	// SetIncrementalShardConcurrency sets the concurrency for
	// bootstrapping shards when performing an incremental bootstrap.
	SetIncrementalShardConcurrency(value int) Options

	// IncrementalShardConcurrency returns the concurrency for
	// bootstrapping shards when performing an incremental bootstrap.
	IncrementalShardConcurrency() int

	// SetIncrementalPersistMaxQueueSize sets the max queue for
	// bootstrapping shards waiting in line to persist without blocking
	// the concurrent shard fetchers.
	SetIncrementalPersistMaxQueueSize(value int) Options

	// IncrementalPersistMaxQueueSize returns the max queue for
	// bootstrapping shards waiting in line to persist without blocking
	// the concurrent shard fetchers.
	IncrementalPersistMaxQueueSize() int

	// SetPersistManager sets the persistence manager used to flush blocks
	// when performing an incremental bootstrap run.
	SetPersistManager(value persist.Manager) Options

	// PersistManager returns the persistence manager used to flush blocks
	// when performing an incremental bootstrap run.
	PersistManager() persist.Manager

	// SetDatabaseBlockRetrieverManager sets the block retriever manager to
	// pass to newly flushed blocks when performing an incremental bootstrap run.
	SetDatabaseBlockRetrieverManager(
		value block.DatabaseBlockRetrieverManager,
	) Options

	// NewBlockRetrieverFn returns the block retriever manager to
	// pass to newly flushed blocks when performing an incremental bootstrap run.
	DatabaseBlockRetrieverManager() block.DatabaseBlockRetrieverManager

	// SetFetchBlocksMetadataEndpointVersion sets the version of the fetch blocks
	// metadata endpoint that the peer bootstrapper will use
	SetFetchBlocksMetadataEndpointVersion(value client.FetchBlocksMetadataEndpointVersion) Options

	// SetFetchBlocksMetadataEndpointVersion returns the version of the fetch blocks
	// metadata endpoint that the peer bootstrapper will use
	FetchBlocksMetadataEndpointVersion() client.FetchBlocksMetadataEndpointVersion

	// SetRuntimeOptionsManagers sets the RuntimeOptionsManager.
	SetRuntimeOptionsManager(value m3dbruntime.OptionsManager) Options

	// RuntimeOptionsManagers returns the RuntimeOptionsManager.
	RuntimeOptionsManager() m3dbruntime.OptionsManager
}

Options represents the options for bootstrapping from peers

func NewOptions

func NewOptions() Options

NewOptions creates new bootstrap options

Jump to

Keyboard shortcuts

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