Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewPeerSource ¶
func NewPeerSource(topo topology.Topology, dialerOverride client.PeerConnDialer) (client.PeerSource, error)
NewPeerSource creates PeerSource
Types ¶
type BootstrapManager ¶
type BootstrapManager interface {
// IsBootstrapped returns whether the datanode is already bootstrapped.
IsBootstrapped() bool
// LastBootstrapCompletionTime returns the last bootstrap completion time,
// if any.
LastBootstrapCompletionTime() (time.Time, bool)
// Bootstrap performs bootstrapping for all namespaces and shards owned.
Bootstrap() error
}
BootstrapManager manages the bootstrap process.
func NewBootstrapManager ¶
func NewBootstrapManager(origin string, bootstrappable bootstrap.Bootstrapable, bootstrapOpts bootstrap.Options, topo topology.Topology, ) BootstrapManager
NewBootstrapManager creates bootstrap manager
type DataNode ¶
type DataNode interface {
// Options returns the database options.
Options() Options
// ID returns the host id of the DataNode
ID() string
// ShardSet returns the set of shards currently associated with this datanode.
ShardSet() shard.ShardSet
// Open data node
Open() error
// Close data node
Close()
// serve will start serving read and write requests
Serve()
}
func NewDataNode ¶
func NewDataNode( hostID string, topo topology.Topology, enumReader mutatorsCom.EnumReader, opts Options) (DataNode, error)
NewDataNode creates a new data node
type Options ¶
type Options interface {
// SetInstrumentOptions sets the instrumentation options.
SetInstrumentOptions(utils.Options) Options
// InstrumentOptions returns the instrumentation options.
InstrumentOptions() utils.Options
// Options returns bootstrap options
BootstrapOptions() bootstrap.Options
// SetBootstrapOptions sets bootstrap options
SetBootstrapOptions(bootstrap.Options) Options
// SetServerConfig sets server config
SetServerConfig(common.AresServerConfig) Options
// SetServerConfig returns server config
ServerConfig() common.AresServerConfig
// HTTPWrappers returns http handler wrappers
HTTPWrappers() []utils.HTTPHandlerWrapper
// SetHTTPWrappers returns http handler wrappers
SetHTTPWrappers([]utils.HTTPHandlerWrapper) Options
}
Options represents the options for storage.
func NewOptions ¶
func NewOptions() Options
NewOptions creates a new set of storage options with defaults
Source Files
¶
Click to show internal directories.
Click to hide internal directories.