Documentation ¶
Index ¶
- func Default(replicasNumber uint64, existingIndexes []uint64, clusterSize uint64, ...) ([]uint64, []uint64, []uint64)
- func Specific(replicasNumber uint64, existingIndexes []uint64, nodes []uint64, member uint64) ([]uint64, []uint64, []uint64)
- func Uniform(replicasNumber uint64, existingIndexes []uint64, clusterSize uint64, ...) ([]uint64, []uint64, []uint64)
- type DistributedReplicas
- func (dr *DistributedReplicas) Clear(node uint64)
- func (dr *DistributedReplicas) FromJson(data []byte) error
- func (dr *DistributedReplicas) Load(client *client.Client, user *authentication.User) error
- func (dr *DistributedReplicas) Save(client *client.Client, user *authentication.User) error
- func (dr *DistributedReplicas) ToJson() ([]byte, error)
- type Numbers
- type R
- type Replicas
- func (replicas *Replicas) GetReplica(shared *shared.Shared, user *authentication.User, ...) ([]R, error)
- func (replicas *Replicas) GetReplicaNumbers(dr *DistributedReplicas, spread v1.ContainerSpread, replicasNumber uint64, ...) ([]uint64, []uint64, []uint64)
- func (replicas *Replicas) HandleReplica(shared *shared.Shared, user *authentication.User, clstr []string, ...) (*DistributedReplicas, error)
- type ScopedReplicas
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DistributedReplicas ¶
type DistributedReplicas struct { Group string Name string Replicas map[uint64]*ScopedReplicas }
func NewDistributed ¶
func NewDistributed(nodeID uint64, group string, name string) *DistributedReplicas
func (*DistributedReplicas) Clear ¶
func (dr *DistributedReplicas) Clear(node uint64)
func (*DistributedReplicas) FromJson ¶
func (dr *DistributedReplicas) FromJson(data []byte) error
func (*DistributedReplicas) Load ¶
func (dr *DistributedReplicas) Load(client *client.Client, user *authentication.User) error
func (*DistributedReplicas) Save ¶
func (dr *DistributedReplicas) Save(client *client.Client, user *authentication.User) error
func (*DistributedReplicas) ToJson ¶
func (dr *DistributedReplicas) ToJson() ([]byte, error)
type Replicas ¶
type Replicas struct { Group string GeneratedIndex uint64 ExistingIndexes []uint64 Replicas uint64 Changed bool Spread v1.ContainerSpread NodeID uint64 }
func (*Replicas) GetReplica ¶
func (replicas *Replicas) GetReplica(shared *shared.Shared, user *authentication.User, containerDefinition v1.ContainerDefinition, clstr []string) ([]R, error)
func (*Replicas) GetReplicaNumbers ¶
func (replicas *Replicas) GetReplicaNumbers(dr *DistributedReplicas, spread v1.ContainerSpread, replicasNumber uint64, existingIndexes []uint64, clusterSize uint64) ([]uint64, []uint64, []uint64)
func (*Replicas) HandleReplica ¶
func (replicas *Replicas) HandleReplica(shared *shared.Shared, user *authentication.User, clstr []string, containerDefinition *v1.ContainerDefinition, changelog diff.Changelog) (*DistributedReplicas, error)
type ScopedReplicas ¶
func NewScoped ¶
func NewScoped() *ScopedReplicas
func (*ScopedReplicas) Add ¶
func (sr *ScopedReplicas) Add(group string, name string)
func (*ScopedReplicas) Delete ¶
func (sr *ScopedReplicas) Delete(group string, name string)
Click to show internal directories.
Click to hide internal directories.