furrow

package
v0.0.0-...-b8773c8 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2023 License: MPL-2.0 Imports: 4 Imported by: 4

Documentation

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func Version

func Version()

Print the application's build info

Example
Version()
Output:

furrow (XYZ) built today

Types

type Broker

type Broker interface {
	// Close connection to broker
	Close()
	// Get a job from the broker
	GetJob(context.Context) (context.Context, *Job)
	// Finalize the job with the broker
	Finish(context.Context, JobStatus) error
}

type Job

type Job struct {
	RequestID            string      `protobuf:"bytes,1,opt,name=RequestID,proto3" json:"RequestID,omitempty"`
	Image                string      `protobuf:"bytes,2,opt,name=Image,proto3" json:"Image,omitempty"`
	Cmd                  []string    `protobuf:"bytes,3,rep,name=Cmd,proto3" json:"Cmd,omitempty"`
	Env                  []string    `protobuf:"bytes,4,rep,name=Env,proto3" json:"Env,omitempty"`
	Notify               string      `protobuf:"bytes,5,opt,name=Notify,proto3" json:"Notify,omitempty"`
	Volumes              *Job_Volume `protobuf:"bytes,7,opt,name=volumes,proto3" json:"volumes,omitempty"`
	XXX_NoUnkeyedLiteral struct{}    `json:"-"`
	XXX_unrecognized     []byte      `json:"-"`
	XXX_sizecache        int32       `json:"-"`
}

func (*Job) Descriptor

func (*Job) Descriptor() ([]byte, []int)

func (*Job) GetCmd

func (m *Job) GetCmd() []string

func (*Job) GetEnv

func (m *Job) GetEnv() []string

func (*Job) GetImage

func (m *Job) GetImage() string

func (*Job) GetNotify

func (m *Job) GetNotify() string

func (*Job) GetRequestID

func (m *Job) GetRequestID() string

func (*Job) GetVolumes

func (m *Job) GetVolumes() *Job_Volume

func (*Job) ProtoMessage

func (*Job) ProtoMessage()

func (*Job) Reset

func (m *Job) Reset()

func (*Job) String

func (m *Job) String() string

func (*Job) XXX_DiscardUnknown

func (m *Job) XXX_DiscardUnknown()

func (*Job) XXX_Marshal

func (m *Job) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Job) XXX_Merge

func (m *Job) XXX_Merge(src proto.Message)

func (*Job) XXX_Size

func (m *Job) XXX_Size() int

func (*Job) XXX_Unmarshal

func (m *Job) XXX_Unmarshal(b []byte) error

type JobStatus

type JobStatus struct {
	// Job ID (from broker)
	ID uint64
	// Any errors that occured while running the job
	Err error
	// Whether to mark the job for reprocessing with the broker
	Bury bool
	// Exit code the job
	ExitCode int
	// Whether to send a notification back to the caller via the broker.
	// This is the name of the channel the caller is waiting on.
	Notify string
	// The output from the job
	Output string
}

The status of the job after processing

type Job_Volume

type Job_Volume struct {
	In                   string   `protobuf:"bytes,1,opt,name=In,proto3" json:"In,omitempty"`
	Out                  string   `protobuf:"bytes,2,opt,name=Out,proto3" json:"Out,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Job_Volume) Descriptor

func (*Job_Volume) Descriptor() ([]byte, []int)

func (*Job_Volume) GetIn

func (m *Job_Volume) GetIn() string

func (*Job_Volume) GetOut

func (m *Job_Volume) GetOut() string

func (*Job_Volume) ProtoMessage

func (*Job_Volume) ProtoMessage()

func (*Job_Volume) Reset

func (m *Job_Volume) Reset()

func (*Job_Volume) String

func (m *Job_Volume) String() string

func (*Job_Volume) XXX_DiscardUnknown

func (m *Job_Volume) XXX_DiscardUnknown()

func (*Job_Volume) XXX_Marshal

func (m *Job_Volume) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Job_Volume) XXX_Merge

func (m *Job_Volume) XXX_Merge(src proto.Message)

func (*Job_Volume) XXX_Size

func (m *Job_Volume) XXX_Size() int

func (*Job_Volume) XXX_Unmarshal

func (m *Job_Volume) XXX_Unmarshal(b []byte) error

type Notification

type Notification struct {
	ID                   uint64   `protobuf:"varint,1,opt,name=ID,proto3" json:"ID,omitempty"`
	Data                 string   `protobuf:"bytes,2,opt,name=Data,proto3" json:"Data,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Notification) Descriptor

func (*Notification) Descriptor() ([]byte, []int)

func (*Notification) GetData

func (m *Notification) GetData() string

func (*Notification) GetID

func (m *Notification) GetID() uint64

func (*Notification) ProtoMessage

func (*Notification) ProtoMessage()

func (*Notification) Reset

func (m *Notification) Reset()

func (*Notification) String

func (m *Notification) String() string

func (*Notification) XXX_DiscardUnknown

func (m *Notification) XXX_DiscardUnknown()

func (*Notification) XXX_Marshal

func (m *Notification) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Notification) XXX_Merge

func (m *Notification) XXX_Merge(src proto.Message)

func (*Notification) XXX_Size

func (m *Notification) XXX_Size() int

func (*Notification) XXX_Unmarshal

func (m *Notification) XXX_Unmarshal(b []byte) error

type Runner

type Runner interface {
	// Start the runner (if needed)
	Start()
	//Stop()
	// Run / execute a job
	Run(context.Context, *Job) JobStatus
}

Jump to

Keyboard shortcuts

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