package
1.9.2
Repository: https://github.com/kubevela/pkg.git
Documentation: pkg.go.dev

# Functions

AddControllerFlags add sharding controller flags.
AddFlags add sharding flags.
AddSchedulerFlags add sharding scheduler flags.
BuildCache add shard-id label selector for given typed object.
BuildCacheWithOptions add shard-id label selector to sharding objects with options.
DelScheduledShardID delete shard-id from target object.
GetScheduledShardID return the scheduled shard-id of the object and if it is scheduled.
GetShardIDSuffix return suffix for shard id if enabled.
IsMaster check if current instance is master.
NewDynamicDiscoveryScheduler create a scheduler that allow dynamic discovery for available shards.
NewStaticScheduler create a scheduler that do not make update but only use predefined shards for allocate.
PropagateScheduledShardIDLabel copy the shard-id from source obj to target obj, remove if not exist.
SetScheduledShardID set shard-id to target object.

# Constants

LabelKubeVelaScheduledShardID label key for identify the scheduled shard id for the resource.
LabelKubeVelaShardID label key for identify the shard id for the controller.
MasterShardID the master shard id.

# Variables

DefaultScheduler default scheduler.
DynamicDiscoverySchedulerResyncPeriod resync period for default dynamic discovery scheduler.
EnableSharding whether enable sharding.
SchedulableShards the shards for schedule.
ShardID the id of the shard.

# Interfaces

Scheduler schedule shard-id for object.