namespace

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2019 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Overview

Package namespace is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func OptionsToProto added in v0.3.0

func OptionsToProto(opts Options) *nsproto.NamespaceOptions

OptionsToProto converts Options -> nsproto.NamespaceOptions

func ToProto

func ToProto(m Map) *nsproto.Registry

ToProto converts Map to nsproto.Registry

func ToRetention

func ToRetention(
	ro *nsproto.RetentionOptions,
) (retention.Options, error)

ToRetention converts nsproto.RetentionOptions to retention.Options

Types

type DynamicOptions

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

	// SetInstrumentOptions sets the instrumentation options
	SetInstrumentOptions(value instrument.Options) DynamicOptions

	// InstrumentOptions returns the instrumentation options
	InstrumentOptions() instrument.Options

	// SetConfigServiceClient sets the client of ConfigService
	SetConfigServiceClient(c client.Client) DynamicOptions

	// ConfigServiceClient returns the client of ConfigService
	ConfigServiceClient() client.Client

	// SetNamespaceRegistryKey sets the kv-store key used for the
	// NamespaceRegistry
	SetNamespaceRegistryKey(k string) DynamicOptions

	// NamespaceRegistryKey returns the kv-store key used for the
	// NamespaceRegistry
	NamespaceRegistryKey() string
}

DynamicOptions is a set of options for dynamic namespace registry

func NewDynamicOptions

func NewDynamicOptions() DynamicOptions

NewDynamicOptions creates a new DynamicOptions

type IndexConfiguration

type IndexConfiguration struct {
	Enabled   bool          `yaml:"enabled" validate:"nonzero"`
	BlockSize time.Duration `yaml:"blockSize" validate:"nonzero"`
}

IndexConfiguration controls the knobs to tweak indexing configuration.

func (*IndexConfiguration) Options

func (ic *IndexConfiguration) Options() IndexOptions

Options returns the IndexOptions corresponding to the receiver struct.

type IndexOptions

type IndexOptions interface {
	// Equal returns true if the provide value is equal to this one.
	Equal(value IndexOptions) bool

	// SetEnabled sets whether indexing is enabled.
	SetEnabled(value bool) IndexOptions

	// Enabled returns whether indexing is enabled.
	Enabled() bool

	// SetBlockSize returns the block size.
	SetBlockSize(value time.Duration) IndexOptions

	// BlockSize returns the block size.
	BlockSize() time.Duration
}

IndexOptions controls the indexing options for a namespace.

func NewIndexOptions

func NewIndexOptions() IndexOptions

NewIndexOptions returns a new IndexOptions.

func ToIndexOptions

func ToIndexOptions(
	io *nsproto.IndexOptions,
) (IndexOptions, error)

ToIndexOptions converts nsproto.IndexOptions to IndexOptions

type Initializer

type Initializer interface {
	// Init will return a new Registry
	Init() (Registry, error)
}

Initializer can init new instances of namespace registries

func NewDynamicInitializer

func NewDynamicInitializer(opts DynamicOptions) Initializer

NewDynamicInitializer returns a dynamic namespace initializer

func NewStaticInitializer

func NewStaticInitializer(metadatas []Metadata) Initializer

NewStaticInitializer returns a new static registry initializer

type Map

type Map interface {
	// Equal returns true if the provide value is equal to this one
	Equal(value Map) bool

	// Get gets the metadata for the provided namespace
	Get(ident.ID) (Metadata, error)

	// IDs returns the ID of known namespaces
	IDs() []ident.ID

	// Metadatas returns the metadata of known namespaces
	Metadatas() []Metadata
}

Map is mapping from known namespaces' ID to their Metadata

func FromProto

func FromProto(protoRegistry nsproto.Registry) (Map, error)

FromProto converts nsproto.Registry -> Map

func NewMap

func NewMap(metadatas []Metadata) (Map, error)

NewMap returns a new registry containing provided metadatas, providing a consistent order.

type MapConfiguration

type MapConfiguration struct {
	Metadatas []MetadataConfiguration `yaml:"metadatas" validate:"nonzero"`
}

