apimodels

package
v0.0.0-...-1d50e38 Latest Latest
Warning

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

Go to latest
Published: May 30, 2017 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccessLogger

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

func NewAccessLogger

func NewAccessLogger(router http.Handler) *AccessLogger

func (*AccessLogger) ServeHTTP

func (self *AccessLogger) ServeHTTP(w http.ResponseWriter, r *http.Request)

type EndTaskResponse

type EndTaskResponse struct {
	ShouldExit bool   `json:"should_exit,omitempty"`
	Message    string `json:"message,omitempty"`
}

EndTaskResponse is what is returned when the task ends

type ExpansionVars

type ExpansionVars map[string]string

ExpansionVars is a map of expansion variables for a project.

type HeartbeatResponse

type HeartbeatResponse struct {
	Abort bool `json:"abort,omitempty"`
}

HeartbeatResponse is sent by the API server in response to the agent's heartbeat message.

type MyWriter

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

func (*MyWriter) Header

func (self *MyWriter) Header() http.Header

func (*MyWriter) Write

func (self *MyWriter) Write(data []byte) (int, error)

func (*MyWriter) WriteHeader

func (self *MyWriter) WriteHeader(code int)

type NextTaskResponse

type NextTaskResponse struct {
	TaskId     string `json:"task_id,omitempty"`
	TaskSecret string `json:"task_secret,omitempty"`
	ShouldExit bool   `json:"should_exit,omitempty"`
	Message    string `json:"message,omitempty"`
}

NextTaskResponse represents the response sent back when an agent asks for a next task

type ProcessTimeoutResponse

type ProcessTimeoutResponse struct {
	Status        string      `json:"status"`
	LateProcesses interface{} `json:"late_mci_processes,omitempty"`
}

Struct for reporting process timeouts

type TaskEndDetail

type TaskEndDetail struct {
	Status      string `bson:"status,omitempty" json:"status,omitempty"`
	Type        string `bson:"type,omitempty" json:"type,omitempty"`
	Description string `bson:"desc,omitempty" json:"desc,omitempty"`
	TimedOut    bool   `bson:"timed_out,omitempty" json:"timed_out,omitempty"`
}

TaskEndDetail contains data sent from the agent to the API server after each task run.

type TaskEndDetails

type TaskEndDetails struct {
	TimeoutStage string `bson:"timeout_stage,omitempty" json:"timeout_stage,omitempty"`
	TimedOut     bool   `bson:"timed_out,omitempty" json:"timed_out,omitempty"`
}

type TaskEndResponse

type TaskEndResponse struct {
	TaskId     string `json:"task_id,omitempty"`
	TaskSecret string `json:"task_secret,omitempty"`
	Message    string `json:"message,omitempty"`
	RunNext    bool   `json:"run_next,omitempty"`
}

TaskEndResponse contains data sent by the API server to the agent - in response to a request with TaskEndDetail. TODO: This should be taken out when we transition to the new api route

type TaskStartRequest

type TaskStartRequest struct {
	Pid string `json:"pid"`
}

TaskStartRequest holds information sent by the agent to the API server at the beginning of each task run.

Jump to

Keyboard shortcuts

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