server

package
v0.0.0-...-8865ca3 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2015 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DateResource

type DateResource struct {
	Timestamp int64  `json:"timestamp"`
	String    string `json:"string"`
}

type HostsExecutionPolicyResource

type HostsExecutionPolicyResource struct {
	Hosts    string   `json:"select"`
	HostList []string `json:"hosts"`
}

type JobHandler

type JobHandler SubHandler

func (*JobHandler) JobList

func (h *JobHandler) JobList(resp http.ResponseWriter, req *http.Request, _ httprouter.Params)

func (*JobHandler) JobSingle

func (h *JobHandler) JobSingle(resp http.ResponseWriter, req *http.Request, params httprouter.Params)

type JobOwnerResource

type JobOwnerResource struct {
	Name         string `json:"name"`
	EmailAddress string `json:"email_address"`
}

type JobResource

type JobResource struct {
	Name          string             `json:"name"`
	Href          string             `json:"href"`
	Links         [1]LinkResource    `json:"links"`
	Description   string             `json:"description"`
	Owners        []JobOwnerResource `json:"owners"`
	Policy        interface{}        `json:"execution_policy"`
	Schedule      string             `json:"execution_schedule"`
	Command       []string           `json:"command"`
	LastExecution *DateResource      `json:"last_execution"`
	NextExecution *DateResource      `json:"next_execution"`
}

type LinkResource

type LinkResource struct {
	Href string `json:"href"`
	Rel  string `json:"rel"`
}

type NodeHandler

type NodeHandler SubHandler

func (*NodeHandler) NodeList

func (h *NodeHandler) NodeList(resp http.ResponseWriter, req *http.Request, _ httprouter.Params)

func (*NodeHandler) NodeSingle

func (h *NodeHandler) NodeSingle(resp http.ResponseWriter, req *http.Request, param httprouter.Params)

type NodeResource

type NodeResource struct {
	Name        string   `json:"name"`
	Href        string   `json:"href"`
	Roles       []string `json:"roles"`
	Status      string   `json:"status"`
	RunningJobs int32    `json:"running_jobs"`
}

type ReportHandler

type ReportHandler SubHandler

func (*ReportHandler) ReportsByJob

func (h *ReportHandler) ReportsByJob(resp http.ResponseWriter, req *http.Request, param httprouter.Params)

type RestServer

type RestServer struct {
	// contains filtered or unexported fields
}

func NewRestServer

func NewRestServer(port int, nodes *container.NodeContainer, jobs *container.JobContainer, store storage.StorageBackend, logger *logging.Logger) *RestServer

func (*RestServer) RootHandler

func (h *RestServer) RootHandler(resp http.ResponseWriter, req *http.Request, param httprouter.Params)

func (*RestServer) Start

func (s *RestServer) Start()

type RoleExecutionPolicyResource

type RoleExecutionPolicyResource struct {
	Hosts string   `json:"select"`
	Roles []string `json:"roles"`
}

type RootResource

type RootResource struct {
	Links []LinkResource `json:"links"`
}

type SubHandler

type SubHandler struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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