backup

package
v0.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 29, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CREATE_TASKHANDLER_MAX_CONCURRENCY = 1
)
View Source
const (
	DELETE_TASKHANDLER_MAX_CONCURRENCY = 1
)
View Source
const (
	DOWNLOAD_TASKHANDLER_MAX_CONCURRENCY = 1
)
View Source
const (
	INITIALIZE_TASKHANDLER_MAX_CONCURRENCY = 100
)
View Source
const (
	SAVEFILE_TASKHANDLER_MAX_CONCURRENCY = 100
)

Variables

This section is empty.

Functions

func GetBackupSystemCmdPolicySpecification

func GetBackupSystemCmdPolicySpecification() string

func GetCreateBackupSystemCmdPolicyResource

func GetCreateBackupSystemCmdPolicyResource(name string) config.SystemCmdPolicy

func NewBackupJob

func NewBackupJob(config Configuration) (job.Job, error)

func NewInitializeTask

func NewInitializeTask(timestamp string, level string, settings Settings) job.Task

Types

type Configuration

type Configuration struct {
	Organization         string
	Environment          registry.Environment
	Credential           registry.Credential
	Timestamp            string
	Level                string
	BasePath             string
	FolderPerEnvironment bool
	Schedule             cron.Schedule
	PrintWhenFinished    bool
}

func (Configuration) GetTasks

func (c Configuration) GetTasks() ([]job.Task, error)

func (Configuration) RegisterTaskHandlerPools

func (c Configuration) RegisterTaskHandlerPools(r *job.TaskHandlerRepository) error

type CreateTask

type CreateTask struct {
	Organization string
	Environment  string
	Node         string
}

func NewCreateTask

func NewCreateTask(organization string, environment string, node string) CreateTask

func (CreateTask) GetTaskType

func (t CreateTask) GetTaskType() string

func (CreateTask) WriteToPipeline

func (t CreateTask) WriteToPipeline() bool

type CreateTaskHandler

type CreateTaskHandler struct {
	Organization string
	Environment  string
	Node         string
	// contains filtered or unexported fields
}

func NewCreateTaskHandler

func NewCreateTaskHandler(organization string, environment string, node string, client *nitro.Client) CreateTaskHandler

func (CreateTaskHandler) Execute

func (h CreateTaskHandler) Execute(t job.Task, pipeline chan interface{}) job.Task

func (CreateTaskHandler) GetTaskType

func (h CreateTaskHandler) GetTaskType() string

type DeleteTask

type DeleteTask struct {
	Organization string
	Environment  string
	Node         string
}

func NewDeleteTask

func NewDeleteTask(organization string, environment string, node string) DeleteTask

func (DeleteTask) GetTaskType

func (t DeleteTask) GetTaskType() string

func (DeleteTask) WriteToPipeline

func (t DeleteTask) WriteToPipeline() bool

type DeleteTaskHandler

type DeleteTaskHandler struct {
	Organization string
	Environment  string
	Node         string
	// contains filtered or unexported fields
}

func NewDeleteTaskHandler

func NewDeleteTaskHandler(organization string, environment string, node string, client *nitro.Client) DeleteTaskHandler

func (DeleteTaskHandler) Execute

func (h DeleteTaskHandler) Execute(t job.Task, pipeline chan interface{}) job.Task

func (DeleteTaskHandler) GetTaskType

func (h DeleteTaskHandler) GetTaskType() string

type DownloadTask

type DownloadTask struct {
	Organization string
	Environment  string
	Node         string
}

func NewDownloadTask

func NewDownloadTask(organization string, environment string, node string) DownloadTask

func (DownloadTask) GetTaskType

func (t DownloadTask) GetTaskType() string

func (DownloadTask) WriteToPipeline

func (t DownloadTask) WriteToPipeline() bool

type DownloadTaskHandler

type DownloadTaskHandler struct {
	Organization string
	Environment  string
	Node         string
	// contains filtered or unexported fields
}

func NewDownloadTaskHandler

func NewDownloadTaskHandler(organization string, environment string, node string, client *nitro.Client) DownloadTaskHandler

func (DownloadTaskHandler) Execute

func (h DownloadTaskHandler) Execute(t job.Task, pipeline chan interface{}) job.Task

func (DownloadTaskHandler) GetTaskType

func (h DownloadTaskHandler) GetTaskType() string

type InitializeTask

type InitializeTask struct {
	Data PipelineData
}

func (InitializeTask) GetTaskType

func (t InitializeTask) GetTaskType() string

func (InitializeTask) WriteToPipeline

func (t InitializeTask) WriteToPipeline() bool

type InitializeTaskHandler

type InitializeTaskHandler struct {
}

func NewInitializeTaskHandler

func NewInitializeTaskHandler() InitializeTaskHandler

func (InitializeTaskHandler) Execute

func (h InitializeTaskHandler) Execute(t job.Task, pipeline chan interface{}) job.Task

func (InitializeTaskHandler) GetTaskType

func (h InitializeTaskHandler) GetTaskType() string

type PipelineData

type PipelineData struct {
	Timestamp string
	Level     string
	Settings  Settings
	Data      map[string]*io.Reader
	Error     error
}

func (PipelineData) SetData

func (d PipelineData) SetData(name string, data *io.Reader) PipelineData

func (PipelineData) SetError

func (d PipelineData) SetError(err error) PipelineData

type SaveFileTask

type SaveFileTask struct {
}

func NewSaveTask

func NewSaveTask() SaveFileTask

func (SaveFileTask) GetTaskType

func (t SaveFileTask) GetTaskType() string

func (SaveFileTask) WriteToPipeline

func (t SaveFileTask) WriteToPipeline() bool

type SaveFileTaskHandler

type SaveFileTaskHandler struct{}

func NewSaveFileTaskHandler

func NewSaveFileTaskHandler() SaveFileTaskHandler

func (SaveFileTaskHandler) Execute

func (h SaveFileTaskHandler) Execute(t job.Task, pipeline chan interface{}) job.Task

func (SaveFileTaskHandler) GetTaskType

func (h SaveFileTaskHandler) GetTaskType() string

type Settings

type Settings struct {
	Organization         string
	Environment          string
	BasePath             string
	FolderPerEnvironment bool
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL