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 (x *AppVersionState) GetProcesses() map[string]*ProcessState
- 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) GetProcessState(ctx context.Context, req *nanny.ProcessStateRequest) (*nanny.ProcessState, error)
- func (a *Assigner) GetProcessesToStart(req *protos.GetProcessesToStartRequest) (*protos.GetProcessesToStartReply, 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, req *protos.ListenerToExport) error
- func (a *Assigner) RegisterReplica(ctx context.Context, req *nanny.ReplicaToRegister) error
- func (a *Assigner) UnregisterProcesses(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) GetProcesses() []string
- func (*ColocationGroupState) ProtoMessage()
- func (x *ColocationGroupState) ProtoReflect() protoreflect.Message
- func (x *ColocationGroupState) Reset()
- func (x *ColocationGroupState) 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 ProcessId
- func (*ProcessId) Descriptor() ([]byte, []int)deprecated
- func (x *ProcessId) GetApp() string
- func (x *ProcessId) GetId() string
- func (x *ProcessId) GetProcess() string
- func (*ProcessId) ProtoMessage()
- func (x *ProcessId) ProtoReflect() protoreflect.Message
- func (x *ProcessId) Reset()
- func (x *ProcessId) String() string
- type ProcessInfo
- func (*ProcessInfo) Descriptor() ([]byte, []int)deprecated
- func (x *ProcessInfo) GetComponents() map[string]*Assignment
- func (x *ProcessInfo) GetListeners() []*protos.Listener
- func (x *ProcessInfo) GetReplicas() map[string]*Replica
- func (x *ProcessInfo) GetVersion() uint64
- func (*ProcessInfo) ProtoMessage()
- func (x *ProcessInfo) ProtoReflect() protoreflect.Message
- func (x *ProcessInfo) Reset()
- func (x *ProcessInfo) String() string
- type ProcessState
- func (*ProcessState) Descriptor() ([]byte, []int)deprecated
- func (x *ProcessState) GetComponents() map[string]bool
- func (x *ProcessState) GetListeners() []*protos.Listener
- func (x *ProcessState) GetReplicas() []string
- func (*ProcessState) ProtoMessage()
- func (x *ProcessState) ProtoReflect() protoreflect.Message
- func (x *ProcessState) Reset()
- func (x *ProcessState) 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 { // pids stores the pid of every active process of every version of this app. Pids []*ProcessId `protobuf:"bytes,1,rep,name=pids,proto3" json:"pids,omitempty"` // contains filtered or unexported fields }
AppState stores the state for a single Service Weaver application.
func (*AppState) Descriptor
deprecated
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 */ Processes map[string]*ProcessState `` // per process information /* 159-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) GetProcesses ¶
func (x *AppVersionState) GetProcesses() map[string]*ProcessState
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 processes.
In the current implementation, the assigner generates new routing information when (1) new sharded components are managed by the process and/or when (2) the process 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) GetProcessState ¶
func (a *Assigner) GetProcessState(ctx context.Context, req *nanny.ProcessStateRequest) (*nanny.ProcessState, error)
GetProcessState returns the state of all processes for an application version or a collection of applications and their versions.
func (*Assigner) GetProcessesToStart ¶
func (a *Assigner) GetProcessesToStart(req *protos.GetProcessesToStartRequest) ( *protos.GetProcessesToStartReply, error)
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 (*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 { // It contains the set of processes that a colocation group in a given // deployment should be running. Processes []string `protobuf:"bytes,1,rep,name=processes,proto3" json:"processes,omitempty"` // contains filtered or unexported fields }
func (*ColocationGroupState) Descriptor
deprecated
func (*ColocationGroupState) Descriptor() ([]byte, []int)
Deprecated: Use ColocationGroupState.ProtoReflect.Descriptor instead.
func (*ColocationGroupState) GetProcesses ¶
func (x *ColocationGroupState) GetProcesses() []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 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 ProcessId ¶
type ProcessId 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) Process string `protobuf:"bytes,3,opt,name=Process,proto3" json:"Process,omitempty"` // process name (e.g., Cache) // contains filtered or unexported fields }
ProcessId uniquely identifies a process.
func (*ProcessId) Descriptor
deprecated
func (*ProcessId) GetProcess ¶
func (*ProcessId) ProtoMessage ¶
func (*ProcessId) ProtoMessage()
func (*ProcessId) ProtoReflect ¶
func (x *ProcessId) ProtoReflect() protoreflect.Message
type ProcessInfo ¶
type ProcessInfo struct { // Every time (1) the set of replica changes, or (2) the set of healthy // replicas changes, or (3) any assignment changes, a ProcessInfo'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 ProcessInfo 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 process, if any. Listeners []*protos.Listener `protobuf:"bytes,4,rep,name=listeners,proto3" json:"listeners,omitempty"` // contains filtered or unexported fields }
ProcessInfo contains information for each managed process.
func (*ProcessInfo) Descriptor
deprecated
func (*ProcessInfo) Descriptor() ([]byte, []int)
Deprecated: Use ProcessInfo.ProtoReflect.Descriptor instead.
func (*ProcessInfo) GetComponents ¶
func (x *ProcessInfo) GetComponents() map[string]*Assignment
func (*ProcessInfo) GetListeners ¶
func (x *ProcessInfo) GetListeners() []*protos.Listener
func (*ProcessInfo) GetReplicas ¶
func (x *ProcessInfo) GetReplicas() map[string]*Replica
func (*ProcessInfo) GetVersion ¶
func (x *ProcessInfo) GetVersion() uint64
func (*ProcessInfo) ProtoMessage ¶
func (*ProcessInfo) ProtoMessage()
func (*ProcessInfo) ProtoReflect ¶
func (x *ProcessInfo) ProtoReflect() protoreflect.Message
func (*ProcessInfo) Reset ¶
func (x *ProcessInfo) Reset()
func (*ProcessInfo) String ¶
func (x *ProcessInfo) String() string
type ProcessState ¶
type ProcessState struct { // It contains the set of components that a process 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 */ // It contains the list of replica addresses for the process. Replicas []string `protobuf:"bytes,2,rep,name=replicas,proto3" json:"replicas,omitempty"` // Network listeners exported by the process, if any. Listeners []*protos.Listener `protobuf:"bytes,3,rep,name=listeners,proto3" json:"listeners,omitempty"` // contains filtered or unexported fields }
func (*ProcessState) Descriptor
deprecated
func (*ProcessState) Descriptor() ([]byte, []int)
Deprecated: Use ProcessState.ProtoReflect.Descriptor instead.
func (*ProcessState) GetComponents ¶
func (x *ProcessState) GetComponents() map[string]bool
func (*ProcessState) GetListeners ¶
func (x *ProcessState) GetListeners() []*protos.Listener
func (*ProcessState) GetReplicas ¶
func (x *ProcessState) GetReplicas() []string
func (*ProcessState) ProtoMessage ¶
func (*ProcessState) ProtoMessage()
func (*ProcessState) ProtoReflect ¶
func (x *ProcessState) ProtoReflect() protoreflect.Message
func (*ProcessState) Reset ¶
func (x *ProcessState) Reset()
func (*ProcessState) String ¶
func (x *ProcessState) 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 ProcessInfo, 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 ProcessInfo, and the info should be derived from that ProcessInfo. 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