Documentation ¶
Index ¶
- Constants
- func EnableMongoDBAuth(content string) string
- func GenDefaultCreateServiceRequest(platform string, region string, azs []string, cluster string, service string, ...) (*manage.CreateServiceRequest, error)
- func GenDefaultInitTaskRequest(req *manage.ServiceCommonRequest, logConfig *cloudlog.LogConfig, ...) *containersvc.RunTaskOptions
- func GenInitTaskEnvKVPairs(region string, cluster string, service string, replSetName string, ...) []*common.EnvKeyValuePair
- func GenReplicaConfigs(platform string, azs []string, cluster string, service string, replicas int64, ...) ([]*manage.ReplicaConfig, error)
- func IsAuthEnabled(content string) bool
- func IsMongoDBConfFile(filename string) bool
Constants ¶
View Source
const ( // ContainerImage is the main MongoDB running container. ContainerImage = common.ContainerNamePrefix + "mongodb:" + common.Version // InitContainerImage initializes the MongoDB ReplicaSet. InitContainerImage = common.ContainerNamePrefix + "mongodb-init:" + common.Version )
Variables ¶
This section is empty.
Functions ¶
func EnableMongoDBAuth ¶
EnableMongoDBAuth enables the MongoDB user authentication, after replset initialized and user created.
func GenDefaultCreateServiceRequest ¶
func GenDefaultCreateServiceRequest(platform string, region string, azs []string, cluster string, service string, replicas int64, volSizeGB int64, res *common.Resources) (*manage.CreateServiceRequest, error)
GenDefaultCreateServiceRequest returns the default MongoDB ReplicaSet creation request.
func GenDefaultInitTaskRequest ¶
func GenDefaultInitTaskRequest(req *manage.ServiceCommonRequest, logConfig *cloudlog.LogConfig, serviceUUID string, replicas int64, manageurl string, admin string, adminPass string) *containersvc.RunTaskOptions
GenDefaultInitTaskRequest returns the default MongoDB ReplicaSet init task request.
func GenInitTaskEnvKVPairs ¶
func GenInitTaskEnvKVPairs(region string, cluster string, service string, replSetName string, replicas int64, manageurl string, admin string, adminPass string) []*common.EnvKeyValuePair
GenInitTaskEnvKVPairs generates the environment key-values for the init task.
func GenReplicaConfigs ¶
func GenReplicaConfigs(platform string, azs []string, cluster string, service string, replicas int64, replSetName string, port int64, maxMemMB int64) ([]*manage.ReplicaConfig, error)
GenReplicaConfigs generates the replica configs. Note: if the number of availability zones is less than replicas, 2 or more replicas will run on the same zone.
func IsAuthEnabled ¶
IsAuthEnabled checks if auth is already enabled.
func IsMongoDBConfFile ¶
IsMongoDBConfFile checks if the file is the MongoDB config file
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.