package
0.0.0-20191121140916-9649366ff4b2
Repository: https://github.com/chronosphereiox/m3.git
Documentation: pkg.go.dev
# Functions
NewActiveStagedPlacementOptions create a new set of active staged placement options.
NewDeploymentOptions returns a default DeploymentOptions.
NewEmptyInstance returns a Instance with some basic properties but no shards assigned.
NewInstance returns a new Instance.
NewInstanceFromProto creates a new placement instance from proto.
NewMockActiveStagedPlacement creates a new mock instance.
NewMockActiveStagedPlacementOptions creates a new mock instance.
NewMockAlgorithm creates a new mock instance.
NewMockDeploymentOptions creates a new mock instance.
NewMockDeploymentPlanner creates a new mock instance.
NewMockInstance creates a new mock instance.
NewMockInstanceSelector creates a new mock instance.
NewMockOptions creates a new mock instance.
NewMockPlacement creates a new mock instance.
NewMockService creates a new mock instance.
NewMockStagedPlacement creates a new mock instance.
NewMockStagedPlacementWatcher creates a new mock instance.
NewMockStagedPlacementWatcherOptions creates a new mock instance.
NewMockStorage creates a new mock instance.
NewMockWatch creates a new mock instance.
NewOptions returns a default Options.
NewPlacement returns a ServicePlacement.
NewPlacementFromProto creates a new placement from proto.
NewPlacementsFromProto creates a list of placements from proto.
NewStagedPlacement creates an empty staged placement.
NewStagedPlacementFromProto creates a new staged placement from proto.
NewStagedPlacementWatcher creates a new staged placement watcher.
NewStagedPlacementWatcherOptions create a new set of topology options.
Validate validates a placement to ensure: - The shards on each instance are in valid state.
# Constants
IncludeTransitionalShardStates means the placement will include transitional shard states.
StableShardStateOnly means the placement should only keep stable shard state.
# Structs
MockActiveStagedPlacement is a mock of ActiveStagedPlacement interface.
MockActiveStagedPlacementMockRecorder is the mock recorder for MockActiveStagedPlacement.
MockActiveStagedPlacementOptions is a mock of ActiveStagedPlacementOptions interface.
MockActiveStagedPlacementOptionsMockRecorder is the mock recorder for MockActiveStagedPlacementOptions.
MockAlgorithm is a mock of Algorithm interface.
MockAlgorithmMockRecorder is the mock recorder for MockAlgorithm.
MockDeploymentOptions is a mock of DeploymentOptions interface.
MockDeploymentOptionsMockRecorder is the mock recorder for MockDeploymentOptions.
MockDeploymentPlanner is a mock of DeploymentPlanner interface.
MockDeploymentPlannerMockRecorder is the mock recorder for MockDeploymentPlanner.
MockInstance is a mock of Instance interface.
MockInstanceMockRecorder is the mock recorder for MockInstance.
MockInstanceSelector is a mock of InstanceSelector interface.
MockInstanceSelectorMockRecorder is the mock recorder for MockInstanceSelector.
MockOptions is a mock of Options interface.
MockOptionsMockRecorder is the mock recorder for MockOptions.
MockPlacement is a mock of Placement interface.
MockPlacementMockRecorder is the mock recorder for MockPlacement.
MockService is a mock of Service interface.
MockServiceMockRecorder is the mock recorder for MockService.
MockStagedPlacement is a mock of StagedPlacement interface.
MockStagedPlacementMockRecorder is the mock recorder for MockStagedPlacement.
MockStagedPlacementWatcher is a mock of StagedPlacementWatcher interface.
MockStagedPlacementWatcherMockRecorder is the mock recorder for MockStagedPlacementWatcher.
MockStagedPlacementWatcherOptions is a mock of StagedPlacementWatcherOptions interface.
MockStagedPlacementWatcherOptionsMockRecorder is the mock recorder for MockStagedPlacementWatcherOptions.
MockStorage is a mock of Storage interface.
MockStorageMockRecorder is the mock recorder for MockStorage.
MockWatch is a mock of Watch interface.
MockWatchMockRecorder is the mock recorder for MockWatch.
WatcherConfiguration contains placement watcher configuration.
# Interfaces
ActiveStagedPlacement describes active staged placement.
ActiveStagedPlacementOptions provide a set of options for active staged placement.
Algorithm places shards on instances.
DeploymentOptions provides options for DeploymentPlanner.
DeploymentPlanner generates deployment steps for a placement.
Instance represents an instance in a placement.
InstanceSelector selects valid instances for the placement change.
Options is the interface for placement options.
Placement describes how instances are placed.
Service handles the placement related operations for registered services all write or update operations will persist the generated placement before returning success.
StagedPlacement describes a series of placements applied in staged fashion.
StagedPlacementWatcher watches for updates to staged placement.
StagedPlacementWatcherOptions provide a set of staged placement watcher options.
Storage provides read and write access to placement.
Watch watches for updates of a placement.
# Type aliases
ByIDAscending sorts Instance by ID ascending.
DoneFn is called when caller is done using the resource.
Instances is a slice of instances that can produce a debug string.
OnPlacementsAddedFn is called when placements are added.
OnPlacementsRemovedFn is called when placements are removed.
Placements represents a list of placements.
ShardStateMode describes the way to manage shard state in the placement.
ShardValidateFn validates the shard.
TimeNanosFn returns the time in the format of Unix nanoseconds.
ValidateFn validates the placement.