Documentation ¶
Index ¶
- Constants
- func ModelExecutionStateToApiMongodState(e model.MongodExecutionState) msp.MongodState
- func ProjectReplicaSetToModelReplicaSet(r *ReplicaSet) (*model.ReplicaSet, error)
- func ProjectRiskGroupToModelRiskGroup(r *RiskGroup) (*model.RiskGroup, error)
- func ProjectShardingRoleToModelShardingRole(api ShardingRole) (out model.ShardingRole, err error)
- func ProjectSlaveToModelSlave(s *Slave) (*model.Slave, error)
- func SlaveConfiguredStateTransitioning(tx *gorm.DB, s *model.Slave) (bool, error)
- func SlaveJSONRepresentationToStruct(s string) (model.SlaveState, error)
- func SlaveStateToJSONRepresentation(s model.SlaveState) string
- type MasterAPI
- func (m *MasterAPI) KeyfileGet(w http.ResponseWriter, r *http.Request)
- func (m *MasterAPI) ManagementUserGet(w http.ResponseWriter, r *http.Request)
- func (m *MasterAPI) MongodsByReplicaSet(w http.ResponseWriter, r *http.Request)
- func (m *MasterAPI) MongodsBySlave(w http.ResponseWriter, r *http.Request)
- func (m *MasterAPI) ProblemById(w http.ResponseWriter, r *http.Request)
- func (m *MasterAPI) ProblemByReplicaSet(w http.ResponseWriter, r *http.Request)
- func (m *MasterAPI) ProblemBySlave(w http.ResponseWriter, r *http.Request)
- func (m *MasterAPI) ProblemIndex(w http.ResponseWriter, r *http.Request)
- func (m *MasterAPI) ReplicaSetById(w http.ResponseWriter, r *http.Request)
- func (m *MasterAPI) ReplicaSetDelete(w http.ResponseWriter, r *http.Request)
- func (m *MasterAPI) ReplicaSetGetSlaves(w http.ResponseWriter, r *http.Request)
- func (m *MasterAPI) ReplicaSetIndex(w http.ResponseWriter, r *http.Request)
- func (m *MasterAPI) ReplicaSetPut(w http.ResponseWriter, r *http.Request)
- func (m *MasterAPI) ReplicaSetUpdate(w http.ResponseWriter, r *http.Request)
- func (m *MasterAPI) RiskGroupAssignSlave(w http.ResponseWriter, r *http.Request)
- func (m *MasterAPI) RiskGroupById(w http.ResponseWriter, r *http.Request)
- func (m *MasterAPI) RiskGroupDelete(w http.ResponseWriter, r *http.Request)
- func (m *MasterAPI) RiskGroupGetSlaves(w http.ResponseWriter, r *http.Request)
- func (m *MasterAPI) RiskGroupIndex(w http.ResponseWriter, r *http.Request)
- func (m *MasterAPI) RiskGroupPut(w http.ResponseWriter, r *http.Request)
- func (m *MasterAPI) RiskGroupRemoveSlave(w http.ResponseWriter, r *http.Request)
- func (m *MasterAPI) RiskGroupUpdate(w http.ResponseWriter, r *http.Request)
- func (m *MasterAPI) Setup()
- func (m *MasterAPI) SlaveById(w http.ResponseWriter, r *http.Request)
- func (m *MasterAPI) SlaveDelete(w http.ResponseWriter, r *http.Request)
- func (m *MasterAPI) SlaveIndex(w http.ResponseWriter, r *http.Request)
- func (m *MasterAPI) SlavePut(w http.ResponseWriter, r *http.Request)
- func (m *MasterAPI) SlaveUpdate(w http.ResponseWriter, r *http.Request)
- type Mongod
- type MongodKeyfile
- type MongodbCredential
- type Problem
- type ReplicaSet
- type RiskGroup
- type ShardingRole
- type Slave
Constants ¶
View Source
const ( ShardingRoleNone = "none" ShardingRoleShardServer = "shardsvr" ShardingRoleConfigServer = "configsvr" )
Variables ¶
This section is empty.
Functions ¶
func ModelExecutionStateToApiMongodState ¶
func ModelExecutionStateToApiMongodState(e model.MongodExecutionState) msp.MongodState
func ProjectReplicaSetToModelReplicaSet ¶
func ProjectReplicaSetToModelReplicaSet(r *ReplicaSet) (*model.ReplicaSet, error)
func ProjectShardingRoleToModelShardingRole ¶
func ProjectShardingRoleToModelShardingRole(api ShardingRole) (out model.ShardingRole, err error)
func SlaveJSONRepresentationToStruct ¶
func SlaveJSONRepresentationToStruct(s string) (model.SlaveState, error)
func SlaveStateToJSONRepresentation ¶
func SlaveStateToJSONRepresentation(s model.SlaveState) string
Types ¶
type MasterAPI ¶
func (*MasterAPI) KeyfileGet ¶
func (m *MasterAPI) KeyfileGet(w http.ResponseWriter, r *http.Request)
func (*MasterAPI) ManagementUserGet ¶
func (m *MasterAPI) ManagementUserGet(w http.ResponseWriter, r *http.Request)
func (*MasterAPI) MongodsByReplicaSet ¶
func (m *MasterAPI) MongodsByReplicaSet(w http.ResponseWriter, r *http.Request)
func (*MasterAPI) MongodsBySlave ¶
func (m *MasterAPI) MongodsBySlave(w http.ResponseWriter, r *http.Request)
func (*MasterAPI) ProblemById ¶
func (m *MasterAPI) ProblemById(w http.ResponseWriter, r *http.Request)
func (*MasterAPI) ProblemByReplicaSet ¶
func (m *MasterAPI) ProblemByReplicaSet(w http.ResponseWriter, r *http.Request)
func (*MasterAPI) ProblemBySlave ¶
func (m *MasterAPI) ProblemBySlave(w http.ResponseWriter, r *http.Request)
func (*MasterAPI) ProblemIndex ¶
func (m *MasterAPI) ProblemIndex(w http.ResponseWriter, r *http.Request)
func (*MasterAPI) ReplicaSetById ¶
func (m *MasterAPI) ReplicaSetById(w http.ResponseWriter, r *http.Request)
func (*MasterAPI) ReplicaSetDelete ¶
func (m *MasterAPI) ReplicaSetDelete(w http.ResponseWriter, r *http.Request)
func (*MasterAPI) ReplicaSetGetSlaves ¶
func (m *MasterAPI) ReplicaSetGetSlaves(w http.ResponseWriter, r *http.Request)
func (*MasterAPI) ReplicaSetIndex ¶
func (m *MasterAPI) ReplicaSetIndex(w http.ResponseWriter, r *http.Request)
func (*MasterAPI) ReplicaSetPut ¶
func (m *MasterAPI) ReplicaSetPut(w http.ResponseWriter, r *http.Request)
func (*MasterAPI) ReplicaSetUpdate ¶
func (m *MasterAPI) ReplicaSetUpdate(w http.ResponseWriter, r *http.Request)
func (*MasterAPI) RiskGroupAssignSlave ¶
func (m *MasterAPI) RiskGroupAssignSlave(w http.ResponseWriter, r *http.Request)
func (*MasterAPI) RiskGroupById ¶
func (m *MasterAPI) RiskGroupById(w http.ResponseWriter, r *http.Request)
func (*MasterAPI) RiskGroupDelete ¶
func (m *MasterAPI) RiskGroupDelete(w http.ResponseWriter, r *http.Request)
func (*MasterAPI) RiskGroupGetSlaves ¶
func (m *MasterAPI) RiskGroupGetSlaves(w http.ResponseWriter, r *http.Request)
func (*MasterAPI) RiskGroupIndex ¶
func (m *MasterAPI) RiskGroupIndex(w http.ResponseWriter, r *http.Request)
func (*MasterAPI) RiskGroupPut ¶
func (m *MasterAPI) RiskGroupPut(w http.ResponseWriter, r *http.Request)
func (*MasterAPI) RiskGroupRemoveSlave ¶
func (m *MasterAPI) RiskGroupRemoveSlave(w http.ResponseWriter, r *http.Request)
func (*MasterAPI) RiskGroupUpdate ¶
func (m *MasterAPI) RiskGroupUpdate(w http.ResponseWriter, r *http.Request)
func (*MasterAPI) SlaveDelete ¶
func (m *MasterAPI) SlaveDelete(w http.ResponseWriter, r *http.Request)
func (*MasterAPI) SlaveIndex ¶
func (m *MasterAPI) SlaveIndex(w http.ResponseWriter, r *http.Request)
func (*MasterAPI) SlaveUpdate ¶
func (m *MasterAPI) SlaveUpdate(w http.ResponseWriter, r *http.Request)
type Mongod ¶
type Mongod struct { ID int64 `json:"id"` Port uint `json:"slave_port"` ReplicaSetID int64 `json:"replica_set_id"` ParentSlaveID int64 `json:"parent_slave_id"` ObservedExecutionState string `json:"observed_execution_state"` }
type MongodKeyfile ¶
type MongodKeyfile struct {
Content string `json:"content"`
}
func ProjectModelMongodKeyfileToAPIMongodKeyfile ¶
func ProjectModelMongodKeyfileToAPIMongodKeyfile(m model.MongodKeyfile) (out MongodKeyfile)
type MongodbCredential ¶
type MongodbCredential struct { Username string `json:"username"` Password string `json:"password"` }
func ProjectModelMongodbCredentialToAPIMongodbCredential ¶
func ProjectModelMongodbCredentialToAPIMongodbCredential(m model.MongodbCredential) (out MongodbCredential)
type Problem ¶
type Problem struct { ID int64 `json:"id"` Description string `json:"description"` LongDescription string `json:"long_description"` FirstOccurred time.Time `json:"first_occurred"` LastUpdated time.Time `json:"last_updated"` SlaveId *int64 `json:"slave_id"` ReplicaSetId *int64 `json:"replica_set_id"` }
type ReplicaSet ¶
type ReplicaSet struct { ID int64 `json:"id"` Name string `json:"name"` PersistentNodeCount uint `json:"persistent_node_count"` VolatileNodeCount uint `json:"volatile_node_count"` ShardingRole ShardingRole `json:"sharding_role"` }
func ProjectModelReplicaSetToReplicaSet ¶
func ProjectModelReplicaSetToReplicaSet(m *model.ReplicaSet) *ReplicaSet
type RiskGroup ¶
type ShardingRole ¶
type ShardingRole string
func ProjectModelShardingRoleToShardingRole ¶
func ProjectModelShardingRoleToShardingRole(modelRole model.ShardingRole) (out ShardingRole, err error)
type Slave ¶
type Slave struct { ID int64 `json:"id"` Hostname string `json:"hostname"` Port uint `json:"slave_port"` MongodPortRangeBegin uint `json:"mongod_port_range_begin"` //inclusive MongodPortRangeEnd uint `json:"mongod_port_range_end"` //exclusive PersistentStorage bool `json:"persistent_storage"` ConfiguredState string `json:"configured_state"` ConfiguredStateTransitioning bool `json:"configured_state_transitioning"` RiskGroupID *int64 `json:"risk_group_id"` }
Click to show internal directories.
Click to hide internal directories.