MapConfiguration is the configuration for a registry of namespaces

func (*MapConfiguration) Map

func (m *MapConfiguration) Map() (Map, error)

Map returns a Map corresponding to the receiver struct

type Metadata

type Metadata interface {
	// Equal returns true if the provide value is equal to this one
	Equal(value Metadata) bool

	// ID is the ID of the namespace
	ID() ident.ID

	// Options is the namespace options
	Options() Options
}

Metadata represents namespace metadata information

func NewMetadata

func NewMetadata(id ident.ID, opts Options) (Metadata, error)

NewMetadata creates a new namespace metadata

func ToMetadata

func ToMetadata(
	id string,
	opts *nsproto.NamespaceOptions,
) (Metadata, error)

ToMetadata converts nsproto.Options to Metadata

type MetadataConfiguration

type MetadataConfiguration struct {
	ID                string                  `yaml:"id" validate:"nonzero"`
	BootstrapEnabled  *bool                   `yaml:"bootstrapEnabled"`
	FlushEnabled      *bool                   `yaml:"flushEnabled"`
	WritesToCommitLog *bool                   `yaml:"writesToCommitLog"`
	CleanupEnabled    *bool                   `yaml:"cleanupEnabled"`
	RepairEnabled     *bool                   `yaml:"repairEnabled"`
	Retention         retention.Configuration `yaml:"retention" validate:"nonzero"`
	Index             IndexConfiguration      `yaml:"index"`
}

MetadataConfiguration is the configuration for a single namespace

func (*MetadataConfiguration) Metadata

func (mc *MetadataConfiguration) Metadata() (Metadata, error)

Metadata returns a Metadata corresponding to the receiver struct

type MetadataMatcher

type MetadataMatcher interface {
	gomock.Matcher
}

MetadataMatcher is a gomock.Matcher that matches metadata

func NewMetadataMatcher

func NewMetadataMatcher(md Metadata) MetadataMatcher

NewMetadataMatcher returns a new MetadataMatcher

type MockDynamicOptions

type MockDynamicOptions struct {
	// contains filtered or unexported fields
}

MockDynamicOptions is a mock of DynamicOptions interface

func NewMockDynamicOptions

func NewMockDynamicOptions(ctrl *gomock.Controller) *MockDynamicOptions

NewMockDynamicOptions creates a new mock instance

func (*MockDynamicOptions) ConfigServiceClient

func (m *MockDynamicOptions) ConfigServiceClient() client.Client

ConfigServiceClient mocks base method

func (*MockDynamicOptions) EXPECT

EXPECT returns an object that allows the caller to indicate expected use

func (*MockDynamicOptions) InstrumentOptions

func (m *MockDynamicOptions) InstrumentOptions() instrument.Options

InstrumentOptions mocks base method

func (*MockDynamicOptions) NamespaceRegistryKey

func (m *MockDynamicOptions) NamespaceRegistryKey() string

NamespaceRegistryKey mocks base method

func (*MockDynamicOptions) SetConfigServiceClient

func (m *MockDynamicOptions) SetConfigServiceClient(c client.Client) DynamicOptions

SetConfigServiceClient mocks base method

func (*MockDynamicOptions) SetInstrumentOptions

func (m *MockDynamicOptions) SetInstrumentOptions(value instrument.Options) DynamicOptions

SetInstrumentOptions mocks base method

func (*MockDynamicOptions) SetNamespaceRegistryKey

func (m *MockDynamicOptions) SetNamespaceRegistryKey(k string) DynamicOptions

SetNamespaceRegistryKey mocks base method

func (*MockDynamicOptions) Validate

func (m *MockDynamicOptions) Validate() error

Validate mocks base method

type MockDynamicOptionsMockRecorder

type MockDynamicOptionsMockRecorder struct {
	// contains filtered or unexported fields
}

MockDynamicOptionsMockRecorder is the mock recorder for MockDynamicOptions

func (*MockDynamicOptionsMockRecorder) ConfigServiceClient

