manager

package
v0.0.0-...-8e7039a Latest Latest
Warning

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

Go to latest
Published: May 24, 2017 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddAgent

func AddAgent(agent model.Agent) (string, error)

AddAgent simply adds an agent to the system

func AddJobFile

func AddJobFile(jobID string, jobFile model.JobFile) error

AddJobFile adds a file entry to the job

func CreateJobDefinition

func CreateJobDefinition(jobDef model.JobDefinition) (string, error)

func CronSchedules

func CronSchedules() []*cron.Entry

func DeleteJobDefinition

func DeleteJobDefinition(id string) error

func DeleteSchedule

func DeleteSchedule(id string) error

func FinishJob

func FinishJob(id string) error

FinishJob updates the job status in the DB and begins the file indexing process

func GetAgent

func GetAgent(agentID string) (*model.Agent, error)

GetAgent returns the stored agent information

func GetAgentStatus

func GetAgentStatus(agentID string) (map[string]interface{}, error)

func GetAgents

func GetAgents() ([]model.Agent, error)

Agents returns a list of all known agents

func GetJob

func GetJob(jobID string) (*model.Job, error)

func GetJobDefinition

func GetJobDefinition(id string) (*model.JobDefinition, error)

func GetJobDefinitions

func GetJobDefinitions() ([]model.JobDefinition, error)

func Init

func Init(c *config.Config) error

Init sets up the environement to run

func JobDirectories

func JobDirectories(jobID, parent string) ([]string, error)

func JobFiles

func JobFiles(jobID string, filters map[string]string) ([]model.JobFile, error)

JobFiles pulls a list of files in job

func JobList

func JobList(filters map[string]string) ([]model.Job, error)

JobList builds a list of jobs based on the given paramiters

func JobStatus

func JobStatus(id string) (*model.JobMeta, error)

JobStatus reads the status from the DB

func NewJob

func NewJob(jobDefinition model.JobDefinition, agentID string) (string, error)

func NewSchedule

func NewSchedule(s model.Schedule) (string, error)

func ScheduleList

func ScheduleList() ([]model.Schedule, error)

func SendTestEmail

func SendTestEmail() error

SendTestEmail checks the email configuration by attempting to send out a test email

func Shutdown

func Shutdown()

func UpdateAgent

func UpdateAgent(agent model.Agent, loadKey bool) error

UpdateAgent updates the information for given agent id

func UpdateJobDefinition

func UpdateJobDefinition(jobDef model.JobDefinition) error

func UpdateSchedule

func UpdateSchedule(s model.Schedule) error

Types

type ScheduledJob

type ScheduledJob struct {
	Schedule model.Schedule `json:"schedule"`
}

Implements

func (*ScheduledJob) Run

func (s *ScheduledJob) Run()

Jump to

Keyboard shortcuts

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