jobqueues

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2018 License: GPL-3.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

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

Init Initialises the job queues loop

Types

type Job

type Job struct {
	ID       bson.ObjectId `json:"_id"               bson:"_id,omitempty"`
	NodeUUID string        `json:"node_uuid"         bson:"node_uuid" description:"goswim 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"`
	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"`
	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"`
	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
	AppRoleID    string
	NodeUUID     string
	PulledImages map[string]PulledImage
}

type Meta

type Meta struct {
	ContainerImage string `yaml:"container_image"`
}

Meta defines the format of the goswim.yml file

type PulledImage

type PulledImage struct {
	When time.Time
}

type TarEntry

type TarEntry struct {
	Name    string
	Content []byte
}

Jump to

Keyboard shortcuts

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