func (mr *MockDynamicOptionsMockRecorder) ConfigServiceClient() *gomock.Call

ConfigServiceClient indicates an expected call of ConfigServiceClient

func (*MockDynamicOptionsMockRecorder) InstrumentOptions

func (mr *MockDynamicOptionsMockRecorder) InstrumentOptions() *gomock.Call

InstrumentOptions indicates an expected call of InstrumentOptions

func (*MockDynamicOptionsMockRecorder) NamespaceRegistryKey

func (mr *MockDynamicOptionsMockRecorder) NamespaceRegistryKey() *gomock.Call

NamespaceRegistryKey indicates an expected call of NamespaceRegistryKey

func (*MockDynamicOptionsMockRecorder) SetConfigServiceClient

func (mr *MockDynamicOptionsMockRecorder) SetConfigServiceClient(c interface{}) *gomock.Call

SetConfigServiceClient indicates an expected call of SetConfigServiceClient

func (*MockDynamicOptionsMockRecorder) SetInstrumentOptions

func (mr *MockDynamicOptionsMockRecorder) SetInstrumentOptions(value interface{}) *gomock.Call

SetInstrumentOptions indicates an expected call of SetInstrumentOptions

func (*MockDynamicOptionsMockRecorder) SetNamespaceRegistryKey

func (mr *MockDynamicOptionsMockRecorder) SetNamespaceRegistryKey(k interface{}) *gomock.Call

SetNamespaceRegistryKey indicates an expected call of SetNamespaceRegistryKey

func (*MockDynamicOptionsMockRecorder) Validate

func (mr *MockDynamicOptionsMockRecorder) Validate() *gomock.Call

Validate indicates an expected call of Validate

type MockIndexOptions

type MockIndexOptions struct {
	// contains filtered or unexported fields
}

MockIndexOptions is a mock of IndexOptions interface

func NewMockIndexOptions

func NewMockIndexOptions(ctrl *gomock.Controller) *MockIndexOptions

NewMockIndexOptions creates a new mock instance

func (*MockIndexOptions) BlockSize

func (m *MockIndexOptions) BlockSize() time.Duration

BlockSize mocks base method

func (*MockIndexOptions) EXPECT

EXPECT returns an object that allows the caller to indicate expected use

func (*MockIndexOptions) Enabled

func (m *MockIndexOptions) Enabled() bool

Enabled mocks base method

func (*MockIndexOptions) Equal

func (m *MockIndexOptions) Equal(value IndexOptions) bool

Equal mocks base method

func (*MockIndexOptions) SetBlockSize

func (m *MockIndexOptions) SetBlockSize(value time.Duration) IndexOptions

SetBlockSize mocks base method

func (*MockIndexOptions) SetEnabled

func (m *MockIndexOptions) SetEnabled(value bool) IndexOptions

SetEnabled mocks base method

type MockIndexOptionsMockRecorder

type MockIndexOptionsMockRecorder struct {
	// contains filtered or unexported fields
}

MockIndexOptionsMockRecorder is the mock recorder for MockIndexOptions

func (*MockIndexOptionsMockRecorder) BlockSize

func (mr *MockIndexOptionsMockRecorder) BlockSize() *gomock.Call

BlockSize indicates an expected call of BlockSize

func (*MockIndexOptionsMockRecorder) Enabled

func (mr *MockIndexOptionsMockRecorder) Enabled() *gomock.Call

Enabled indicates an expected call of Enabled

func (*MockIndexOptionsMockRecorder) Equal

func (mr *MockIndexOptionsMockRecorder) Equal(value interface{}) *gomock.Call

Equal indicates an expected call of Equal

func (*MockIndexOptionsMockRecorder) SetBlockSize

func (mr *MockIndexOptionsMockRecorder) SetBlockSize(value interface{}) *gomock.Call

SetBlockSize indicates an expected call of SetBlockSize

func (*MockIndexOptionsMockRecorder) SetEnabled

func (mr *MockIndexOptionsMockRecorder) SetEnabled(value interface{}) *gomock.Call

