assigner

package
v0.21.0 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2023 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
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

func HasReplica(s *Slice, resource string) bool

func Replicas

func Replicas(s *Slice) []string

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 running replica sets.
	ReplicaSetIds []*ReplicaSetId `protobuf:"bytes,1,rep,name=replica_set_ids,json=replicaSetIds,proto3" json:"replica_set_ids,omitempty"`
	// contains filtered or unexported fields
}

AppState stores the state for a single Service Weaver application.

func (*AppState) Descriptor deprecated

func (*AppState) Descriptor() ([]byte, []int)

Deprecated: Use AppState.ProtoReflect.Descriptor instead.

func (*AppState) GetReplicaSetIds added in v0.2.0

func (x *AppState) GetReplicaSetIds() []*ReplicaSetId

func (*AppState) ProtoMessage

func (*AppState) ProtoMessage()

func (*AppState) ProtoReflect

func (x *AppState) ProtoReflect() protoreflect.Message

func (*AppState) Reset

func (x *AppState) Reset()

func (*AppState) String

func (x *AppState) String() string

type AppVersionState

type AppVersionState struct {

	// The set of activated ReplicaSets, keyed by their name.
	ReplicaSets map[string]*ReplicaSetState `` /* 182-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) GetReplicaSets added in v0.2.0

func (x *AppVersionState) GetReplicaSets() map[string]*ReplicaSetState

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 Kubernetes ReplicaSets.

In the current implementation, the assigner generates new routing information when (1) new sharded components become managed by the ReplicaSet and/or when (2) the ReplicaSet has new Pods.

func NewAssigner

func NewAssigner(
	ctx context.Context,
	store store.Store,
	logger *slog.Logger,
	algo Algorithm,
	babysitterConstructor func(cfg *config.GKEConfig, replicaSet, addr string) (endpoints.Babysitter, error),
	replicaExists func(context.Context, string) (bool, error)) *Assigner

func (*Assigner) GetComponentsToStart

func (a *Assigner) GetComponentsToStart(req *nanny.GetComponentsRequest) (
	*nanny.GetComponentsReply, error)

func (*Assigner) GetReplicaSetState added in v0.2.0

func (a *Assigner) GetReplicaSetState(ctx context.Context, req *nanny.GetReplicaSetStateRequest) (*nanny.ReplicaSetState, error)

GetReplicaSetState returns the state of all Kubernetes ReplicaSets for an application version or a collection of applications and their versions.

func (*Assigner) GetRoutingInfo

func (a *Assigner) GetRoutingInfo(req *nanny.GetRoutingRequest) (*nanny.GetRoutingReply, error)

func (*Assigner) OnNewLoadReport

func (a *Assigner) OnNewLoadReport(ctx context.Context, req *nanny.LoadReport) error

OnNewLoadReport handles a new load report received from a replica.

func (*Assigner) RegisterActiveComponent added in v0.2.0

func (a *Assigner) RegisterActiveComponent(ctx context.Context, req *nanny.ActivateComponentRequest) error

RegisterActiveComponent registers the given component has been activated. It returns the name of the Kubernetes ReplicaSet that should host the component.

func (*Assigner) RegisterListener

func (a *Assigner) RegisterListener(ctx context.Context, req *nanny.ExportListenerRequest) error

func (*Assigner) RegisterReplica

func (a *Assigner) RegisterReplica(ctx context.Context, req *nanny.RegisterReplicaRequest) error

func (*Assigner) UnregisterReplicaSets added in v0.2.0

func (a *Assigner) UnregisterReplicaSets(ctx context.Context, app string, versions []*config.GKEConfig) error

UnregisterReplicaSets unregisters all Kubernetes ReplicaSets for the given application versions.

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 {
	Version            uint64           `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"`
	Slices             []*Slice         `protobuf:"bytes,2,rep,name=slices,proto3" json:"slices,omitempty"`
	CandidateResources map[string]bool  `` /* 204-byte string literal not displayed */
	Constraints        *AlgoConstraints `protobuf:"bytes,4,opt,name=constraints,proto3" json:"constraints,omitempty"`
	Stats              *Statistics      `protobuf:"bytes,5,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) GetCandidateResources

func (x *Assignment) GetCandidateResources() map[string]bool

func (*Assignment) GetConstraints

func (x *Assignment) GetConstraints() *AlgoConstraints

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 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 Pod added in v0.2.0

type Pod struct {
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // Pod's unique name
	// Address of babysitter that manages the replica.
	BabysitterAddress string `protobuf:"bytes,2,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,3,opt,name=health_status,json=healthStatus,proto3,enum=runtime.HealthStatus" json:"health_status,omitempty"`
	// contains filtered or unexported fields
}

Pod contains information for a Pod that hosts the weavelet.

func (*Pod) Descriptor deprecated added in v0.2.0

func (*Pod) Descriptor() ([]byte, []int)

Deprecated: Use Pod.ProtoReflect.Descriptor instead.

func (*Pod) GetBabysitterAddress added in v0.2.0

func (x *Pod) GetBabysitterAddress() string

func (*Pod) GetHealthStatus added in v0.2.0

func (x *Pod) GetHealthStatus() protos.HealthStatus

func (*Pod) GetName added in v0.2.0

func (x *Pod) GetName() string

func (*Pod) ProtoMessage added in v0.2.0

func (*Pod) ProtoMessage()

func (*Pod) ProtoReflect added in v0.2.0

func (x *Pod) ProtoReflect() protoreflect.Message

func (*Pod) Reset added in v0.2.0

func (x *Pod) Reset()

func (*Pod) String added in v0.2.0

func (x *Pod) String() string

type ReplicaSetId added in v0.2.0

type ReplicaSetId struct {
	Config    *config.GKEConfig `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"`                         // config for the replica set
	Name      string            `protobuf:"bytes,2,opt,name=Name,proto3" json:"Name,omitempty"`                             // replica set name (e.g., Cache)
	HasRouted bool              `protobuf:"varint,3,opt,name=has_routed,json=hasRouted,proto3" json:"has_routed,omitempty"` // replica set hosts a routed component?
	// contains filtered or unexported fields
}

