Documentation ¶
Index ¶
- Variables
- func AssignedResources(a *Assignment) []string
- func HasReplica(s *Slice, resource string) bool
- func Replicas(s *Slice) []string
- type AlgoConstraints
- func (*AlgoConstraints) Descriptor() ([]byte, []int)deprecated
- func (x *AlgoConstraints) GetDereplicateThreshold() float64
- func (x *AlgoConstraints) GetMaxLoadLimitResource() float64
- func (x *AlgoConstraints) GetMaxNumSlicesResourceHint() int64
- func (x *AlgoConstraints) GetMinLoadLimitResource() float64
- func (x *AlgoConstraints) GetReplicateThreshold() float64
- func (x *AlgoConstraints) GetSplitThreshold() float64
- func (*AlgoConstraints) ProtoMessage()
- func (x *AlgoConstraints) ProtoReflect() protoreflect.Message
- func (x *AlgoConstraints) Reset()
- func (x *AlgoConstraints) String() string
- type Algorithm
- type AppState
- type AppVersionState
- func (*AppVersionState) Descriptor() ([]byte, []int)deprecated
- func (x *AppVersionState) GetGroups() map[string]*ColocationGroupState
- func (*AppVersionState) ProtoMessage()
- func (x *AppVersionState) ProtoReflect() protoreflect.Message
- func (x *AppVersionState) Reset()
- func (x *AppVersionState) String() string
- type Assigner
- func (a *Assigner) GetComponentsToStart(req *protos.GetComponentsToStart) (*protos.ComponentsToStart, error)
- func (a *Assigner) GetGroupState(ctx context.Context, req *nanny.GroupStateRequest) (*nanny.GroupState, error)
- func (a *Assigner) GetRoutingInfo(req *protos.GetRoutingInfo) (*protos.RoutingInfo, error)
- func (a *Assigner) OnNewLoadReport(ctx context.Context, req *protos.WeaveletLoadReport) error
- func (a *Assigner) RegisterComponentToStart(ctx context.Context, req *protos.ComponentToStart) error
- func (a *Assigner) RegisterListener(ctx context.Context, dep *protos.Deployment, group *protos.ColocationGroup, ...) error
- func (a *Assigner) RegisterReplica(ctx context.Context, req *nanny.ReplicaToRegister) error
- func (a *Assigner) UnregisterGroups(ctx context.Context, app string, versions []string) error
- type AssignerState
- type Assignment
- func (*Assignment) Descriptor() ([]byte, []int)deprecated
- func (x *Assignment) GetApp() string
- func (x *Assignment) GetCandidateResources() map[string]bool
- func (x *Assignment) GetComponent() string
- func (x *Assignment) GetConstraints() *AlgoConstraints
- func (x *Assignment) GetDeploymentId() string
- func (x *Assignment) GetSlices() []*Slice
- func (x *Assignment) GetStats() *Statistics
- func (x *Assignment) GetVersion() uint64
- func (*Assignment) ProtoMessage()
- func (x *Assignment) ProtoReflect() protoreflect.Message
- func (x *Assignment) Reset()
- func (x *Assignment) String() string
- type ColocationGroupState
- func (*ColocationGroupState) Descriptor() ([]byte, []int)deprecated
- func (x *ColocationGroupState) GetComponents() map[string]bool
- func (x *ColocationGroupState) GetListeners() []*protos.Listener
- func (x *ColocationGroupState) GetName() string
- func (x *ColocationGroupState) GetReplicas() []string
- func (*ColocationGroupState) ProtoMessage()
- func (x *ColocationGroupState) ProtoReflect() protoreflect.Message
- func (x *ColocationGroupState) Reset()
- func (x *ColocationGroupState) String() string
- type GroupId
- func (*GroupId) Descriptor() ([]byte, []int)deprecated
- func (x *GroupId) GetApp() string
- func (x *GroupId) GetGroup() string
- func (x *GroupId) GetId() string
- func (*GroupId) ProtoMessage()
- func (x *GroupId) ProtoReflect() protoreflect.Message
- func (x *GroupId) Reset()
- func (x *GroupId) String() string
- type GroupInfo
- func (*GroupInfo) Descriptor() ([]byte, []int)deprecated
- func (x *GroupInfo) GetComponents() map[string]*Assignment
- func (x *GroupInfo) GetListeners() []*protos.Listener
- func (x *GroupInfo) GetReplicas() map[string]*Replica
- func (x *GroupInfo) GetVersion() uint64
- func (*GroupInfo) ProtoMessage()
- func (x *GroupInfo) ProtoReflect() protoreflect.Message
- func (x *GroupInfo) Reset()
- func (x *GroupInfo) String() string
- type LoadTracker
- func (*LoadTracker) Descriptor() ([]byte, []int)deprecated
- func (x *LoadTracker) GetDistribution() map[uint64]float64
- func (x *LoadTracker) GetPerResourceLoad() float64
- func (x *LoadTracker) GetResources() map[string]bool
- func (*LoadTracker) ProtoMessage()
- func (x *LoadTracker) ProtoReflect() protoreflect.Message
- func (x *LoadTracker) Reset()
- func (x *LoadTracker) String() string
- type Replica
- func (*Replica) Descriptor() ([]byte, []int)deprecated
- func (x *Replica) GetBabysitterAddress() string
- func (x *Replica) GetHealthStatus() protos.HealthStatus
- func (x *Replica) GetPodName() string
- func (*Replica) ProtoMessage()
- func (x *Replica) ProtoReflect() protoreflect.Message
- func (x *Replica) Reset()
- func (x *Replica) String() string
- type Slice
- func (*Slice) Descriptor() ([]byte, []int)deprecated
- func (x *Slice) GetEndExclusive() *SliceKey
- func (x *Slice) GetLoadInfo() *LoadTracker
- func (x *Slice) GetStartInclusive() *SliceKey
- func (*Slice) ProtoMessage()
- func (x *Slice) ProtoReflect() protoreflect.Message
- func (x *Slice) Reset()
- func (x *Slice) String() string
- type SliceKey
- type Statistics
- func (*Statistics) Descriptor() ([]byte, []int)deprecated
- func (x *Statistics) GetDereplicateOps() int64
- func (x *Statistics) GetMergeOps() int64
- func (x *Statistics) GetMoveDueToBalanceOps() int64
- func (x *Statistics) GetMoveDueToUnhealthyOps() int64
- func (x *Statistics) GetReplicateOps() int64
- func (x *Statistics) GetSplitOps() int64
- func (*Statistics) ProtoMessage()
- func (x *Statistics) ProtoReflect() protoreflect.Message
- func (x *Statistics) Reset()
- func (x *Statistics) String() string
- type VersionedRoutingInfo
- func (*VersionedRoutingInfo) Descriptor() ([]byte, []int)deprecated
- func (x *VersionedRoutingInfo) GetInfo() *protos.RoutingInfo
- func (x *VersionedRoutingInfo) GetVersion() uint64
- func (*VersionedRoutingInfo) ProtoMessage()
- func (x *VersionedRoutingInfo) ProtoReflect() protoreflect.Message
- func (x *VersionedRoutingInfo) Reset()
- func (x *VersionedRoutingInfo) String() string
Constants ¶
This section is empty.
Variables ¶
var File_internal_nanny_assigner_assigner_proto protoreflect.FileDescriptor
Functions ¶
func AssignedResources ¶
func AssignedResources(a *Assignment) []string
AssignedResources returns all the resources assigned to the entire key space in a given assignment.
func HasReplica ¶
Types ¶
type AlgoConstraints ¶
type AlgoConstraints struct { // Upper bound on the load allowed on any resource. MaxLoadLimitResource float64 `` /* 127-byte string literal not displayed */ // Lower bound on the load allowed on any resource. MinLoadLimitResource float64 `` /* 127-byte string literal not displayed */ // Any slice with replica load above this threshold should be split to enable // the algo to move slices around, in order to provide load balancing // guarantees. SplitThreshold float64 `protobuf:"fixed64,3,opt,name=split_threshold,json=splitThreshold,proto3" json:"split_threshold,omitempty"` // Any slice with replica load above this threshold should be replicated to // enable the algo to move slices around, in order to provide load balancing // guarantees. // // In practice, this threshold should be set to a value equal to or higher // than the splitThreshold, because it is preferred for a slice to be split // first. // // Also, a good algorithm should replicate a slice iff the slice has a single // key; otherwise splitting is always preferred because it incurs less churn. ReplicateThreshold float64 `protobuf:"fixed64,4,opt,name=replicate_threshold,json=replicateThreshold,proto3" json:"replicate_threshold,omitempty"` // Any slice with replica load below this threshold should be dereplicated if // the number of replicas is greater than 1. // // Dereplication creates more opportunities for merging slices, hence // controlling the assignment size. DereplicateThreshold float64 `protobuf:"fixed64,5,opt,name=dereplicate_threshold,json=dereplicateThreshold,proto3" json:"dereplicate_threshold,omitempty"` // Maximum number of slices a resource should be assigned in a given // assignment. Note that this is just a hint, because in reality the algorithm // might not be able to provide a hard guarantee. // // The role of this constraint is to ensure that the number of slices in an // assignment is bounded. MaxNumSlicesResourceHint int64 `` /* 140-byte string literal not displayed */ // contains filtered or unexported fields }
AlgoConstraints contains various constraints needed by the routing algos to generate assignments.
func (*AlgoConstraints) Descriptor
deprecated
func (*AlgoConstraints) Descriptor() ([]byte, []int)
Deprecated: Use AlgoConstraints.ProtoReflect.Descriptor instead.
func (*AlgoConstraints) GetDereplicateThreshold ¶
func (x *AlgoConstraints) GetDereplicateThreshold() float64
func (*AlgoConstraints) GetMaxLoadLimitResource ¶
func (x *AlgoConstraints) GetMaxLoadLimitResource() float64
func (*AlgoConstraints) GetMaxNumSlicesResourceHint ¶
func (x *AlgoConstraints) GetMaxNumSlicesResourceHint() int64
func (*AlgoConstraints) GetMinLoadLimitResource ¶
func (x *AlgoConstraints) GetMinLoadLimitResource() float64
func (*AlgoConstraints) GetReplicateThreshold ¶
func (x *AlgoConstraints) GetReplicateThreshold() float64
func (*AlgoConstraints) GetSplitThreshold ¶
func (x *AlgoConstraints) GetSplitThreshold() float64
func (*AlgoConstraints) ProtoMessage ¶
func (*AlgoConstraints) ProtoMessage()
func (*AlgoConstraints) ProtoReflect ¶
func (x *AlgoConstraints) ProtoReflect() protoreflect.Message
func (*AlgoConstraints) Reset ¶
func (x *AlgoConstraints) Reset()
func (*AlgoConstraints) String ¶
func (x *AlgoConstraints) String() string
type Algorithm ¶
type Algorithm func(currAssignment *Assignment) (*Assignment, error)
Algorithm takes the current assignment, and returns a new assignment. The returned assignment should have a larger version than the current assignment.
type AppState ¶
type AppState struct { // The list of app's active colocation groups . GroupIds []*GroupId `protobuf:"bytes,1,rep,name=group_ids,json=groupIds,proto3" json:"group_ids,omitempty"` // contains filtered or unexported fields }
AppState stores the state for a single Service Weaver application.
func (*AppState) Descriptor
deprecated
func (*AppState) GetGroupIds ¶ added in v0.1.3
func (*AppState) ProtoMessage ¶
func (*AppState) ProtoMessage()
func (*AppState) ProtoReflect ¶
func (x *AppState) ProtoReflect() protoreflect.Message
type AppVersionState ¶
type AppVersionState struct { Groups map[string]*ColocationGroupState `` // per group information /* 153-byte string literal not displayed */ // contains filtered or unexported fields }
AppVersionState contains state managed for an application version by the assigner.
func (*AppVersionState) Descriptor
deprecated
func (*AppVersionState) Descriptor() ([]byte, []int)
Deprecated: Use AppVersionState.ProtoReflect.Descriptor instead.
func (*AppVersionState) GetGroups ¶
func (x *AppVersionState) GetGroups() map[string]*ColocationGroupState
func (*AppVersionState) ProtoMessage ¶
func (*AppVersionState) ProtoMessage()
func (*AppVersionState) ProtoReflect ¶
func (x *AppVersionState) ProtoReflect() protoreflect.Message
func (*AppVersionState) Reset ¶
func (x *AppVersionState) Reset()
func (*AppVersionState) String ¶
func (x *AppVersionState) String() string
type Assigner ¶
type Assigner struct {
// contains filtered or unexported fields
}
Assigner generates routing information for a set of managed colocation groups.
In the current implementation, the assigner generates new routing information when (1) new sharded components are managed by the group and/or when (2) the group has new replicas.
TODO(rgrandl): ensure correctness when multiple Assigner instances may try to generate routing information at the same time.
func NewAssigner ¶
func (*Assigner) GetComponentsToStart ¶
func (a *Assigner) GetComponentsToStart(req *protos.GetComponentsToStart) ( *protos.ComponentsToStart, error)
func (*Assigner) GetGroupState ¶ added in v0.1.3
func (a *Assigner) GetGroupState(ctx context.Context, req *nanny.GroupStateRequest) (*nanny.GroupState, error)
GetGroupState returns the state of all groups for an application version or a collection of applications and their versions.
func (*Assigner) GetRoutingInfo ¶
func (a *Assigner) GetRoutingInfo(req *protos.GetRoutingInfo) (*protos.RoutingInfo, error)
func (*Assigner) OnNewLoadReport ¶
OnNewLoadReport handles a new load report received from a replica.
func (*Assigner) RegisterComponentToStart ¶
func (*Assigner) RegisterListener ¶
func (a *Assigner) RegisterListener(ctx context.Context, dep *protos.Deployment, group *protos.ColocationGroup, lis *protos.Listener) error
func (*Assigner) RegisterReplica ¶
type AssignerState ¶
type AssignerState struct { Applications []string `protobuf:"bytes,1,rep,name=applications,proto3" json:"applications,omitempty"` // contains filtered or unexported fields }
AssignerState stores the assigners' state.
func (*AssignerState) Descriptor
deprecated
func (*AssignerState) Descriptor() ([]byte, []int)
Deprecated: Use AssignerState.ProtoReflect.Descriptor instead.
func (*AssignerState) GetApplications ¶
func (x *AssignerState) GetApplications() []string
func (*AssignerState) ProtoMessage ¶
func (*AssignerState) ProtoMessage()
func (*AssignerState) ProtoReflect ¶
func (x *AssignerState) ProtoReflect() protoreflect.Message
func (*AssignerState) Reset ¶
func (x *AssignerState) Reset()
func (*AssignerState) String ¶
func (x *AssignerState) String() string
type Assignment ¶
type Assignment struct { App string `protobuf:"bytes,1,opt,name=app,proto3" json:"app,omitempty"` DeploymentId string `protobuf:"bytes,2,opt,name=deploymentId,proto3" json:"deploymentId,omitempty"` Component string `protobuf:"bytes,3,opt,name=component,proto3" json:"component,omitempty"` Version uint64 `protobuf:"varint,4,opt,name=version,proto3" json:"version,omitempty"` Slices []*Slice `protobuf:"bytes,5,rep,name=slices,proto3" json:"slices,omitempty"` CandidateResources map[string]bool `` /* 204-byte string literal not displayed */ Constraints *AlgoConstraints `protobuf:"bytes,7,opt,name=constraints,proto3" json:"constraints,omitempty"` Stats *Statistics `protobuf:"bytes,8,opt,name=stats,proto3" json:"stats,omitempty"` // contains filtered or unexported fields }
Assignment is a wrapper class that creates and decodes assignment protos.
func EqualDistributionAlgorithm ¶
func EqualDistributionAlgorithm(currAssignment *Assignment) (*Assignment, error)
EqualDistributionAlgorithm is an implementation of a sharding algorithm that distributes the entire key space approximately equally across all healthy resources.
The algorithm is as follows: - split the entire key space in a number of slices that is more likely to spread uniformly the key space among all healthy resources
- distribute the slices round robin across all healthy resources
func FromProto ¶
func FromProto(assignmentP *protos.Assignment) (*Assignment, error)
FromProto returns an assignment from an assignment proto.
func LoadBasedAlgorithm ¶
func LoadBasedAlgorithm(currAssignment *Assignment) (*Assignment, error)
LoadBasedAlgorithm is an implementation of a sharding algorithm that attempts to minimize the maximum load on any given resource.
func (*Assignment) Descriptor
deprecated
func (*Assignment) Descriptor() ([]byte, []int)
Deprecated: Use Assignment.ProtoReflect.Descriptor instead.
func (*Assignment) GetApp ¶
func (x *Assignment) GetApp() string
func (*Assignment) GetCandidateResources ¶
func (x *Assignment) GetCandidateResources() map[string]bool
func (*Assignment) GetComponent ¶
func (x *Assignment) GetComponent() string
func (*Assignment) GetConstraints ¶
func (x *Assignment) GetConstraints() *AlgoConstraints
func (*Assignment) GetDeploymentId ¶
func (x *Assignment) GetDeploymentId() string
func (*Assignment) GetSlices ¶
func (x *Assignment) GetSlices() []*Slice
func (*Assignment) GetStats ¶
func (x *Assignment) GetStats() *Statistics
func (*Assignment) GetVersion ¶
func (x *Assignment) GetVersion() uint64
func (*Assignment) ProtoMessage ¶
func (*Assignment) ProtoMessage()
func (*Assignment) ProtoReflect ¶
func (x *Assignment) ProtoReflect() protoreflect.Message
func (*Assignment) Reset ¶
func (x *Assignment) Reset()
func (*Assignment) String ¶
func (x *Assignment) String() string
type ColocationGroupState ¶
type ColocationGroupState struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // Set of components that a colocation group in a given deployment // should be running, along with their routing status (whether a component is // routed). Components map[string]bool `` /* 162-byte string literal not displayed */ // List of replica addresses for the colocation group. Replicas []string `protobuf:"bytes,3,rep,name=replicas,proto3" json:"replicas,omitempty"` // Network listeners exported by the colocation group, if any. Listeners []*protos.Listener `protobuf:"bytes,4,rep,name=listeners,proto3" json:"listeners,omitempty"` // contains filtered or unexported fields }
func (*ColocationGroupState) Descriptor
deprecated
func (*ColocationGroupState) Descriptor() ([]byte, []int)
Deprecated: Use ColocationGroupState.ProtoReflect.Descriptor instead.
func (*ColocationGroupState) GetComponents ¶ added in v0.1.3
func (x *ColocationGroupState) GetComponents() map[string]bool
func (*ColocationGroupState) GetListeners ¶ added in v0.1.3
func (x *ColocationGroupState) GetListeners() []*protos.Listener
func (*ColocationGroupState) GetName ¶ added in v0.1.3
func (x *ColocationGroupState) GetName() string
func (*ColocationGroupState) GetReplicas ¶ added in v0.1.3
func (x *ColocationGroupState) GetReplicas() []string
func (*ColocationGroupState) ProtoMessage ¶
func (*ColocationGroupState) ProtoMessage()
func (*ColocationGroupState) ProtoReflect ¶
func (x *ColocationGroupState) ProtoReflect() protoreflect.Message
func (*ColocationGroupState) Reset ¶
func (x *ColocationGroupState) Reset()
func (*ColocationGroupState) String ¶
func (x *ColocationGroupState) String() string
type GroupId ¶ added in v0.1.3
type GroupId struct { App string `protobuf:"bytes,1,opt,name=App,proto3" json:"App,omitempty"` // Service Weaver application (e.g., todo) Id string `protobuf:"bytes,2,opt,name=Id,proto3" json:"Id,omitempty"` // deployment id (e.g., bb6b3172) Group string `protobuf:"bytes,3,opt,name=Group,proto3" json:"Group,omitempty"` // colocation group name (e.g., Cache) // contains filtered or unexported fields }
GroupId uniquely identifies a colocation group.
func (*GroupId) Descriptor
deprecated
added in
v0.1.3
func (*GroupId) ProtoMessage ¶ added in v0.1.3
func (*GroupId) ProtoMessage()
func (*GroupId) ProtoReflect ¶ added in v0.1.3
func (x *GroupId) ProtoReflect() protoreflect.Message
type GroupInfo ¶ added in v0.1.3
type GroupInfo struct { // Every time (1) the set of replica changes, or (2) the set of healthy // replicas changes, or (3) any assignment changes, a GroupInfo's version // should be incremented. An assignment's load may change without incrementing // the version. // // This version is used to avoid races between writing a GroupInfo and // writing the corresponding RoutingInfo. Version uint64 `protobuf:"varint,3,opt,name=version,proto3" json:"version,omitempty"` Components map[string]*Assignment `` // routed components and their assignments /* 161-byte string literal not displayed */ Replicas map[string]*Replica `` // replicas, keyed by weavelet address /* 157-byte string literal not displayed */ // Network listeners exported by the colocation group, if any. Listeners []*protos.Listener `protobuf:"bytes,4,rep,name=listeners,proto3" json:"listeners,omitempty"` // contains filtered or unexported fields }
GroupInfo contains information for each managed colocation group.
func (*GroupInfo) Descriptor
deprecated
added in
v0.1.3
func (*GroupInfo) GetComponents ¶ added in v0.1.3
func (x *GroupInfo) GetComponents() map[string]*Assignment
func (*GroupInfo) GetListeners ¶ added in v0.1.3
func (*GroupInfo) GetReplicas ¶ added in v0.1.3
func (*GroupInfo) GetVersion ¶ added in v0.1.3
func (*GroupInfo) ProtoMessage ¶ added in v0.1.3
func (*GroupInfo) ProtoMessage()
func (*GroupInfo) ProtoReflect ¶ added in v0.1.3
func (x *GroupInfo) ProtoReflect() protoreflect.Message
type LoadTracker ¶
type LoadTracker struct { // Slice load on a given resource. PerResourceLoad float64 `protobuf:"fixed64,1,opt,name=per_resource_load,json=perResourceLoad,proto3" json:"per_resource_load,omitempty"` // Resources to which the slice is assigned. Resources map[string]bool `` /* 160-byte string literal not displayed */ // Distribution of the load along split points. Distribution map[uint64]float64 `` /* 168-byte string literal not displayed */ // contains filtered or unexported fields }
loadTracker tracks load information for a given slice across all the assigned resources.
Note that for a replicated slice (len(resources) > 1):
- perResourceload contains the total load as reported by the latest resource that has the slice assigned
- distribution contains the load distribution along split points for the given replica
Most of the slices will have a single replica; ideally, only hot keys should be replicated. Given that our load metric is req/s it is fair to assume that the load is evenly distributed across the replicas of a slice, hence the load, and the load distribution for a given replica should be representative for all replicas. Otherwise, it is challenging for the weavelets to report exactly the same split points for all replicas, and challenging for the assigner to compute split points that make sense across all replicas.
TODO(rgrandl): mwhittaker@ has an interesting idea. Instead of taking the latest load report, we take the load report with the largest number of requests received. That way if a resource was down for some reason or lagging behind in an assignment and reports an almost empty load report, we won't use it.
TODO(rgrandl): revisit these decisions if we ever decide to support a different load metric.
func (*LoadTracker) Descriptor
deprecated
func (*LoadTracker) Descriptor() ([]byte, []int)
Deprecated: Use LoadTracker.ProtoReflect.Descriptor instead.
func (*LoadTracker) GetDistribution ¶
func (x *LoadTracker) GetDistribution() map[uint64]float64
func (*LoadTracker) GetPerResourceLoad ¶
func (x *LoadTracker) GetPerResourceLoad() float64
func (*LoadTracker) GetResources ¶
func (x *LoadTracker) GetResources() map[string]bool
func (*LoadTracker) ProtoMessage ¶
func (*LoadTracker) ProtoMessage()
func (*LoadTracker) ProtoReflect ¶
func (x *LoadTracker) ProtoReflect() protoreflect.Message
func (*LoadTracker) Reset ¶
func (x *LoadTracker) Reset()
func (*LoadTracker) String ¶
func (x *LoadTracker) String() string
type Replica ¶
type Replica struct { // Name of Pod that hosts the replica. PodName string `protobuf:"bytes,3,opt,name=pod_name,json=podName,proto3" json:"pod_name,omitempty"` // Address of babysitter that manages the replica. BabysitterAddress string `protobuf:"bytes,1,opt,name=babysitter_address,json=babysitterAddress,proto3" json:"babysitter_address,omitempty"` // Is the replica healthy? Note that every assigner individually decides the // health status of every replica. When an assigner writes a GroupInfo, it // also records the set of replicas it thought were healthy. HealthStatus protos.HealthStatus `protobuf:"varint,2,opt,name=health_status,json=healthStatus,proto3,enum=runtime.HealthStatus" json:"health_status,omitempty"` // contains filtered or unexported fields }
Replica contains information for a single replica (aka weavelet).
func (*Replica) Descriptor
deprecated
func (*Replica) GetBabysitterAddress ¶
func (*Replica) GetHealthStatus ¶
func (x *Replica) GetHealthStatus() protos.HealthStatus
func (*Replica) GetPodName ¶
func (*Replica) ProtoMessage ¶
func (*Replica) ProtoMessage()
func (*Replica) ProtoReflect ¶
func (x *Replica) ProtoReflect() protoreflect.Message
type Slice ¶
type Slice struct { StartInclusive *SliceKey `protobuf:"bytes,1,opt,name=start_inclusive,json=startInclusive,proto3" json:"start_inclusive,omitempty"` EndExclusive *SliceKey `protobuf:"bytes,2,opt,name=end_exclusive,json=endExclusive,proto3" json:"end_exclusive,omitempty"` LoadInfo *LoadTracker `protobuf:"bytes,3,opt,name=load_info,json=loadInfo,proto3" json:"load_info,omitempty"` // contains filtered or unexported fields }
Slice contains the allocation of a key range to a set of resources.
The range covers [startInclusive, endExclusive).
func (*Slice) Descriptor
deprecated
func (*Slice) GetEndExclusive ¶
func (*Slice) GetLoadInfo ¶
func (x *Slice) GetLoadInfo() *LoadTracker
func (*Slice) GetStartInclusive ¶
func (*Slice) ProtoMessage ¶
func (*Slice) ProtoMessage()
func (*Slice) ProtoReflect ¶
func (x *Slice) ProtoReflect() protoreflect.Message
type SliceKey ¶
type SliceKey struct { Val uint64 `protobuf:"varint,1,opt,name=val,proto3" json:"val,omitempty"` // contains filtered or unexported fields }
SliceKey is an abstraction for keys used in slices.
func (*SliceKey) Descriptor
deprecated
func (*SliceKey) ProtoMessage ¶
func (*SliceKey) ProtoMessage()
func (*SliceKey) ProtoReflect ¶
func (x *SliceKey) ProtoReflect() protoreflect.Message
type Statistics ¶
type Statistics struct { SplitOps int64 `protobuf:"varint,1,opt,name=splitOps,proto3" json:"splitOps,omitempty"` MergeOps int64 `protobuf:"varint,2,opt,name=mergeOps,proto3" json:"mergeOps,omitempty"` ReplicateOps int64 `protobuf:"varint,3,opt,name=replicateOps,proto3" json:"replicateOps,omitempty"` DereplicateOps int64 `protobuf:"varint,4,opt,name=dereplicateOps,proto3" json:"dereplicateOps,omitempty"` MoveDueToBalanceOps int64 `protobuf:"varint,5,opt,name=moveDueToBalanceOps,proto3" json:"moveDueToBalanceOps,omitempty"` MoveDueToUnhealthyOps int64 `protobuf:"varint,6,opt,name=moveDueToUnhealthyOps,proto3" json:"moveDueToUnhealthyOps,omitempty"` // contains filtered or unexported fields }
Statistics contains various statistics for a given assignment.
func (*Statistics) Descriptor
deprecated
func (*Statistics) Descriptor() ([]byte, []int)
Deprecated: Use Statistics.ProtoReflect.Descriptor instead.
func (*Statistics) GetDereplicateOps ¶
func (x *Statistics) GetDereplicateOps() int64
func (*Statistics) GetMergeOps ¶
func (x *Statistics) GetMergeOps() int64
func (*Statistics) GetMoveDueToBalanceOps ¶
func (x *Statistics) GetMoveDueToBalanceOps() int64
func (*Statistics) GetMoveDueToUnhealthyOps ¶
func (x *Statistics) GetMoveDueToUnhealthyOps() int64
func (*Statistics) GetReplicateOps ¶
func (x *Statistics) GetReplicateOps() int64
func (*Statistics) GetSplitOps ¶
func (x *Statistics) GetSplitOps() int64
func (*Statistics) ProtoMessage ¶
func (*Statistics) ProtoMessage()
func (*Statistics) ProtoReflect ¶
func (x *Statistics) ProtoReflect() protoreflect.Message
func (*Statistics) Reset ¶
func (x *Statistics) Reset()
func (*Statistics) String ¶
func (x *Statistics) String() string
type VersionedRoutingInfo ¶
type VersionedRoutingInfo struct { Version uint64 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"` Info *protos.RoutingInfo `protobuf:"bytes,2,opt,name=info,proto3" json:"info,omitempty"` // contains filtered or unexported fields }
VersionedRoutingInfo stores a versioned RoutingInfo. The version should be a version of a written GroupInfo, and the info should be derived from GroupInfo. Versions should only every increase over time.
func (*VersionedRoutingInfo) Descriptor
deprecated
func (*VersionedRoutingInfo) Descriptor() ([]byte, []int)
Deprecated: Use VersionedRoutingInfo.ProtoReflect.Descriptor instead.
func (*VersionedRoutingInfo) GetInfo ¶
func (x *VersionedRoutingInfo) GetInfo() *protos.RoutingInfo
func (*VersionedRoutingInfo) GetVersion ¶
func (x *VersionedRoutingInfo) GetVersion() uint64
func (*VersionedRoutingInfo) ProtoMessage ¶
func (*VersionedRoutingInfo) ProtoMessage()
func (*VersionedRoutingInfo) ProtoReflect ¶
func (x *VersionedRoutingInfo) ProtoReflect() protoreflect.Message
func (*VersionedRoutingInfo) Reset ¶
func (x *VersionedRoutingInfo) Reset()
func (*VersionedRoutingInfo) String ¶
func (x *VersionedRoutingInfo) String() string