SetEnabled indicates an expected call of SetEnabled

type MockInitializer

type MockInitializer struct {
	// contains filtered or unexported fields
}

MockInitializer is a mock of Initializer interface

func NewMockInitializer

func NewMockInitializer(ctrl *gomock.Controller) *MockInitializer

NewMockInitializer creates a new mock instance

func (*MockInitializer) EXPECT

EXPECT returns an object that allows the caller to indicate expected use

func (*MockInitializer) Init

func (m *MockInitializer) Init() (Registry, error)

Init mocks base method

type MockInitializerMockRecorder

type MockInitializerMockRecorder struct {
	// contains filtered or unexported fields
}

MockInitializerMockRecorder is the mock recorder for MockInitializer

func (*MockInitializerMockRecorder) Init

Init indicates an expected call of Init

type MockMap

type MockMap struct {
	// contains filtered or unexported fields
}

MockMap is a mock of Map interface

func NewMockMap

func NewMockMap(ctrl *gomock.Controller) *MockMap

NewMockMap creates a new mock instance

func (*MockMap) EXPECT

func (m *MockMap) EXPECT() *MockMapMockRecorder

EXPECT returns an object that allows the caller to indicate expected use

func (*MockMap) Equal

func (m *MockMap) Equal(value Map) bool

Equal mocks base method

func (*MockMap) Get

func (m *MockMap) Get(arg0 ident.ID) (Metadata, error)

Get mocks base method

func (*MockMap) IDs

func (m *MockMap) IDs() []ident.ID

IDs mocks base method

func (*MockMap) Metadatas

func (m *MockMap) Metadatas() []Metadata

Metadatas mocks base method

type MockMapMockRecorder

type MockMapMockRecorder struct {
	// contains filtered or unexported fields
}

MockMapMockRecorder is the mock recorder for MockMap

func (*MockMapMockRecorder) Equal

func (mr *MockMapMockRecorder) Equal(value interface{}) *gomock.Call

Equal indicates an expected call of Equal

func (*MockMapMockRecorder) Get

func (mr *MockMapMockRecorder) Get(arg0 interface{}) *gomock.Call

Get indicates an expected call of Get

func (*MockMapMockRecorder) IDs

func (mr *MockMapMockRecorder) IDs() *gomock.Call

IDs indicates an expected call of IDs

func (*MockMapMockRecorder) Metadatas

func (mr *MockMapMockRecorder) Metadatas() *gomock.Call

Metadatas indicates an expected call of Metadatas

type MockMetadata

type MockMetadata struct {
	// contains filtered or unexported fields
}

MockMetadata is a mock of Metadata interface

func NewMockMetadata

func NewMockMetadata(ctrl *gomock.Controller) *MockMetadata

NewMockMetadata creates a new mock instance

func (*MockMetadata) EXPECT

EXPECT returns an object that allows the caller to indicate expected use

func (*MockMetadata) Equal

func (m *MockMetadata) Equal(value Metadata) bool

Equal mocks base method

func (*MockMetadata) ID

func (m *MockMetadata) ID() ident.ID

ID mocks base method

func (*MockMetadata) Options

func (m *MockMetadata) Options() Options

Options mocks base method

type MockMetadataMockRecorder

type MockMetadataMockRecorder struct {
	// contains filtered or unexported fields
}

MockMetadataMockRecorder is the mock recorder for MockMetadata

func (*MockMetadataMockRecorder) Equal

func (mr *MockMetadataMockRecorder) Equal(value interface{}) *gomock.Call

Equal indicates an expected call of Equal

func (*MockMetadataMockRecorder) ID

ID indicates an expected call of ID

func (*MockMetadataMockRecorder) Options

func (mr *MockMetadataMockRecorder) Options() *gomock.Call

Options indicates an expected call of Options

type MockOptions

type MockOptions struct {
	// contains filtered or unexported fields
}

MockOptions is a mock of Options interface

func NewMockOptions

func NewMockOptions(ctrl *gomock.Controller) *MockOptions