ReplicaSetId uniquely identifies a Kubernetes ReplicaSet.

func (*ReplicaSetId) Descriptor deprecated added in v0.2.0

func (*ReplicaSetId) Descriptor() ([]byte, []int)

Deprecated: Use ReplicaSetId.ProtoReflect.Descriptor instead.

func (*ReplicaSetId) GetConfig added in v0.18.0

func (x *ReplicaSetId) GetConfig() *config.GKEConfig

func (*ReplicaSetId) GetHasRouted added in v0.18.3

func (x *ReplicaSetId) GetHasRouted() bool

func (*ReplicaSetId) GetName added in v0.2.0

func (x *ReplicaSetId) GetName() string

func (*ReplicaSetId) ProtoMessage added in v0.2.0

func (*ReplicaSetId) ProtoMessage()

func (*ReplicaSetId) ProtoReflect added in v0.2.0

func (x *ReplicaSetId) ProtoReflect() protoreflect.Message

func (*ReplicaSetId) Reset added in v0.2.0

func (x *ReplicaSetId) Reset()

func (*ReplicaSetId) String added in v0.2.0

func (x *ReplicaSetId) String() string

type ReplicaSetInfo added in v0.2.0

type ReplicaSetInfo 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"`
	// Routed components and their assignments
	Components map[string]*Assignment `` /* 161-byte string literal not displayed */
	// Pods in the replica set, keyed by weavelet address.
	Pods map[string]*Pod `` /* 149-byte string literal not displayed */
	// Network listeners exported by the ReplicaSet, if any.
	Listeners []string `protobuf:"bytes,4,rep,name=listeners,proto3" json:"listeners,omitempty"`
	// contains filtered or unexported fields
}

ReplicaSetInfo contains information for each Kubernetes ReplicaSet that requires routing.

func (*ReplicaSetInfo) Descriptor deprecated added in v0.2.0

func (*ReplicaSetInfo) Descriptor() ([]byte, []int)

Deprecated: Use ReplicaSetInfo.ProtoReflect.Descriptor instead.

func (*ReplicaSetInfo) GetComponents added in v0.2.0

func (x *ReplicaSetInfo) GetComponents() map[string]*Assignment

func (*ReplicaSetInfo) GetListeners added in v0.2.0

func (x *ReplicaSetInfo) GetListeners() []string

func (*ReplicaSetInfo) GetPods added in v0.2.0

func (x *ReplicaSetInfo) GetPods() map[string]*Pod

func (*ReplicaSetInfo) GetVersion added in v0.2.0

func (x *ReplicaSetInfo) GetVersion() uint64

func (*ReplicaSetInfo) ProtoMessage added in v0.2.0

func (*ReplicaSetInfo) ProtoMessage()

func (*ReplicaSetInfo) ProtoReflect added in v0.2.0

func (x *ReplicaSetInfo) ProtoReflect() protoreflect.Message

func (*ReplicaSetInfo) Reset added in v0.2.0

func (x *ReplicaSetInfo) Reset()

func (*ReplicaSetInfo) String added in v0.2.0

func (x *ReplicaSetInfo) String() string

