# Functions
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.
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.
NewMockoperations creates a new mock instance.
NewMockOperator creates a new mock instance.
NewMockOptions creates a new mock instance.
NewMockPlacement creates a new mock instance.
NewMockService creates a new mock instance.
NewMockStorage creates a new mock instance.
NewMockWatch creates a new mock instance.
NewMockWatcher creates a new mock instance.
NewMockWatcherOptions creates a new mock instance.
NewOptions returns a default Options.
NewPlacement returns a ServicePlacement.
NewPlacementFromProto creates a new placement from proto.
NewPlacementsFromLatest creates Placements from latest placement.
NewPlacementsFromProto creates Placements from proto.
NewPlacementsWatcher creates a new staged placement watcher.
NewWatcherOptions create a new set of 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
Configuration is configuration for placement options.
InstanceMetadata represents the metadata for a single Instance in the placement.
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.
Mockoperations is a mock of operations interface.
MockoperationsMockRecorder is the mock recorder for Mockoperations.
MockOperator is a mock of Operator interface.
MockOperatorMockRecorder is the mock recorder for MockOperator.
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.
MockStorage is a mock of Storage interface.
MockStorageMockRecorder is the mock recorder for MockStorage.
MockWatch is a mock of Watch interface.
MockWatcher is a mock of Watcher interface.
MockWatcherMockRecorder is the mock recorder for MockWatcher.
MockWatcherOptions is a mock of WatcherOptions interface.
MockWatcherOptionsMockRecorder is the mock recorder for MockWatcherOptions.
MockWatchMockRecorder is the mock recorder for MockWatch.
Placements represents a placement that is backward compatible with the deprecated concept of staged placement.
WatcherConfiguration contains placement watcher configuration.
# Interfaces
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.
Operator is a purely in-memory version of Service; it applies placement related operations to a local copy of a placement without persisting anything to backing storage.
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.
Storage provides read and write access to placement.
Watch watches for updates of a placement.
Watcher watches for updates of the placement.
WatcherOptions provide a set of placement watcher options.
# Type aliases
ByIDAscending sorts Instance by ID ascending.
Instances is a slice of instances that can produce a debug string.
OnPlacementChangedFn is called when placement has changed in the store, or when it is loaded first time when watcher starts.
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.