Documentation
¶
Overview ¶
Package atmcfg provides a set of helper methods to help you update the automation config.
Usage
import "go.mongodb.org/ops-manager/atmcfg"
Index ¶
- Variables
- func AddIndexConfig(out *opsmngr.AutomationConfig, newIndex *opsmngr.IndexConfig) error
- func AddUser(out *opsmngr.AutomationConfig, u *opsmngr.MongoDBUser)
- func ConfigureScramCredentials(user *opsmngr.MongoDBUser, password string) error
- func DisableBackup(out *opsmngr.AutomationConfig, hostname string) error
- func DisableMonitoring(out *opsmngr.AutomationConfig, hostname string) error
- func EnableBackup(out *opsmngr.AutomationConfig, hostname string) error
- func EnableMechanism(out *opsmngr.AutomationConfig, m []string) error
- func EnableMonitoring(out *opsmngr.AutomationConfig, hostname string) error
- func IsGoalState(s *opsmngr.AutomationStatus) bool
- func ReclaimFreeSpace(out *opsmngr.AutomationConfig, clusterName string)
- func ReclaimFreeSpaceForProcessesByClusterName(out *opsmngr.AutomationConfig, clusterName, lastCompact string, ...) error
- func ReclaimFreeSpaceWithLastCompact(out *opsmngr.AutomationConfig, clusterName, lastCompact string)
- func RemoveByClusterName(out *opsmngr.AutomationConfig, name string)
- func RemoveUser(out *opsmngr.AutomationConfig, username, database string) error
- func Restart(out *opsmngr.AutomationConfig, name string)
- func RestartProcessesByClusterName(out *opsmngr.AutomationConfig, clusterName string, processes []string) error
- func Shutdown(out *opsmngr.AutomationConfig, clusterName string)
- func ShutdownProcessesByClusterName(out *opsmngr.AutomationConfig, clusterName string, processes []string) error
- func Startup(out *opsmngr.AutomationConfig, name string)
- func StartupProcessesByClusterName(out *opsmngr.AutomationConfig, clusterName string, processes []string) error
- func Suspend(out *opsmngr.AutomationConfig, clusterName string)
- func SuspendProcessesByClusterName(out *opsmngr.AutomationConfig, clusterName string, processes []string) error
Constants ¶
This section is empty.
Variables ¶
var ErrMonitoringEnabled = errors.New("monitoring already enabled")
var ErrProcessNotFound = errors.New("process not found")
ErrProcessNotFound means the process was not found for the given cluster name.
var ErrUnsupportedMechanism = errors.New("unrecognized SCRAM-SHA format")
ErrUnsupportedMechanism means the provided mechanism wasn't valid.
Functions ¶
func AddIndexConfig ¶
func AddIndexConfig(out *opsmngr.AutomationConfig, newIndex *opsmngr.IndexConfig) error
AddIndexConfig adds an opsmngr.IndexConfig to the opsmngr.AutomationConfig.
func AddUser ¶
func AddUser(out *opsmngr.AutomationConfig, u *opsmngr.MongoDBUser)
AddUser adds a opsmngr.MongoDBUser to the opsmngr.AutomationConfi.
func ConfigureScramCredentials ¶ added in v0.8.0
func ConfigureScramCredentials(user *opsmngr.MongoDBUser, password string) error
ConfigureScramCredentials creates both SCRAM-SHA-1 and SCRAM-SHA-256 credentials. Use this method to guarantee that password can be updated later.
func DisableBackup ¶ added in v0.13.0
func DisableBackup(out *opsmngr.AutomationConfig, hostname string) error
DisableBackup disables backup for the given hostname.
func DisableMonitoring ¶ added in v0.13.0
func DisableMonitoring(out *opsmngr.AutomationConfig, hostname string) error
DisableMonitoring disables monitoring for the given hostname.
func EnableBackup ¶ added in v0.10.0
func EnableBackup(out *opsmngr.AutomationConfig, hostname string) error
EnableBackup enables backup for the given hostname.
func EnableMechanism ¶ added in v0.6.1
func EnableMechanism(out *opsmngr.AutomationConfig, m []string) error
EnableMechanism allows you to enable a given set of authentication mechanisms to an opsmngr.AutomationConfig. This method currently only supports MONGODB-CR, and SCRAM-SHA-256.
func EnableMonitoring ¶ added in v0.10.0
func EnableMonitoring(out *opsmngr.AutomationConfig, hostname string) error
EnableMonitoring enables monitoring for the given hostname.
func IsGoalState ¶ added in v0.28.0
func IsGoalState(s *opsmngr.AutomationStatus) bool
func ReclaimFreeSpace ¶ added in v0.18.0
func ReclaimFreeSpace(out *opsmngr.AutomationConfig, clusterName string)
ReclaimFreeSpace sets all process of a cluster to reclaim free space.
func ReclaimFreeSpaceForProcessesByClusterName ¶ added in v0.25.0
func ReclaimFreeSpaceForProcessesByClusterName(out *opsmngr.AutomationConfig, clusterName, lastCompact string, processes []string) error
ReclaimFreeSpaceForProcessesByClusterName reclaims free space for a cluster. Processes are provided in the format {"hostname:port","hostname2:port2"}.
func ReclaimFreeSpaceWithLastCompact ¶ added in v0.25.0
func ReclaimFreeSpaceWithLastCompact(out *opsmngr.AutomationConfig, clusterName, lastCompact string)
func RemoveByClusterName ¶ added in v0.7.1
func RemoveByClusterName(out *opsmngr.AutomationConfig, name string)
RemoveByClusterName removes a cluster and its associated processes from the config. This won't shutdown any running process.
func RemoveUser ¶
func RemoveUser(out *opsmngr.AutomationConfig, username, database string) error
RemoveUser removes a MongoDBUser from the authentication config.
func Restart ¶ added in v0.15.0
func Restart(out *opsmngr.AutomationConfig, name string)
Restart sets all process of a cluster to restart.
func RestartProcessesByClusterName ¶ added in v0.25.0
func RestartProcessesByClusterName(out *opsmngr.AutomationConfig, clusterName string, processes []string) error
RestartProcessesByClusterName restart the entire cluster or its processes. Processes are provided in the format {"hostname:port","hostname2:port2"}.
func Shutdown ¶
func Shutdown(out *opsmngr.AutomationConfig, clusterName string)
Shutdown disables all processes of the given cluster name.
func ShutdownProcessesByClusterName ¶ added in v0.24.0
func ShutdownProcessesByClusterName(out *opsmngr.AutomationConfig, clusterName string, processes []string) error
ShutdownProcessesByClusterName disables the entire cluster or its processes. Processes are provided in the format {"hostname:port","hostname2:port2"}.
func Startup ¶
func Startup(out *opsmngr.AutomationConfig, name string)
Startup enables all processes of the given cluster name.
func StartupProcessesByClusterName ¶ added in v0.24.0
func StartupProcessesByClusterName(out *opsmngr.AutomationConfig, clusterName string, processes []string) error
StartupProcessesByClusterName enables the entire cluster or its processes. Processes are provided in the format {"hostname:port","hostname2:port2"}.
func Suspend ¶ added in v0.39.0
func Suspend(out *opsmngr.AutomationConfig, clusterName string)
Suspend suspends automation for all processes.
func SuspendProcessesByClusterName ¶ added in v0.39.0
func SuspendProcessesByClusterName(out *opsmngr.AutomationConfig, clusterName string, processes []string) error
SuspendProcessesByClusterName suspends automation for the entire cluster or its processes. Processes are provided in the format {"hostname:port","hostname2:port2"}.
Types ¶
This section is empty.