type ReplicaSetState added in v0.2.0

type ReplicaSetState struct {
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// Set of activated components in the ReplicaSet, along with their routing
	// status (i.e., whether a component is routed).
	Components map[string]bool `` /* 162-byte string literal not displayed */
	// Addresses of weavelets that run inside the ReplicaSet.
	WeaveletAddrs []string `protobuf:"bytes,3,rep,name=weavelet_addrs,json=weaveletAddrs,proto3" json:"weavelet_addrs,omitempty"`
	// Network listeners exported by the ReplicaSet, if any.
	Listeners []string `protobuf:"bytes,4,rep,name=listeners,proto3" json:"listeners,omitempty"`
	// contains filtered or unexported fields
}

ReplicaSetState stores information about a Kubernetes ReplicaSet, i.e., a set of Pods that host the same set of components.

func (*ReplicaSetState) Descriptor deprecated added in v0.2.0

func (*ReplicaSetState) Descriptor() ([]byte, []int)

Deprecated: Use ReplicaSetState.ProtoReflect.Descriptor instead.

func (*ReplicaSetState) GetComponents added in v0.2.0

func (x *ReplicaSetState) GetComponents() map[string]bool

func (*ReplicaSetState) GetListeners added in v0.2.0

func (x *ReplicaSetState) GetListeners() []string

func (*ReplicaSetState) GetName added in v0.2.0

func (x *ReplicaSetState) GetName() string

func (*ReplicaSetState) GetWeaveletAddrs added in v0.2.0

func (x *ReplicaSetState) GetWeaveletAddrs() []string

func (*ReplicaSetState) ProtoMessage added in v0.2.0

func (*ReplicaSetState) ProtoMessage()

func (*ReplicaSetState) ProtoReflect added in v0.2.0

func (x *ReplicaSetState) ProtoReflect() protoreflect.Message

func (*ReplicaSetState) Reset added in v0.2.0

func (x *ReplicaSetState) Reset()

func (*ReplicaSetState) String added in v0.2.0

func (x *ReplicaSetState) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use Slice.ProtoReflect.Descriptor instead.

func (*Slice) GetEndExclusive

func (x *Slice) GetEndExclusive() *SliceKey

func (*Slice) GetLoadInfo

func (x *Slice) GetLoadInfo() *LoadTracker

func (*Slice) GetStartInclusive

func (x *Slice) GetStartInclusive() *SliceKey

func (*Slice) ProtoMessage

func (*Slice) ProtoMessage()

func (*Slice) ProtoReflect

func (x *Slice) ProtoReflect() protoreflect.Message

func (*Slice) Reset

func (x *Slice) Reset()

func (*Slice) String

func (x *Slice) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use SliceKey.ProtoReflect.Descriptor instead.

func (*SliceKey) GetVal

func (x *SliceKey) GetVal() uint64

func (*SliceKey) ProtoMessage

func (*SliceKey) ProtoMessage()

func (*SliceKey) ProtoReflect

func (x *SliceKey) ProtoReflect() protoreflect.Message

func (*SliceKey) Reset

func (x *SliceKey) Reset()

func (*SliceKey) String

func (x *SliceKey) String() string

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"`
	// Addresses of the healthy weavelets in the ReplicaSet.
	WeaveletAddrs []string `protobuf:"bytes,2,rep,name=weavelet_addrs,json=weaveletAddrs,proto3" json:"weavelet_addrs,omitempty"`
	// Routing assignments (without load), keyed by component name.
	Assignments map[string]*protos.Assignment `` /* 163-byte string literal not displayed */
	// contains filtered or unexported fields
}

VersionedRoutingInfo stores a versioned RoutingInfo for a Kubernetes ReplicaSet. The version should be a version of a written ReplicaSetInfo, and the info should be derived from ReplicaSetInfo. Versions should only ever increase over time. TODO(mwhittaker): See if there is a need to have this separate struct.

func (*VersionedRoutingInfo) Descriptor deprecated

func (*VersionedRoutingInfo) Descriptor() ([]byte, []int)

Deprecated: Use VersionedRoutingInfo.ProtoReflect.Descriptor instead.

func (*VersionedRoutingInfo) GetAssignments added in v0.2.0

func (x *VersionedRoutingInfo) GetAssignments() map[string]*protos.Assignment

func (*VersionedRoutingInfo) GetVersion

func (x *VersionedRoutingInfo) GetVersion() uint64

func (*VersionedRoutingInfo) GetWeaveletAddrs added in v0.2.0

func (x *VersionedRoutingInfo) GetWeaveletAddrs() []string

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

Jump to

Keyboard shortcuts

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