Documentation ¶
Index ¶
- Constants
- func DesiredMSPReplicaSetMembersForReplicaSetID(tx *gorm.DB, replicaSetID int64) (replicaSetMembers []msp.ReplicaSetMember, initiator Mongod, err error)
- func MSPReplicaSetMembersDeepEqualsIgnoringOrder(a, b []msp.ReplicaSetMember) (equal bool)
- func MongodStatesEquivalent(a, b model.MongodState) (e bool)
- func MspMongodStateToModelExecutionState(e msp.MongodState) model.MongodExecutionState
- func ProjectMSPShardingRoleToModelShardingRole(r msp.ShardingRole) (out model.ShardingRole, err error)
- func ProjectModelMongodbCredentialToMSPMongodCredential(m model.MongodbCredential) msp.MongodCredential
- func ProjectModelShardingRoleToMSPShardingRole(r model.ShardingRole) (out msp.ShardingRole, err error)
- func ReplicaSetMembersEquivalent(a, b msp.ReplicaSetMember) bool
- type Bus
- type ClusterAllocator
- type Deployer
- type Monitor
- type ProblemManager
Constants ¶
View Source
const ( Persistent persistence = 0 Volatile persistence = 1 )
View Source
const ( ReplicaSetMemberPriorityVolatile float64 = 500 ReplicaSetMemberPriorityPersistent float64 = 10 ReplicaSetMemberPriorityToBeRemoved float64 = 1 ReplicaSetMemberPriorityNone float64 = 0 )
View Source
const MamidManagementUsername = "mamid"
Variables ¶
This section is empty.
Functions ¶
func DesiredMSPReplicaSetMembersForReplicaSetID ¶
func DesiredMSPReplicaSetMembersForReplicaSetID(tx *gorm.DB, replicaSetID int64) (replicaSetMembers []msp.ReplicaSetMember, initiator Mongod, err error)
Return the list of msp.HostPort a model.ReplicaSet should have as members Calculates priorities and selects voting members
func MSPReplicaSetMembersDeepEqualsIgnoringOrder ¶
func MSPReplicaSetMembersDeepEqualsIgnoringOrder(a, b []msp.ReplicaSetMember) (equal bool)
Deep-equals of two _sets_ (=> lists without order) of msp.ReplicaSetMembers
func MongodStatesEquivalent ¶
func MongodStatesEquivalent(a, b model.MongodState) (e bool)
check if MongodStates are equivalent with regards to monitored attributes
func MspMongodStateToModelExecutionState ¶
func MspMongodStateToModelExecutionState(e msp.MongodState) model.MongodExecutionState
func ProjectMSPShardingRoleToModelShardingRole ¶
func ProjectMSPShardingRoleToModelShardingRole(r msp.ShardingRole) (out model.ShardingRole, err error)
func ProjectModelMongodbCredentialToMSPMongodCredential ¶
func ProjectModelMongodbCredentialToMSPMongodCredential(m model.MongodbCredential) msp.MongodCredential
func ProjectModelShardingRoleToMSPShardingRole ¶
func ProjectModelShardingRoleToMSPShardingRole(r model.ShardingRole) (out msp.ShardingRole, err error)
func ReplicaSetMembersEquivalent ¶
func ReplicaSetMembersEquivalent(a, b msp.ReplicaSetMember) bool
Types ¶
type Bus ¶
type Bus struct {
// contains filtered or unexported fields
}
func (*Bus) GetNewReadChannel ¶
func (b *Bus) GetNewReadChannel() <-chan interface{}
func (*Bus) GetNewWriteChannel ¶
func (b *Bus) GetNewWriteChannel() chan<- interface{}
type ClusterAllocator ¶
type ClusterAllocator struct {
BusWriteChannel *chan<- interface{}
}
func (*ClusterAllocator) CompileMongodLayout ¶
func (c *ClusterAllocator) CompileMongodLayout(tx *gorm.DB) (err error)
func (*ClusterAllocator) InitializeGlobalSecrets ¶
func (c *ClusterAllocator) InitializeGlobalSecrets(tx *gorm.DB) (err error)
func (*ClusterAllocator) Run ¶
func (c *ClusterAllocator) Run(db *DB)
type Deployer ¶
Listens on the bus for state mismatches and tries to solve them by pushing the desired state to the Mongod
type Monitor ¶
type ProblemManager ¶
func (*ProblemManager) Run ¶
func (p *ProblemManager) Run()
Source Files ¶
Click to show internal directories.
Click to hide internal directories.