Versions in this module Expand all Collapse all v0 v0.1.0 Mar 12, 2021 Changes in this version + var DefaultContainerLimit = ContainerLimit + var DefaultSchedulers = SchedulerConfigs + func IsDefaultScheduler(typ string) bool + func IsSchedulerRegistered(name string) bool + func IsSupportedTTLConfig(key string) bool + func RegisterScheduler(typ string) + func ValidateLabels(labels []metapb.Pair) error + func ValidateURLWithScheme(rawURL string) error + type Config struct + Adapter metadata.Adapter + DataDir string + DisableResponse bool + DisableStrictReconfigCheck bool + EmbedEtcd EmbedEtcdConfig + ExternalEtcd []string + Handler metadata.RoleChangeHandler + LabelProperty LabelPropertyConfig + LeaderLease int64 + Name string + RPCAddr string + RPCTimeout typeutil.Duration + Replication ReplicationConfig + Schedule ScheduleConfig + StorageNode bool + func NewConfig() *Config + func NewConfigWithFile(file string) (*Config, error) + func (c *Config) Adjust(meta *toml.MetaData, reloading bool) error + func (c *Config) GenEmbedEtcdConfig() (*embed.Config, error) + func (c *Config) Validate() error + type ContainerLabel struct + Key string + Value string + type ContainerLimit struct + AddPeer float64 + RemovePeer float64 + func (sl *ContainerLimit) GetDefaultContainerLimit(typ limit.Type) float64 + func (sl *ContainerLimit) SetDefaultContainerLimit(typ limit.Type, ratePerMin float64) + type ContainerLimitConfig struct + AddPeer float64 + RemovePeer float64 + type EmbedEtcdConfig struct + AdvertiseClientUrls string + AdvertisePeerUrls string + AutoCompactionMode string + AutoCompactionRetention string + ClientUrls string + ElectionInterval typeutil.Duration + InitialCluster string + InitialClusterState string + Join string + PeerUrls string + PreVote bool + QuotaBackendBytes typeutil.ByteSize + TickInterval typeutil.Duration + type LabelPropertyConfig map[string][]ContainerLabel + func (c LabelPropertyConfig) Clone() LabelPropertyConfig + type PersistOptions struct + func NewPersistOptions(cfg *Config) *PersistOptions + func NewTestOptions() *PersistOptions + func (o *PersistOptions) AddSchedulerCfg(tp string, args []string) + func (o *PersistOptions) CASClusterVersion(old, new *semver.Version) bool + func (o *PersistOptions) CheckLabelProperty(typ string, labels []metapb.Pair) bool + func (o *PersistOptions) DeleteLabelProperty(typ, labelKey, labelValue string) + func (o *PersistOptions) GetAllContainersLimit() map[uint64]ContainerLimitConfig + func (o *PersistOptions) GetClusterVersion() *semver.Version + func (o *PersistOptions) GetContainerLimit(containerID uint64) (returnSC ContainerLimitConfig) + func (o *PersistOptions) GetContainerLimitByType(containerID uint64, typ limit.Type) (returned float64) + func (o *PersistOptions) GetContainerLimitMode() string + func (o *PersistOptions) GetHighSpaceRatio() float64 + func (o *PersistOptions) GetHotResourceCacheHitsThreshold() int + func (o *PersistOptions) GetHotResourceScheduleLimit() uint64 + func (o *PersistOptions) GetIsolationLevel() string + func (o *PersistOptions) GetLabelPropertyConfig() LabelPropertyConfig + func (o *PersistOptions) GetLeaderScheduleLimit() uint64 + func (o *PersistOptions) GetLeaderSchedulePolicy() core.SchedulePolicy + func (o *PersistOptions) GetLocationLabels() []string + func (o *PersistOptions) GetLowSpaceRatio() float64 + func (o *PersistOptions) GetMaxContainerDownTime() time.Duration + func (o *PersistOptions) GetMaxMergeResourceKeys() uint64 + func (o *PersistOptions) GetMaxMergeResourceSize() uint64 + func (o *PersistOptions) GetMaxPendingPeerCount() uint64 + func (o *PersistOptions) GetMaxReplicas() int + func (o *PersistOptions) GetMaxSnapshotCount() uint64 + func (o *PersistOptions) GetMergeScheduleLimit() uint64 + func (o *PersistOptions) GetPatrolResourceInterval() time.Duration + func (o *PersistOptions) GetReplicaScheduleLimit() uint64 + func (o *PersistOptions) GetReplicationConfig() *ReplicationConfig + func (o *PersistOptions) GetResourceScheduleLimit() uint64 + func (o *PersistOptions) GetResourceScoreFormulaVersion() string + func (o *PersistOptions) GetScheduleConfig() *ScheduleConfig + func (o *PersistOptions) GetSchedulerMaxWaitingOperator() uint64 + func (o *PersistOptions) GetSchedulers() SchedulerConfigs + func (o *PersistOptions) GetSplitMergeInterval() time.Duration + func (o *PersistOptions) GetStrictlyMatchLabel() bool + func (o *PersistOptions) GetTolerantSizeRatio() float64 + func (o *PersistOptions) IsCrossTableMergeEnabled() bool + func (o *PersistOptions) IsDebugMetricsEnabled() bool + func (o *PersistOptions) IsLocationReplacementEnabled() bool + func (o *PersistOptions) IsMakeUpReplicaEnabled() bool + func (o *PersistOptions) IsOneWayMergeEnabled() bool + func (o *PersistOptions) IsPlacementRulesEnabled() bool + func (o *PersistOptions) IsRemoveDownReplicaEnabled() bool + func (o *PersistOptions) IsRemoveExtraReplicaEnabled() bool + func (o *PersistOptions) IsReplaceOfflineReplicaEnabled() bool + func (o *PersistOptions) IsUseJointConsensus() bool + func (o *PersistOptions) Persist(storage storage.Storage) error + func (o *PersistOptions) SetAllContainersLimit(typ limit.Type, ratePerMin float64) + func (o *PersistOptions) SetClusterVersion(v *semver.Version) + func (o *PersistOptions) SetContainerLimit(containerID uint64, typ limit.Type, ratePerMin float64) + func (o *PersistOptions) SetEnableJointConsensus(enableJointConsensus bool) + func (o *PersistOptions) SetLabelProperty(typ, labelKey, labelValue string) + func (o *PersistOptions) SetLabelPropertyConfig(cfg LabelPropertyConfig) + func (o *PersistOptions) SetMaxReplicas(replicas int) + func (o *PersistOptions) SetPlacementRuleEnabled(enabled bool) + func (o *PersistOptions) SetReplicationConfig(cfg *ReplicationConfig) + func (o *PersistOptions) SetScheduleConfig(cfg *ScheduleConfig) + func (o *PersistOptions) SetSplitMergeInterval(splitMergeInterval time.Duration) + type ReplicationConfig struct + EnablePlacementRules bool + IsolationLevel string + LocationLabels typeutil.StringSlice + MaxReplicas uint64 + StrictlyMatchLabel bool + func (c *ReplicationConfig) Clone() *ReplicationConfig + func (c *ReplicationConfig) Validate() error + type ScheduleConfig struct + ContainerLimit map[uint64]ContainerLimitConfig + ContainerLimitMode string + EnableCrossTableMerge bool + EnableDebugMetrics bool + EnableJointConsensus bool + EnableLocationReplacement bool + EnableMakeUpReplica bool + EnableOneWayMerge bool + EnableRemoveDownReplica bool + EnableRemoveExtraReplica bool + EnableReplaceOfflineReplica bool + HighSpaceRatio float64 + HotResourceCacheHitsThreshold uint64 + HotResourceScheduleLimit uint64 + LeaderScheduleLimit uint64 + LeaderSchedulePolicy string + LowSpaceRatio float64 + MaxContainerDownTime typeutil.Duration + MaxMergeResourceKeys uint64 + MaxMergeResourceSize uint64 + MaxPendingPeerCount uint64 + MaxSnapshotCount uint64 + MergeScheduleLimit uint64 + PatrolResourceInterval typeutil.Duration + ReplicaScheduleLimit uint64 + ResourceScheduleLimit uint64 + ResourceScoreFormulaVersion string + SchedulerMaxWaitingOperator uint64 + Schedulers SchedulerConfigs + SchedulersPayload map[string]interface{} + SplitMergeInterval typeutil.Duration + TolerantSizeRatio float64 + func (c *ScheduleConfig) Clone() *ScheduleConfig + func (c *ScheduleConfig) Validate() error + type SchedulerConfig struct + Args []string + ArgsPayload string + Disable bool + Type string + type SchedulerConfigs []SchedulerConfig