Documentation ¶
Index ¶
- Constants
- Variables
- func IsError(err error, code int) bool
- type Client
- func (c *Client) ID() string
- func (c *Client) IsDBBackupRunning() bool
- func (c *Client) IsOplogBackupRunning() bool
- func (c *Client) ListStorages() ([]*pb.StorageInfo, error)
- func (c *Client) NodeName() string
- func (c *Client) NodeTye() pb.NodeType
- func (c *Client) ReplicasetName() string
- func (c *Client) Start() error
- func (c *Client) Stop()
- type ConnectionOptions
- type Error
- type InputOptions
- type SSLOptions
Constants ¶
View Source
const (
NoMongosError = iota
)
Variables ¶
View Source
var ErrNoMongos = errors.New("no mongos")
Functions ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) IsDBBackupRunning ¶
func (*Client) IsOplogBackupRunning ¶
func (*Client) ListStorages ¶ added in v0.4.0
func (c *Client) ListStorages() ([]*pb.StorageInfo, error)
func (*Client) ReplicasetName ¶
type ConnectionOptions ¶
type ConnectionOptions struct { Host string `yaml:"host,omitempty" kingpin:"mongodb-host"` Port string `yaml:"port,omitempty" kingpin:"mongodb-port"` User string `yaml:"username,omitempty" kingpin:"mongodb-user"` Password string `yaml:"password,omitempty" kingpin:"mongodb-password"` AuthDB string `yaml:"authdb,omitempty" kingpin:"mongodb-authdb"` ReplicasetName string `yaml:"replicaset,omitempty" kingpin:"mongodb-replicaset"` Timeout int `yaml:"timeout,omitempty"` TCPKeepAliveSeconds int `yaml:"tcp_keep_alive_seconds,omitempty"` ReconnectDelay int `yaml:"reconnect_delay,omitempty" kingpin:"mongodb-reconnect-delay"` ReconnectCount int `yaml:"reconnect_count,omitempty" kingpin:"mongodb-reconnect-count"` // 0: forever DSN string `yaml:"dsn,omitempty" kingpin:"dsn"` }
type InputOptions ¶ added in v0.3.0
type InputOptions struct { BackupDir string DbConnOptions ConnectionOptions DbSSLOptions SSLOptions GrpcConn *grpc.ClientConn Logger *logrus.Logger Storages *storage.Storages }
type SSLOptions ¶
type SSLOptions struct { SSLCAFile string `yaml:"sslca_file,omitempty"` SSLPEMKeyFile string `yaml:"sslpem_key_file,omitempty"` SSLPEMKeyPassword string `yaml:"sslpem_key_password,omitempty"` SSLCRLFile string `yaml:"sslcrl_file,omitempty"` UseSSL bool `yaml:"use_ssl,omitempty"` SSLAllowInvalidCert bool `yaml:"ssl_allow_invalid_cert,omitempty"` SSLAllowInvalidHost bool `yaml:"ssl_allow_invalid_host,omitempty"` SSLFipsMode bool `yaml:"ssl_fips_mode,omitempty"` }
Struct holding ssl-related options
Click to show internal directories.
Click to hide internal directories.