master

package
v0.0.0-...-67ae82b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 11, 2016 License: MIT Imports: 11 Imported by: 2

Documentation

Index

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 NewBus

func NewBus() *Bus

func (*Bus) GetNewReadChannel

func (b *Bus) GetNewReadChannel() <-chan interface{}

func (*Bus) GetNewWriteChannel

func (b *Bus) GetNewWriteChannel() chan<- interface{}

func (*Bus) Kill

func (b *Bus) Kill()

func (*Bus) Run

func (b *Bus) Run()

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

type Deployer struct {
	DB             *DB
	MSPClient      msp.MSPClient
	BusReadChannel <-chan interface{}
}

Listens on the bus for state mismatches and tries to solve them by pushing the desired state to the Mongod

func (*Deployer) Run

func (d *Deployer) Run()

type Monitor

type Monitor struct {
	DB              *model.DB
	BusWriteChannel chan<- interface{}
	MSPClient       msp.MSPClient
	Interval        time.Duration
}

func (*Monitor) Run

func (m *Monitor) Run()

type ProblemManager

type ProblemManager struct {
	DB             *model.DB
	BusReadChannel <-chan interface{}
}

func (*ProblemManager) Run

func (p *ProblemManager) Run()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL