Documentation ¶
Index ¶
- func NewInstanceSelector(opts placement.Options) placement.InstanceSelector
- func NewMirroredCustomGroupSelector(instanceToGroupID InstanceGroupIDFunc, opts placement.Options) placement.InstanceSelector
- func NewNonMirroredSelector(opts placement.Options) placement.InstanceSelector
- func NewPortMirroredSelector(opts placement.Options) placement.InstanceSelector
- type InstanceGroupIDFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewInstanceSelector ¶
func NewInstanceSelector(opts placement.Options) placement.InstanceSelector
NewInstanceSelector creates an instance selector.
func NewMirroredCustomGroupSelector ¶ added in v0.15.0
func NewMirroredCustomGroupSelector( instanceToGroupID InstanceGroupIDFunc, opts placement.Options, ) placement.InstanceSelector
NewMirroredCustomGroupSelector constructs a placement.InstanceSelector which assigns shardsets according to their group ID (provided by instanceToGroupID). That is, instances with the same group ID are assigned the same shardset ID, and will receive the same mirrored traffic.
func NewNonMirroredSelector ¶ added in v0.15.0
func NewNonMirroredSelector(opts placement.Options) placement.InstanceSelector
NewNonMirroredSelector constructs an instance selector which doesn't mirror traffic (no shardsets) and which takes into account existing shard placement and instance weight in order to choose instances.
func NewPortMirroredSelector ¶ added in v0.15.0
func NewPortMirroredSelector(opts placement.Options) placement.InstanceSelector
NewPortMirroredSelector returns a placement.InstanceSelector which creates groups of instances by their port number and assigns a shardset to each group, taking isolation groups into account while creating groups. This is the default behavior used by NewInstanceSelector if IsMirrored is true.
Types ¶
type InstanceGroupIDFunc ¶ added in v0.15.0
InstanceGroupIDFunc maps an instance to its mirrored group.
func NewMapInstanceGroupIDFunc ¶ added in v0.15.0
func NewMapInstanceGroupIDFunc(instanceToGroup map[string]string) InstanceGroupIDFunc
NewMapInstanceGroupIDFunc creates a simple lookup function for an instances group, which looks up the group ID for an instance by the instance ID.