Documentation ¶
Overview ¶
Package bootstrap is a generated GoMock package.
Index ¶
- type Bootstrapper
- type BootstrapperProvider
- type MockBootstrapper
- func (m *MockBootstrapper) BootstrapData(ns namespace.Metadata, shardsTimeRanges result.ShardTimeRanges, ...) (result.DataBootstrapResult, error)
- func (m *MockBootstrapper) BootstrapIndex(ns namespace.Metadata, shardsTimeRanges result.ShardTimeRanges, ...) (result.IndexBootstrapResult, error)
- func (m *MockBootstrapper) Can(strategy Strategy) bool
- func (m *MockBootstrapper) EXPECT() *MockBootstrapperMockRecorder
- func (m *MockBootstrapper) String() string
- type MockBootstrapperMockRecorder
- func (mr *MockBootstrapperMockRecorder) BootstrapData(ns, shardsTimeRanges, opts interface{}) *gomock.Call
- func (mr *MockBootstrapperMockRecorder) BootstrapIndex(ns, shardsTimeRanges, opts interface{}) *gomock.Call
- func (mr *MockBootstrapperMockRecorder) Can(strategy interface{}) *gomock.Call
- func (mr *MockBootstrapperMockRecorder) String() *gomock.Call
- type MockBootstrapperProvider
- type MockBootstrapperProviderMockRecorder
- type MockProcess
- type MockProcessMockRecorder
- type MockProcessOptions
- func (m *MockProcessOptions) AdminClient() client.AdminClient
- func (m *MockProcessOptions) CacheSeriesMetadata() bool
- func (m *MockProcessOptions) EXPECT() *MockProcessOptionsMockRecorder
- func (m *MockProcessOptions) SetAdminClient(value client.AdminClient) ProcessOptions
- func (m *MockProcessOptions) SetCacheSeriesMetadata(value bool) ProcessOptions
- func (m *MockProcessOptions) Validate() error
- type MockProcessOptionsMockRecorder
- func (mr *MockProcessOptionsMockRecorder) AdminClient() *gomock.Call
- func (mr *MockProcessOptionsMockRecorder) CacheSeriesMetadata() *gomock.Call
- func (mr *MockProcessOptionsMockRecorder) SetAdminClient(value interface{}) *gomock.Call
- func (mr *MockProcessOptionsMockRecorder) SetCacheSeriesMetadata(value interface{}) *gomock.Call
- func (mr *MockProcessOptionsMockRecorder) Validate() *gomock.Call
- type MockProcessProvider
- type MockProcessProviderMockRecorder
- type MockRunOptions
- func (m *MockRunOptions) CacheSeriesMetadata() bool
- func (m *MockRunOptions) EXPECT() *MockRunOptionsMockRecorder
- func (m *MockRunOptions) InitialTopologyState() *topology.StateSnapshot
- func (m *MockRunOptions) PersistConfig() PersistConfig
- func (m *MockRunOptions) SetCacheSeriesMetadata(value bool) RunOptions
- func (m *MockRunOptions) SetInitialTopologyState(value *topology.StateSnapshot) RunOptions
- func (m *MockRunOptions) SetPersistConfig(value PersistConfig) RunOptions
- type MockRunOptionsMockRecorder
- func (mr *MockRunOptionsMockRecorder) CacheSeriesMetadata() *gomock.Call
- func (mr *MockRunOptionsMockRecorder) InitialTopologyState() *gomock.Call
- func (mr *MockRunOptionsMockRecorder) PersistConfig() *gomock.Call
- func (mr *MockRunOptionsMockRecorder) SetCacheSeriesMetadata(value interface{}) *gomock.Call
- func (mr *MockRunOptionsMockRecorder) SetInitialTopologyState(value interface{}) *gomock.Call
- func (mr *MockRunOptionsMockRecorder) SetPersistConfig(value interface{}) *gomock.Call
- type MockSource
- func (m *MockSource) AvailableData(ns namespace.Metadata, shardsTimeRanges result.ShardTimeRanges, ...) result.ShardTimeRanges
- func (m *MockSource) AvailableIndex(ns namespace.Metadata, shardsTimeRanges result.ShardTimeRanges, ...) result.ShardTimeRanges
- func (m *MockSource) Can(strategy Strategy) bool
- func (m *MockSource) EXPECT() *MockSourceMockRecorder
- func (m *MockSource) ReadData(ns namespace.Metadata, shardsTimeRanges result.ShardTimeRanges, ...) (result.DataBootstrapResult, error)
- func (m *MockSource) ReadIndex(ns namespace.Metadata, shardsTimeRanges result.ShardTimeRanges, ...) (result.IndexBootstrapResult, error)
- type MockSourceMockRecorder
- func (mr *MockSourceMockRecorder) AvailableData(ns, shardsTimeRanges, runOpts interface{}) *gomock.Call
- func (mr *MockSourceMockRecorder) AvailableIndex(ns, shardsTimeRanges, opts interface{}) *gomock.Call
- func (mr *MockSourceMockRecorder) Can(strategy interface{}) *gomock.Call
- func (mr *MockSourceMockRecorder) ReadData(ns, shardsTimeRanges, runOpts interface{}) *gomock.Call
- func (mr *MockSourceMockRecorder) ReadIndex(ns, shardsTimeRanges, opts interface{}) *gomock.Call
- type PersistConfig
- type Process
- type ProcessOptions
- type ProcessProvider
- type ProcessResult
- type RunOptions
- type Source
- type Strategy
- type TargetRange
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bootstrapper ¶
type Bootstrapper interface { // String returns the name of the bootstrapper String() string // Can returns whether a specific bootstrapper strategy can be applied. Can(strategy Strategy) bool // BootstrapData performs bootstrapping of data for the given time ranges, returning the bootstrapped // series data and the time ranges it's unable to fulfill in parallel. A bootstrapper // should only return an error should it want to entirely cancel the bootstrapping of the // node, i.e. non-recoverable situation like not being able to read from the filesystem. BootstrapData( ns namespace.Metadata, shardsTimeRanges result.ShardTimeRanges, opts RunOptions, ) (result.DataBootstrapResult, error) // BootstrapIndex performs bootstrapping of index blocks for the given time ranges, returning // the bootstrapped index blocks and the time ranges it's unable to fulfill in parallel. A bootstrapper // should only return an error should it want to entirely cancel the bootstrapping of the // node, i.e. non-recoverable situation like not being able to read from the filesystem. BootstrapIndex( ns namespace.Metadata, shardsTimeRanges result.ShardTimeRanges, opts RunOptions, ) (result.IndexBootstrapResult, error) }
Bootstrapper is the interface for different bootstrapping mechanisms. Note that a bootstrapper can and will be reused so it is important to not rely on state stored in the bootstrapper itself with the mindset that it will always be set to default values from the constructor.
type BootstrapperProvider ¶
type BootstrapperProvider interface { // String returns the name of the bootstrapper. String() string // Provide constructs a bootstrapper. Provide() (Bootstrapper, error) }
BootstrapperProvider constructs a bootstrapper.
type MockBootstrapper ¶
type MockBootstrapper struct {
// contains filtered or unexported fields
}
MockBootstrapper is a mock of Bootstrapper interface
func NewMockBootstrapper ¶
func NewMockBootstrapper(ctrl *gomock.Controller) *MockBootstrapper
NewMockBootstrapper creates a new mock instance
func (*MockBootstrapper) BootstrapData ¶
func (m *MockBootstrapper) BootstrapData(ns namespace.Metadata, shardsTimeRanges result.ShardTimeRanges, opts RunOptions) (result.DataBootstrapResult, error)
BootstrapData mocks base method
func (*MockBootstrapper) BootstrapIndex ¶
func (m *MockBootstrapper) BootstrapIndex(ns namespace.Metadata, shardsTimeRanges result.ShardTimeRanges, opts RunOptions) (result.IndexBootstrapResult, error)
BootstrapIndex mocks base method
func (*MockBootstrapper) Can ¶
func (m *MockBootstrapper) Can(strategy Strategy) bool
Can mocks base method
func (*MockBootstrapper) EXPECT ¶
func (m *MockBootstrapper) EXPECT() *MockBootstrapperMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockBootstrapper) String ¶
func (m *MockBootstrapper) String() string
String mocks base method
type MockBootstrapperMockRecorder ¶
type MockBootstrapperMockRecorder struct {
// contains filtered or unexported fields
}
MockBootstrapperMockRecorder is the mock recorder for MockBootstrapper
func (*MockBootstrapperMockRecorder) BootstrapData ¶
func (mr *MockBootstrapperMockRecorder) BootstrapData(ns, shardsTimeRanges, opts interface{}) *gomock.Call
BootstrapData indicates an expected call of BootstrapData
func (*MockBootstrapperMockRecorder) BootstrapIndex ¶
func (mr *MockBootstrapperMockRecorder) BootstrapIndex(ns, shardsTimeRanges, opts interface{}) *gomock.Call
BootstrapIndex indicates an expected call of BootstrapIndex
func (*MockBootstrapperMockRecorder) Can ¶
func (mr *MockBootstrapperMockRecorder) Can(strategy interface{}) *gomock.Call
Can indicates an expected call of Can
func (*MockBootstrapperMockRecorder) String ¶
func (mr *MockBootstrapperMockRecorder) String() *gomock.Call
String indicates an expected call of String
type MockBootstrapperProvider ¶
type MockBootstrapperProvider struct {
// contains filtered or unexported fields
}
MockBootstrapperProvider is a mock of BootstrapperProvider interface
func NewMockBootstrapperProvider ¶
func NewMockBootstrapperProvider(ctrl *gomock.Controller) *MockBootstrapperProvider
NewMockBootstrapperProvider creates a new mock instance
func (*MockBootstrapperProvider) EXPECT ¶
func (m *MockBootstrapperProvider) EXPECT() *MockBootstrapperProviderMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockBootstrapperProvider) Provide ¶
func (m *MockBootstrapperProvider) Provide() (Bootstrapper, error)
Provide mocks base method
func (*MockBootstrapperProvider) String ¶
func (m *MockBootstrapperProvider) String() string
String mocks base method
type MockBootstrapperProviderMockRecorder ¶
type MockBootstrapperProviderMockRecorder struct {
// contains filtered or unexported fields
}
MockBootstrapperProviderMockRecorder is the mock recorder for MockBootstrapperProvider
func (*MockBootstrapperProviderMockRecorder) Provide ¶
func (mr *MockBootstrapperProviderMockRecorder) Provide() *gomock.Call
Provide indicates an expected call of Provide
func (*MockBootstrapperProviderMockRecorder) String ¶
func (mr *MockBootstrapperProviderMockRecorder) String() *gomock.Call
String indicates an expected call of String
type MockProcess ¶
type MockProcess struct {
// contains filtered or unexported fields
}
MockProcess is a mock of Process interface
func NewMockProcess ¶
func NewMockProcess(ctrl *gomock.Controller) *MockProcess
NewMockProcess creates a new mock instance
func (*MockProcess) EXPECT ¶
func (m *MockProcess) EXPECT() *MockProcessMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockProcess) Run ¶
func (m *MockProcess) Run(start time.Time, ns namespace.Metadata, shards []uint32) (ProcessResult, error)
Run mocks base method
type MockProcessMockRecorder ¶
type MockProcessMockRecorder struct {
// contains filtered or unexported fields
}
MockProcessMockRecorder is the mock recorder for MockProcess
func (*MockProcessMockRecorder) Run ¶
func (mr *MockProcessMockRecorder) Run(start, ns, shards interface{}) *gomock.Call
Run indicates an expected call of Run
type MockProcessOptions ¶
type MockProcessOptions struct {
// contains filtered or unexported fields
}
MockProcessOptions is a mock of ProcessOptions interface
func NewMockProcessOptions ¶
func NewMockProcessOptions(ctrl *gomock.Controller) *MockProcessOptions
NewMockProcessOptions creates a new mock instance
func (*MockProcessOptions) AdminClient ¶ added in v0.4.4
func (m *MockProcessOptions) AdminClient() client.AdminClient
AdminClient mocks base method
func (*MockProcessOptions) CacheSeriesMetadata ¶
func (m *MockProcessOptions) CacheSeriesMetadata() bool
CacheSeriesMetadata mocks base method
func (*MockProcessOptions) EXPECT ¶
func (m *MockProcessOptions) EXPECT() *MockProcessOptionsMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockProcessOptions) SetAdminClient ¶ added in v0.4.4
func (m *MockProcessOptions) SetAdminClient(value client.AdminClient) ProcessOptions
SetAdminClient mocks base method
func (*MockProcessOptions) SetCacheSeriesMetadata ¶
func (m *MockProcessOptions) SetCacheSeriesMetadata(value bool) ProcessOptions
SetCacheSeriesMetadata mocks base method
func (*MockProcessOptions) Validate ¶ added in v0.4.4
func (m *MockProcessOptions) Validate() error
Validate mocks base method
type MockProcessOptionsMockRecorder ¶
type MockProcessOptionsMockRecorder struct {
// contains filtered or unexported fields
}
MockProcessOptionsMockRecorder is the mock recorder for MockProcessOptions
func (*MockProcessOptionsMockRecorder) AdminClient ¶ added in v0.4.4
func (mr *MockProcessOptionsMockRecorder) AdminClient() *gomock.Call
AdminClient indicates an expected call of AdminClient
func (*MockProcessOptionsMockRecorder) CacheSeriesMetadata ¶
func (mr *MockProcessOptionsMockRecorder) CacheSeriesMetadata() *gomock.Call
CacheSeriesMetadata indicates an expected call of CacheSeriesMetadata
func (*MockProcessOptionsMockRecorder) SetAdminClient ¶ added in v0.4.4
func (mr *MockProcessOptionsMockRecorder) SetAdminClient(value interface{}) *gomock.Call
SetAdminClient indicates an expected call of SetAdminClient
func (*MockProcessOptionsMockRecorder) SetCacheSeriesMetadata ¶
func (mr *MockProcessOptionsMockRecorder) SetCacheSeriesMetadata(value interface{}) *gomock.Call
SetCacheSeriesMetadata indicates an expected call of SetCacheSeriesMetadata
func (*MockProcessOptionsMockRecorder) Validate ¶ added in v0.4.4
func (mr *MockProcessOptionsMockRecorder) Validate() *gomock.Call
Validate indicates an expected call of Validate
type MockProcessProvider ¶
type MockProcessProvider struct {
// contains filtered or unexported fields
}
MockProcessProvider is a mock of ProcessProvider interface
func NewMockProcessProvider ¶
func NewMockProcessProvider(ctrl *gomock.Controller) *MockProcessProvider
NewMockProcessProvider creates a new mock instance
func (*MockProcessProvider) BootstrapperProvider ¶
func (m *MockProcessProvider) BootstrapperProvider() BootstrapperProvider
BootstrapperProvider mocks base method
func (*MockProcessProvider) EXPECT ¶
func (m *MockProcessProvider) EXPECT() *MockProcessProviderMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockProcessProvider) Provide ¶
func (m *MockProcessProvider) Provide() (Process, error)
Provide mocks base method
func (*MockProcessProvider) SetBootstrapperProvider ¶
func (m *MockProcessProvider) SetBootstrapperProvider(bootstrapper BootstrapperProvider)
SetBootstrapperProvider mocks base method
type MockProcessProviderMockRecorder ¶
type MockProcessProviderMockRecorder struct {
// contains filtered or unexported fields
}
MockProcessProviderMockRecorder is the mock recorder for MockProcessProvider
func (*MockProcessProviderMockRecorder) BootstrapperProvider ¶
func (mr *MockProcessProviderMockRecorder) BootstrapperProvider() *gomock.Call
BootstrapperProvider indicates an expected call of BootstrapperProvider
func (*MockProcessProviderMockRecorder) Provide ¶
func (mr *MockProcessProviderMockRecorder) Provide() *gomock.Call
Provide indicates an expected call of Provide
func (*MockProcessProviderMockRecorder) SetBootstrapperProvider ¶
func (mr *MockProcessProviderMockRecorder) SetBootstrapperProvider(bootstrapper interface{}) *gomock.Call
SetBootstrapperProvider indicates an expected call of SetBootstrapperProvider
type MockRunOptions ¶
type MockRunOptions struct {
// contains filtered or unexported fields
}
MockRunOptions is a mock of RunOptions interface
func NewMockRunOptions ¶
func NewMockRunOptions(ctrl *gomock.Controller) *MockRunOptions
NewMockRunOptions creates a new mock instance
func (*MockRunOptions) CacheSeriesMetadata ¶
func (m *MockRunOptions) CacheSeriesMetadata() bool
CacheSeriesMetadata mocks base method
func (*MockRunOptions) EXPECT ¶
func (m *MockRunOptions) EXPECT() *MockRunOptionsMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockRunOptions) InitialTopologyState ¶ added in v0.4.4
func (m *MockRunOptions) InitialTopologyState() *topology.StateSnapshot
InitialTopologyState mocks base method
func (*MockRunOptions) PersistConfig ¶ added in v0.4.4
func (m *MockRunOptions) PersistConfig() PersistConfig
PersistConfig mocks base method
func (*MockRunOptions) SetCacheSeriesMetadata ¶
func (m *MockRunOptions) SetCacheSeriesMetadata(value bool) RunOptions
SetCacheSeriesMetadata mocks base method
func (*MockRunOptions) SetInitialTopologyState ¶ added in v0.4.4
func (m *MockRunOptions) SetInitialTopologyState(value *topology.StateSnapshot) RunOptions
SetInitialTopologyState mocks base method
func (*MockRunOptions) SetPersistConfig ¶ added in v0.4.4
func (m *MockRunOptions) SetPersistConfig(value PersistConfig) RunOptions
SetPersistConfig mocks base method
type MockRunOptionsMockRecorder ¶
type MockRunOptionsMockRecorder struct {
// contains filtered or unexported fields
}
MockRunOptionsMockRecorder is the mock recorder for MockRunOptions
func (*MockRunOptionsMockRecorder) CacheSeriesMetadata ¶
func (mr *MockRunOptionsMockRecorder) CacheSeriesMetadata() *gomock.Call
CacheSeriesMetadata indicates an expected call of CacheSeriesMetadata
func (*MockRunOptionsMockRecorder) InitialTopologyState ¶ added in v0.4.4
func (mr *MockRunOptionsMockRecorder) InitialTopologyState() *gomock.Call
InitialTopologyState indicates an expected call of InitialTopologyState
func (*MockRunOptionsMockRecorder) PersistConfig ¶ added in v0.4.4
func (mr *MockRunOptionsMockRecorder) PersistConfig() *gomock.Call
PersistConfig indicates an expected call of PersistConfig
func (*MockRunOptionsMockRecorder) SetCacheSeriesMetadata ¶
func (mr *MockRunOptionsMockRecorder) SetCacheSeriesMetadata(value interface{}) *gomock.Call
SetCacheSeriesMetadata indicates an expected call of SetCacheSeriesMetadata
func (*MockRunOptionsMockRecorder) SetInitialTopologyState ¶ added in v0.4.4
func (mr *MockRunOptionsMockRecorder) SetInitialTopologyState(value interface{}) *gomock.Call
SetInitialTopologyState indicates an expected call of SetInitialTopologyState
func (*MockRunOptionsMockRecorder) SetPersistConfig ¶ added in v0.4.4
func (mr *MockRunOptionsMockRecorder) SetPersistConfig(value interface{}) *gomock.Call
SetPersistConfig indicates an expected call of SetPersistConfig
type MockSource ¶
type MockSource struct {
// contains filtered or unexported fields
}
MockSource is a mock of Source interface
func NewMockSource ¶
func NewMockSource(ctrl *gomock.Controller) *MockSource
NewMockSource creates a new mock instance
func (*MockSource) AvailableData ¶
func (m *MockSource) AvailableData(ns namespace.Metadata, shardsTimeRanges result.ShardTimeRanges, runOpts RunOptions) result.ShardTimeRanges
AvailableData mocks base method
func (*MockSource) AvailableIndex ¶
func (m *MockSource) AvailableIndex(ns namespace.Metadata, shardsTimeRanges result.ShardTimeRanges, opts RunOptions) result.ShardTimeRanges
AvailableIndex mocks base method
func (*MockSource) EXPECT ¶
func (m *MockSource) EXPECT() *MockSourceMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockSource) ReadData ¶
func (m *MockSource) ReadData(ns namespace.Metadata, shardsTimeRanges result.ShardTimeRanges, runOpts RunOptions) (result.DataBootstrapResult, error)
ReadData mocks base method
func (*MockSource) ReadIndex ¶
func (m *MockSource) ReadIndex(ns namespace.Metadata, shardsTimeRanges result.ShardTimeRanges, opts RunOptions) (result.IndexBootstrapResult, error)
ReadIndex mocks base method
type MockSourceMockRecorder ¶
type MockSourceMockRecorder struct {
// contains filtered or unexported fields
}
MockSourceMockRecorder is the mock recorder for MockSource
func (*MockSourceMockRecorder) AvailableData ¶
func (mr *MockSourceMockRecorder) AvailableData(ns, shardsTimeRanges, runOpts interface{}) *gomock.Call
AvailableData indicates an expected call of AvailableData
func (*MockSourceMockRecorder) AvailableIndex ¶
func (mr *MockSourceMockRecorder) AvailableIndex(ns, shardsTimeRanges, opts interface{}) *gomock.Call
AvailableIndex indicates an expected call of AvailableIndex
func (*MockSourceMockRecorder) Can ¶
func (mr *MockSourceMockRecorder) Can(strategy interface{}) *gomock.Call
Can indicates an expected call of Can
func (*MockSourceMockRecorder) ReadData ¶
func (mr *MockSourceMockRecorder) ReadData(ns, shardsTimeRanges, runOpts interface{}) *gomock.Call
ReadData indicates an expected call of ReadData
func (*MockSourceMockRecorder) ReadIndex ¶
func (mr *MockSourceMockRecorder) ReadIndex(ns, shardsTimeRanges, opts interface{}) *gomock.Call
ReadIndex indicates an expected call of ReadIndex
type PersistConfig ¶ added in v0.4.4
type PersistConfig struct { // If enabled bootstrappers are allowed to write out bootstrapped data // to disk on their own instead of just returning result in-memory. Enabled bool // If enabled, what type of persistence files should be generated during // the process. FileSetType persist.FileSetType }
PersistConfig is the configuration for a bootstrap with persistence.
type Process ¶
type Process interface { // Run runs the bootstrap process, returning the bootstrap result and any error encountered. Run(start time.Time, ns namespace.Metadata, shards []uint32) (ProcessResult, error) }
Process represents the bootstrap process. Note that a bootstrap process can and will be reused so it is important to not rely on state stored in the bootstrap itself with the mindset that it will always be set to default values from the constructor.
type ProcessOptions ¶
type ProcessOptions interface { // SetCacheSeriesMetadata sets whether bootstrappers created by this // provider should cache series metadata between runs. SetCacheSeriesMetadata(value bool) ProcessOptions // CacheSeriesMetadata returns whether bootstrappers created by this // provider should cache series metadata between runs. CacheSeriesMetadata() bool // SetAdminClient sets the admin client. SetAdminClient(value client.AdminClient) ProcessOptions // AdminClient returns the admin client. AdminClient() client.AdminClient // Validate validates that the ProcessOptions are correct. Validate() error }
ProcessOptions is a set of options for a bootstrap provider.
func NewProcessOptions ¶
func NewProcessOptions() ProcessOptions
NewProcessOptions creates new bootstrap run options
type ProcessProvider ¶
type ProcessProvider interface { // SetBootstrapper sets the bootstrapper provider to use when running the // process. SetBootstrapperProvider(bootstrapper BootstrapperProvider) // Bootstrapper returns the current bootstrappe provider to use when // running the process. BootstrapperProvider() BootstrapperProvider // Provide constructs a bootstrap process. Provide() (Process, error) }
ProcessProvider constructs a bootstrap process that can execute a bootstrap run.
func NewNoOpProcessProvider ¶
func NewNoOpProcessProvider() ProcessProvider
NewNoOpProcessProvider creates a no-op bootstrap process proivder.
func NewProcessProvider ¶
func NewProcessProvider( bootstrapperProvider BootstrapperProvider, processOpts ProcessOptions, resultOpts result.Options, ) (ProcessProvider, error)
NewProcessProvider creates a new bootstrap process provider.
type ProcessResult ¶
type ProcessResult struct { DataResult result.DataBootstrapResult IndexResult result.IndexBootstrapResult }
ProcessResult is the result of a bootstrap process.
type RunOptions ¶
type RunOptions interface { // SetPersistConfig sets persistence configuration for this bootstrap. SetPersistConfig(value PersistConfig) RunOptions // PersistConfig returns the persistence configuration for this bootstrap. PersistConfig() PersistConfig // SetCacheSeriesMetadata sets whether bootstrappers created by this // provider should cache series metadata between runs. SetCacheSeriesMetadata(value bool) RunOptions // CacheSeriesMetadata returns whether bootstrappers created by this // provider should cache series metadata between runs. CacheSeriesMetadata() bool // SetInitialTopologyState sets the initial topology state as it was // measured before the bootstrap process began. SetInitialTopologyState(value *topology.StateSnapshot) RunOptions // InitialTopologyState returns the initial topology as it was measured // before the bootstrap process began. InitialTopologyState() *topology.StateSnapshot }
RunOptions is a set of options for a bootstrap run.
func NewRunOptions ¶
func NewRunOptions() RunOptions
NewRunOptions creates new bootstrap run options
type Source ¶
type Source interface { // Can returns whether a specific bootstrapper strategy can be applied. Can(strategy Strategy) bool // AvailableData returns what time ranges are available for bootstrapping a given set of shards. AvailableData( ns namespace.Metadata, shardsTimeRanges result.ShardTimeRanges, runOpts RunOptions, ) result.ShardTimeRanges // ReadData returns raw series for a given set of shards & specified time ranges and // the time ranges it's unable to fulfill. A bootstrapper source should only return // an error should it want to entirely cancel the bootstrapping of the node, // i.e. non-recoverable situation like not being able to read from the filesystem. ReadData( ns namespace.Metadata, shardsTimeRanges result.ShardTimeRanges, runOpts RunOptions, ) (result.DataBootstrapResult, error) // AvailableIndex returns what time ranges are available for bootstrapping. AvailableIndex( ns namespace.Metadata, shardsTimeRanges result.ShardTimeRanges, opts RunOptions, ) result.ShardTimeRanges // ReadIndex returns series index blocks. ReadIndex( ns namespace.Metadata, shardsTimeRanges result.ShardTimeRanges, opts RunOptions, ) (result.IndexBootstrapResult, error) }
Source represents a bootstrap source. Note that a source can and will be reused so it is important to not rely on state stored in the source itself with the mindset that it will always be set to default values from the constructor.
type TargetRange ¶
type TargetRange struct { // Range is the time range to bootstrap for. Range xtime.Range // RunOptions is the bootstrap run options specific to the target range. RunOptions RunOptions }
TargetRange is a bootstrap target range.