Documentation
¶
Index ¶
- Variables
- func ListenCmd(ctx context.Context, m connect.Client, cl <-chan struct{}) (<-chan Cmd, <-chan error)
- type BackupCmd
- type CleanupCmd
- type Cmd
- type Command
- type CursorClosedError
- type DeleteBackupCmd
- type DeletePITRCmd
- type OPID
- func ParseOPID(s string) (OPID, error)
- func SendAddConfigProfile(ctx context.Context, m connect.Client, name string, storage config.StorageConf) (OPID, error)
- func SendCancelBackup(ctx context.Context, m connect.Client) (OPID, error)
- func SendCleanup(ctx context.Context, m connect.Client, before primitive.Timestamp) (OPID, error)
- func SendDeleteBackupBefore(ctx context.Context, m connect.Client, before primitive.Timestamp, ...) (OPID, error)
- func SendDeleteBackupByName(ctx context.Context, m connect.Client, name string) (OPID, error)
- func SendDeleteOplogRangeBefore(ctx context.Context, m connect.Client, before primitive.Timestamp) (OPID, error)
- func SendRemoveConfigProfile(ctx context.Context, m connect.Client, name string) (OPID, error)
- func SendResync(ctx context.Context, m connect.Client, opts *ResyncCmd) (OPID, error)
- type ProfileCmd
- type ReplayCmd
- type RestoreCmd
- type ResyncCmd
Constants ¶
This section is empty.
Variables ¶
View Source
var NilOPID = OPID(primitive.NilObjectID)
Functions ¶
Types ¶
type BackupCmd ¶
type BackupCmd struct {
Type defs.BackupType `bson:"type"`
IncrBase bool `bson:"base"`
Name string `bson:"name"`
Namespaces []string `bson:"nss,omitempty"`
Compression compress.CompressionType `bson:"compression"`
CompressionLevel *int `bson:"level,omitempty"`
NumParallelColls *int32 `bson:"numParallelColls,omitempty"`
Filelist bool `bson:"filelist,omitempty"`
Profile string `bson:"profile,omitempty"`
}
type CleanupCmd ¶
type Cmd ¶
type Cmd struct {
Cmd Command `bson:"cmd"`
Resync *ResyncCmd `bson:"resync,omitempty"`
Profile *ProfileCmd `bson:"profile,omitempty"`
Backup *BackupCmd `bson:"backup,omitempty"`
Restore *RestoreCmd `bson:"restore,omitempty"`
Replay *ReplayCmd `bson:"replay,omitempty"`
Delete *DeleteBackupCmd `bson:"delete,omitempty"`
DeletePITR *DeletePITRCmd `bson:"deletePitr,omitempty"`
Cleanup *CleanupCmd `bson:"cleanup,omitempty"`
TS int64 `bson:"ts"`
OPID OPID `bson:"-"`
}
type Command ¶
type Command string
Command represents actions that could be done on behalf of the client by the agents
const ( CmdUndefined Command = "" CmdAddConfigProfile Command = "addConfigProfile" CmdRemoveConfigProfile Command = "removeConfigProfile" CmdBackup Command = "backup" CmdRestore Command = "restore" CmdReplay Command = "replay" CmdCancelBackup Command = "cancelBackup" CmdResync Command = "resync" CmdPITR Command = "pitr" CmdDeleteBackup Command = "delete" CmdDeletePITR Command = "deletePitr" CmdCleanup Command = "cleanup" )
type CursorClosedError ¶
type CursorClosedError struct {
Err error
}
func (CursorClosedError) Error ¶
func (c CursorClosedError) Error() string
func (CursorClosedError) Is ¶
func (c CursorClosedError) Is(err error) bool
func (CursorClosedError) Unwrap ¶
func (c CursorClosedError) Unwrap() error
type DeleteBackupCmd ¶
type DeleteBackupCmd struct {
Backup string `bson:"backup"`
OlderThan int64 `bson:"olderthan"`
Type defs.BackupType `bson:"type"`
}
func (DeleteBackupCmd) String ¶
func (d DeleteBackupCmd) String() string
type DeletePITRCmd ¶
type DeletePITRCmd struct {
OlderThan int64 `bson:"olderthan"`
}
type OPID ¶
func SendAddConfigProfile ¶
func SendCleanup ¶
func SendDeleteBackupBefore ¶
func SendDeleteBackupByName ¶
func SendRemoveConfigProfile ¶
func SendResync ¶
type ProfileCmd ¶
type ProfileCmd struct {
Name string `bson:"name"`
IsProfile bool `bson:"profile"`
Storage config.StorageConf `bson:"storage"`
}
type ReplayCmd ¶
type RestoreCmd ¶
type RestoreCmd struct {
Name string `bson:"name"`
BackupName string `bson:"backupName"`
Namespaces []string `bson:"nss,omitempty"`
NamespaceFrom string `bson:"nsFrom,omitempty"`
NamespaceTo string `bson:"nsTo,omitempty"`
UsersAndRoles bool `bson:"usersAndRoles,omitempty"`
RSMap map[string]string `bson:"rsMap,omitempty"`
Fallback *bool `bson:"fallbackEnabled"`
AllowPartlyDone *bool `bson:"allowPartlyDone"`
NumParallelColls *int32 `bson:"numParallelColls,omitempty"`
NumInsertionWorkers *int32 `bson:"numInsertionWorkers,omitempty"`
OplogTS primitive.Timestamp `bson:"oplogTS,omitempty"`
External bool `bson:"external"`
ExtConf topo.ExternOpts `bson:"extConf"`
ExtTS primitive.Timestamp `bson:"extTS"`
}
func (RestoreCmd) String ¶
func (r RestoreCmd) String() string
Click to show internal directories.
Click to hide internal directories.