Documentation
¶
Index ¶
Constants ¶
View Source
const (
AdminDB = "admin"
)
Public constants
Variables ¶
This section is empty.
Functions ¶
func BuildRoles ¶
BuildRoles converts the roles inside the array of string in an array of Atlas.Role Objects r contains roles in the format roleName@dbName
Types ¶
type ClusterConfig ¶
type ClusterConfig struct {
FCVersion string `yaml:"featureCompatibilityVersion,omitempty" json:"featureCompatibilityVersion,omitempty"`
MongoURI string `yaml:"mongoURI,omitempty" json:"mongoURI,omitempty"`
Name string `yaml:"name" json:"name"`
ProcessConfigs []ProcessConfig `yaml:"processes" json:"processes"`
Version string `yaml:"version,omitempty" json:"version,omitempty"`
}
ClusterConfig configuration for a cluster This cluster can be used to patch an automation config
func FromAutomationConfig ¶
func FromAutomationConfig(in *om.AutomationConfig) (out []ClusterConfig)
FromAutomationConfig convert from cloud format to mCLI format
func (*ClusterConfig) PatchAutomationConfig ¶
func (c *ClusterConfig) PatchAutomationConfig(out *om.AutomationConfig) error
PatchAutomationConfig add the ClusterConfig to a cloudmanager.AutomationConfig this method will modify the given AutomationConfig to add the new replica set information
type ProcessConfig ¶
type ProcessConfig struct {
BuildIndexes *bool `yaml:"buildIndexes,omitempty" json:"buildIndexes,omitempty"`
DBPath string `yaml:"dbPath" json:"dbPath"`
FCVersion string `yaml:"featureCompatibilityVersion,omitempty" json:"featureCompatibilityVersion,omitempty"`
Hostname string `yaml:"hostname" json:"hostname"`
LogPath string `yaml:"logPath" json:"logPath"`
Name string `yaml:"name,omitempty" json:"name,omitempty"`
Port int `yaml:"port" json:"port"`
Priority float64 `yaml:"priority" json:"priority"`
ProcessType string `yaml:"processType" json:"processType"`
SlaveDelay float64 `yaml:"slaveDelay" json:"slaveDelay"`
Version string `yaml:"version,omitempty" json:"version,omitempty"`
Votes float64 `yaml:"votes" json:"votes"`
ArbiterOnly bool `yaml:"arbiterOnly" json:"arbiterOnly"`
Disabled bool `yaml:"disabled" json:"disabled"`
Hidden bool `yaml:"hidden" json:"hidden"`
}
ProcessConfig that belongs to a cluster
Click to show internal directories.
Click to hide internal directories.