jobqueues

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2019 License: GPL-3.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDockerInfo added in v1.5.0

func GetDockerInfo() (string, *types.Info, error)

GetDockerInfo retrieves details of the docker client api and server info.

func Init

func Init(db *mgo.Database, appRole *AppRole, nodeUUID string)

Init Initialises the job queues loop

Types

type AppRole added in v0.8.0

type AppRole struct {
	ID   string
	Name string
}

AppRole holds Vault App Role details

type Job

type Job struct {
	ID       bson.ObjectId `json:"_id"               bson:"_id,omitempty"`
	NodeUUID string        `json:"node_uuid"         bson:"node_uuid" description:"gostint node's unique identifier"`

	// These fields are passed from requestor in POSTed request:
	Qname        string `    json:"qname"             bson:"qname"`
	CubbyToken   string `    json:"cubby_token"       bson:"cubby_token"`
	CubbyPath    string `    json:"cubby_path"        bson:"cubby_path"`
	WrapSecretID string `    json:"wrap_secret_id"    bson:"wrap_secret_id" description:"Wrapping Token for the SecretID"`

	Payload string `` /* 149-byte string literal not displayed */

	// These are populated from the decrypted payload
	// NOTE: ContainerImage: this may be passed in the content itself as meta data
	ContainerImage  string   `json:"container_image"   bson:"container_image"`
	ImagePullPolicy string   `json:"image_pull_policy" bson:"image_pull_policy"`
	Content         string   `json:"content"           bson:"content"`
	EntryPoint      []string `json:"entrypoint"        bson:"entrypoint"`
	Run             []string `json:"run"               bson:"run"`
	WorkingDir      string   `json:"working_directory" bson:"working_directory"`
	EnvVars         []string `json:"env_vars"          bson:"env_vars"`
	Tty             bool     `json:"tty"               bson:"tty"`
	SecretRefs      []string `json:"secret_refs"       bson:"secret_refs"`
	SecretFileType  string   `json:"secret_file_type"  bson:"secret_file_type"`
	ContOnWarnings  bool     `json:"cont_on_warnings"  bson:"cont_on_warnings"`

	// These are returned
	Status        string    `json:"status"            bson:"status"`
	ReturnCode    int       `json:"return_code"       bson:"return_code"`
	Submitted     time.Time `json:"submitted"         bson:"submitted"`
	Started       time.Time `json:"started"           bson:"started,omitempty"`
	Ended         time.Time `json:"ended"             bson:"ended,omitempty"`
	Output        string    `json:"output"            bson:"output"`
	Stderr        string    `json:"stderr"            bson:"stderr"`
	ContainerID   string    `json:"container_id"      bson:"container_id"`
	KillRequested bool      `json:"kill_requested"    bson:"kill_requested"`
	// contains filtered or unexported fields
}

Job structure to represent a job submission request

func (*Job) String

func (job *Job) String() string

func (*Job) UpdateJob added in v0.2.0

func (job *Job) UpdateJob(u bson.M) (*Job, error)

UpdateJob Atomically update a job in MongoDB

type JobQueues

type JobQueues struct {
	Db       *mgo.Database
	AppRole  *AppRole
	NodeUUID string
}

JobQueues holds jobqueue settings and state

type Meta

type Meta struct {
	ContainerImage string   `yaml:"container_image"`
	SecretRefs     []string `yaml:"secret_refs"`
}

Meta defines the format of the gostint.yml file

type TarEntry

type TarEntry struct {
	Name    string
	Content []byte
}

TarEntry holds a tar file entity

Jump to

Keyboard shortcuts

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