Documentation ¶
Index ¶
- Variables
- func JSON(w http.ResponseWriter, thing interface{})
- func JSONLiteral(w http.ResponseWriter, thing string)
- func Sentencify(words []string) string
- type AdhocTask
- type ArchiveAPI
- type Config
- type InvalidParametersError
- type JSONError
- type Job
- type JobAPI
- type JobFailedError
- type JobRepresentation
- type MetaAPI
- type MissingParametersError
- type Operation
- type PingAPI
- type RetentionAPI
- type ScheduleAPI
- type Status
- type StoreAPI
- type Supervisor
- func (s *Supervisor) CheckSchedule()
- func (s *Supervisor) GetAllJobs() ([]*Job, error)
- func (s *Supervisor) PurgeArchives()
- func (s *Supervisor) ReadConfig(path string) error
- func (s *Supervisor) Resync() error
- func (s *Supervisor) Run() error
- func (s *Supervisor) ScheduleAdhoc(a AdhocTask)
- func (s *Supervisor) SchedulePurgeTask(archive *db.AnnotatedArchive) error
- func (s *Supervisor) SpawnAPI()
- func (s *Supervisor) SpawnScheduler()
- func (s *Supervisor) SpawnWorker()
- func (s *Supervisor) SpawnWorkers()
- type TargetAPI
- type Task
- type TaskAPI
- type UpdateOp
- type Validator
- type WorkerRequest
- type WorkerUpdate
Constants ¶
This section is empty.
Variables ¶
View Source
var DEV_MODE_SCHEDULING bool = false
Functions ¶
func JSON ¶
func JSON(w http.ResponseWriter, thing interface{})
func JSONLiteral ¶
func JSONLiteral(w http.ResponseWriter, thing string)
func Sentencify ¶
Types ¶
type ArchiveAPI ¶
func (ArchiveAPI) ServeHTTP ¶
func (self ArchiveAPI) ServeHTTP(w http.ResponseWriter, req *http.Request)
type InvalidParametersError ¶
func InvalidParameters ¶
func InvalidParameters(names ...string) InvalidParametersError
func (InvalidParametersError) Error ¶
func (e InvalidParametersError) Error() string
func (*InvalidParametersError) IsValid ¶
func (e *InvalidParametersError) IsValid() bool
func (InvalidParametersError) JSON ¶
func (e InvalidParametersError) JSON() string
func (*InvalidParametersError) Validate ¶
func (e *InvalidParametersError) Validate(name string, value interface{}, fn Validator)
type Job ¶
type Job struct { UUID uuid.UUID StorePlugin string StoreEndpoint string TargetPlugin string TargetEndpoint string Agent string Spec *timespec.Spec Paused bool NextRun time.Time }
func (*Job) Reschedule ¶
type JobFailedError ¶
type JobFailedError struct {
FailedJobs []JobRepresentation
}
func (JobFailedError) Error ¶
func (e JobFailedError) Error() string
type MissingParametersError ¶
type MissingParametersError struct {
Missing []string `json:"missing"`
}
func MissingParameters ¶
func MissingParameters(names ...string) MissingParametersError
func (*MissingParametersError) Check ¶
func (e *MissingParametersError) Check(name string, value string)
func (MissingParametersError) Error ¶
func (e MissingParametersError) Error() string
func (MissingParametersError) IsValid ¶
func (e MissingParametersError) IsValid() bool
func (MissingParametersError) JSON ¶
func (e MissingParametersError) JSON() string
type RetentionAPI ¶
func (RetentionAPI) ServeHTTP ¶
func (self RetentionAPI) ServeHTTP(w http.ResponseWriter, req *http.Request)
type ScheduleAPI ¶
func (ScheduleAPI) ServeHTTP ¶
func (self ScheduleAPI) ServeHTTP(w http.ResponseWriter, req *http.Request)
type Supervisor ¶
type Supervisor struct { Database *db.DB Port string /* addr/interface(s) and port to bind */ PrivateKeyFile string /* path to the SSH private key for talking to remote agents */ Workers uint /* how many workers to spin up */ PurgeAgent string /* What agent to use for purge jobs */ Timeout time.Duration // contains filtered or unexported fields }
func NewSupervisor ¶
func NewSupervisor() *Supervisor
func (*Supervisor) CheckSchedule ¶
func (s *Supervisor) CheckSchedule()
func (*Supervisor) GetAllJobs ¶
func (s *Supervisor) GetAllJobs() ([]*Job, error)
func (*Supervisor) PurgeArchives ¶
func (s *Supervisor) PurgeArchives()
func (*Supervisor) ReadConfig ¶
func (s *Supervisor) ReadConfig(path string) error
func (*Supervisor) Resync ¶
func (s *Supervisor) Resync() error
func (*Supervisor) Run ¶
func (s *Supervisor) Run() error
func (*Supervisor) ScheduleAdhoc ¶
func (s *Supervisor) ScheduleAdhoc(a AdhocTask)
func (*Supervisor) SchedulePurgeTask ¶
func (s *Supervisor) SchedulePurgeTask(archive *db.AnnotatedArchive) error
func (*Supervisor) SpawnAPI ¶
func (s *Supervisor) SpawnAPI()
func (*Supervisor) SpawnScheduler ¶
func (s *Supervisor) SpawnScheduler()
func (*Supervisor) SpawnWorker ¶
func (s *Supervisor) SpawnWorker()
func (*Supervisor) SpawnWorkers ¶
func (s *Supervisor) SpawnWorkers()
type Task ¶
type Task struct { UUID uuid.UUID StorePlugin string StoreEndpoint string ArchiveUUID uuid.UUID TargetPlugin string TargetEndpoint string RestoreKey string Agent string Op Operation Status Status Attempts int StartedAt time.Time StoppedAt time.Time TimeoutAt time.Time Output []string }
func NewPendingTask ¶
type WorkerRequest ¶
Click to show internal directories.
Click to hide internal directories.