NewMockOptions creates a new mock instance

func (*MockOptions) BootstrapEnabled

func (m *MockOptions) BootstrapEnabled() bool

BootstrapEnabled mocks base method

func (*MockOptions) CleanupEnabled

func (m *MockOptions) CleanupEnabled() bool

CleanupEnabled mocks base method

func (*MockOptions) EXPECT

func (m *MockOptions) EXPECT() *MockOptionsMockRecorder

EXPECT returns an object that allows the caller to indicate expected use

func (*MockOptions) Equal

func (m *MockOptions) Equal(value Options) bool

Equal mocks base method

func (*MockOptions) FlushEnabled

func (m *MockOptions) FlushEnabled() bool

FlushEnabled mocks base method

func (*MockOptions) IndexOptions

func (m *MockOptions) IndexOptions() IndexOptions

IndexOptions mocks base method

func (*MockOptions) RepairEnabled

func (m *MockOptions) RepairEnabled() bool

RepairEnabled mocks base method

func (*MockOptions) RetentionOptions

func (m *MockOptions) RetentionOptions() retention.Options

RetentionOptions mocks base method

func (*MockOptions) SetBootstrapEnabled

func (m *MockOptions) SetBootstrapEnabled(value bool) Options

SetBootstrapEnabled mocks base method

func (*MockOptions) SetCleanupEnabled

func (m *MockOptions) SetCleanupEnabled(value bool) Options

SetCleanupEnabled mocks base method

func (*MockOptions) SetFlushEnabled

func (m *MockOptions) SetFlushEnabled(value bool) Options

SetFlushEnabled mocks base method

func (*MockOptions) SetIndexOptions

func (m *MockOptions) SetIndexOptions(value IndexOptions) Options

SetIndexOptions mocks base method

func (*MockOptions) SetRepairEnabled

func (m *MockOptions) SetRepairEnabled(value bool) Options

SetRepairEnabled mocks base method

func (*MockOptions) SetRetentionOptions

func (m *MockOptions) SetRetentionOptions(value retention.Options) Options

SetRetentionOptions mocks base method

func (*MockOptions) SetSnapshotEnabled

func (m *MockOptions) SetSnapshotEnabled(value bool) Options

SetSnapshotEnabled mocks base method

func (*MockOptions) SetWritesToCommitLog

func (m *MockOptions) SetWritesToCommitLog(value bool) Options

SetWritesToCommitLog mocks base method

func (*MockOptions) SnapshotEnabled

func (m *MockOptions) SnapshotEnabled() bool

SnapshotEnabled mocks base method

func (*MockOptions) Validate

func (m *MockOptions) Validate() error

Validate mocks base method

func (*MockOptions) WritesToCommitLog

func (m *MockOptions) WritesToCommitLog() bool

WritesToCommitLog mocks base method

type MockOptionsMockRecorder

type MockOptionsMockRecorder struct {
	// contains filtered or unexported fields
}

MockOptionsMockRecorder is the mock recorder for MockOptions

func (*MockOptionsMockRecorder) BootstrapEnabled

func (mr *MockOptionsMockRecorder) BootstrapEnabled() *gomock.Call

BootstrapEnabled indicates an expected call of BootstrapEnabled

func (*MockOptionsMockRecorder) CleanupEnabled

func (mr *MockOptionsMockRecorder) CleanupEnabled() *gomock.Call

CleanupEnabled indicates an expected call of CleanupEnabled

func (*MockOptionsMockRecorder) Equal

func (mr *MockOptionsMockRecorder) Equal(value interface{}) *gomock.Call

Equal indicates an expected call of Equal

func (*MockOptionsMockRecorder) FlushEnabled

func (mr *MockOptionsMockRecorder) FlushEnabled() *gomock.Call

FlushEnabled indicates an expected call of FlushEnabled

func (*MockOptionsMockRecorder) IndexOptions

func (mr *MockOptionsMockRecorder) IndexOptions() *gomock.Call

IndexOptions indicates an expected call of IndexOptions

func (*MockOptionsMockRecorder) RepairEnabled

func (mr *MockOptionsMockRecorder) RepairEnabled() *gomock.Call

RepairEnabled indicates an expected call of RepairEnabled

func (*MockOptionsMockRecorder) RetentionOptions

func (mr *MockOptionsMockRecorder) RetentionOptions() *gomock.Call

RetentionOptions indicates an expected call of RetentionOptions

func (*MockOptionsMockRecorder) SetBootstrapEnabled

func (mr *MockOptionsMockRecorder) SetBootstrapEnabled(value interface{}) *gomock.Call

SetBootstrapEnabled indicates an expected call of SetBootstrapEnabled

func (*MockOptionsMockRecorder) SetCleanupEnabled

func (mr *MockOptionsMockRecorder) SetCleanupEnabled(value interface{}) *gomock.Call

SetCleanupEnabled indicates an expected call of SetCleanupEnabled

func (*MockOptionsMockRecorder) SetFlushEnabled

func (mr *MockOptionsMockRecorder) SetFlushEnabled(value interface{}) *gomock.Call

SetFlushEnabled indicates an expected call of SetFlushEnabled

func (*MockOptionsMockRecorder) SetIndexOptions

func (mr *MockOptionsMockRecorder) SetIndexOptions(value interface{}) *gomock.Call

SetIndexOptions indicates an expected call of SetIndexOptions

func (*MockOptionsMockRecorder) SetRepairEnabled

func (mr *MockOptionsMockRecorder) SetRepairEnabled(value interface{}) *gomock.Call

SetRepairEnabled indicates an expected call of SetRepairEnabled

func (*MockOptionsMockRecorder) SetRetentionOptions

func (mr *MockOptionsMockRecorder) SetRetentionOptions(value interface{}) *gomock.Call

SetRetentionOptions indicates an expected call of SetRetentionOptions

func (*MockOptionsMockRecorder) SetSnapshotEnabled

func (mr *MockOptionsMockRecorder) SetSnapshotEnabled(value interface{}) *gomock.Call

SetSnapshotEnabled indicates an expected call of SetSnapshotEnabled

func (*MockOptionsMockRecorder) SetWritesToCommitLog

func (mr *MockOptionsMockRecorder) SetWritesToCommitLog(value interface{}) *gomock.Call

SetWritesToCommitLog indicates an expected call of SetWritesToCommitLog

func (*MockOptionsMockRecorder) SnapshotEnabled

func (mr *MockOptionsMockRecorder) SnapshotEnabled() *gomock.Call

SnapshotEnabled indicates an expected call of SnapshotEnabled

func (*MockOptionsMockRecorder) Validate

func (mr *MockOptionsMockRecorder) Validate() *gomock.Call

Validate indicates an expected call of Validate

func (*MockOptionsMockRecorder) WritesToCommitLog

func (mr *MockOptionsMockRecorder) WritesToCommitLog() *gomock.Call

WritesToCommitLog indicates an expected call of WritesToCommitLog

type MockRegistry

type MockRegistry struct {
	// contains filtered or unexported fields
}

MockRegistry is a mock of Registry interface

func NewMockRegistry

func NewMockRegistry(ctrl *gomock.Controller) *MockRegistry

NewMockRegistry creates a new mock instance

func (*MockRegistry) Close

func (m *MockRegistry) Close() error

Close mocks base method

func (*MockRegistry) EXPECT

EXPECT returns an object that allows the caller to indicate expected use

func (*MockRegistry) Watch

func (m *MockRegistry) Watch() (Watch, error)

Watch mocks base method

type MockRegistryMockRecorder

type MockRegistryMockRecorder struct {
	// contains filtered or unexported fields
}

MockRegistryMockRecorder is the mock recorder for MockRegistry

func (*MockRegistryMockRecorder) Close

func (mr *MockRegistryMockRecorder) Close() *gomock.Call

Close indicates an expected call of Close

func (*MockRegistryMockRecorder) Watch

func (mr *MockRegistryMockRecorder) Watch() *gomock.Call

