Documentation
¶
Index ¶
- Constants
- Variables
- type Cluster
- type Failover
- func (f *Failover) AddNode(ns, cluster string, shardIdx int, node metadata.NodeInfo, typ int) error
- func (f *Failover) AddNodeTask(task *storage.FailoverTask) error
- func (f *Failover) GetTasks(ctx context.Context, ns, cluster string, queryType string) ([]*storage.FailoverTask, error)
- func (f *Failover) Load() error
- func (f *Failover) Shutdown()
Constants ¶
View Source
const ( TaskQueued = iota + 1 TaskStarted TaskSuccess TaskFailed )
View Source
const ( AutoType = iota + 1 ManualType )
Variables ¶
View Source
var ( // PingInterval stands ping period, at least more than double ProbeInterval PingInterval = 6 MaxPingCount = 2 // MinAliveSize is min number of cluster nodes to enter the safe mode MinAliveSize = 10 // MaxFailureRatio is gate value, more than clusters failed enter the safe mode MaxFailureRatio = 0.4 GCInterval = 1 )
Functions ¶
This section is empty.
Types ¶
type Cluster ¶
type Cluster struct {
// contains filtered or unexported fields
}
func NewCluster ¶
NewCluster return a Cluster instance and start schedule goroutine
func (*Cluster) IsEmpty ¶
IsEmpty return an indicator whether the tasks queue has tasks, callend gcClusters
func (*Cluster) RemoveNodeTask ¶
Click to show internal directories.
Click to hide internal directories.