bencher

package
v0.0.0-...-3201664 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ServerImage     = "ghcr.io/schattian/bencher:master"
	ServerRootPath  = "/bencher"
	ContainersLabel = "bencher"

	RunnerRootPath = "/bencher"
)

Variables

View Source
var (
	// host paths
	HostRootPath       = fmt.Sprintf("%s/.bencher", os.Getenv("HOME"))
	HostVersionsPath   = fmt.Sprintf("%s/versions", HostRootPath)
	HostServerRootPath = fmt.Sprintf("%s/server", HostRootPath)
	HostDBFilename     = fmt.Sprintf("%s/%s", HostServerRootPath, db)
	HostPIDFilename    = fmt.Sprintf("%s/%s", HostServerRootPath, pid)

	// server paths
	ServerDBFilename  = fmt.Sprintf("%s/%s", ServerRootPath, db)
	ServerPIDFilename = fmt.Sprintf("%s/%s", ServerRootPath, pid)
)
View Source
var KeyJob = []byte("jobs")
View Source
var (
	KeySched = []byte("sched")
)

Functions

This section is empty.

Types

type DBGetter

type DBGetter func() (*bbolt.DB, error)

type Job

type Job struct {
	Stdout  string
	Stderr  string
	Version string
}

func (*Job) Collect

func (j *Job) Collect(ctx context.Context, docker *client.Client) error

todo: collect in the meantime with follow and tail so it can be obtained through get

func (*Job) Complete

func (j *Job) Complete(ctx context.Context, dbGetter DBGetter, docker *client.Client) error

func (*Job) RunNow

func (j *Job) RunNow(ctx context.Context, dbGetter DBGetter, docker *client.Client) error

func (*Job) Save

func (j *Job) Save(ctx context.Context, db *bbolt.DB) error

func (*Job) Status

func (j *Job) Status() (status string)

func (*Job) Teardown

func (j *Job) Teardown(ctx context.Context, docker *client.Client) error

Jump to

Keyboard shortcuts

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