Watch indicates an expected call of Watch

type MockWatch

type MockWatch struct {
	// contains filtered or unexported fields
}

MockWatch is a mock of Watch interface

func NewMockWatch

func NewMockWatch(ctrl *gomock.Controller) *MockWatch

NewMockWatch creates a new mock instance

func (*MockWatch) C

func (m *MockWatch) C() <-chan struct{}

C mocks base method

func (*MockWatch) Close

func (m *MockWatch) Close() error

Close mocks base method

func (*MockWatch) EXPECT

func (m *MockWatch) EXPECT() *MockWatchMockRecorder

EXPECT returns an object that allows the caller to indicate expected use

func (*MockWatch) Get

func (m *MockWatch) Get() Map

Get mocks base method

type MockWatchMockRecorder

type MockWatchMockRecorder struct {
	// contains filtered or unexported fields
}

MockWatchMockRecorder is the mock recorder for MockWatch

func (*MockWatchMockRecorder) C

C indicates an expected call of C

func (*MockWatchMockRecorder) Close

func (mr *MockWatchMockRecorder) Close() *gomock.Call

Close indicates an expected call of Close

func (*MockWatchMockRecorder) Get

func (mr *MockWatchMockRecorder) Get() *gomock.Call

Get indicates an expected call of Get

type Options

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

	// Equal returns true if the provide value is equal to this one
	Equal(value Options) bool

	// SetBootstrapEnabled sets whether this namespace requires bootstrapping
	SetBootstrapEnabled(value bool) Options

	// BootstrapEnabled returns whether this namespace requires bootstrapping
	BootstrapEnabled() bool

	// SetFlushEnabled sets whether the in-memory data for this namespace needs to be flushed
	SetFlushEnabled(value bool) Options

	// FlushEnabled returns whether the in-memory data for this namespace needs to be flushed
	FlushEnabled() bool

	// SetSnapshotEnabled sets whether the in-memory data for this namespace should be snapshotted regularly
	SetSnapshotEnabled(value bool) Options

	// SnapshotEnabled returns whether the in-memory data for this namespace should be snapshotted regularly
	SnapshotEnabled() bool

	// SetWritesToCommitLog sets whether writes for series in this namespace need to go to commit log
	SetWritesToCommitLog(value bool) Options

	// WritesToCommitLog returns whether writes for series in this namespace need to go to commit log
	WritesToCommitLog() bool

	// SetCleanupEnabled sets whether this namespace requires cleaning up fileset/snapshot files
	SetCleanupEnabled(value bool) Options

	// CleanupEnabled returns whether this namespace requires cleaning up fileset/snapshot files
	CleanupEnabled() bool

	// SetRepairEnabled sets whether the data for this namespace needs to be repaired
	SetRepairEnabled(value bool) Options

	// RepairEnabled returns whether the data for this namespace needs to be repaired
	RepairEnabled() bool

	// SetRetentionOptions sets the retention options for this namespace
	SetRetentionOptions(value retention.Options) Options

	// RetentionOptions returns the retention options for this namespace
	RetentionOptions() retention.Options

	// SetIndexOptions sets the IndexOptions.
	SetIndexOptions(value IndexOptions) Options

	// IndexOptions returns the IndexOptions.
	IndexOptions() IndexOptions
}

Options controls namespace behavior

func NewOptions

func NewOptions() Options

NewOptions creates a new namespace options

type Registry

type Registry interface {
	// Watch for the Registry changes
	Watch() (Watch, error)

	// Close closes the registry
	Close() error
}

Registry is an un-changing container for a Map

type Watch

type Watch interface {
	// C is the notification channel for when a value becomes available
	C() <-chan struct{}

	// Get the current namespace map
	Get() Map

	// Close closes the watch
	Close() error
}

Watch is a watch on a namespace Map

func NewWatch

func NewWatch(w xwatch.Watch) Watch

NewWatch creates a new watch on a topology map from a generic watch that watches a Map

Jump to

Keyboard shortcuts

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