Version: v0.0.0-...-62fa0c4 Latest Latest

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

Go to latest
Published: Jul 8, 2021 License: MIT Imports: 16 Imported by: 0




View Source
const (
	NameSecrets = "secrets"
	NameCache   = "cache"
	NameUser    = "user"
	NameJobs    = "jobs"
	NameLogs    = "logs"
	NameReport  = "report"
	NameTest    = "test"
	NameKvs     = "kvs"
	JobIdFormat = "20060102-150405"


This section is empty.


func DefaultAppPath

func DefaultAppPath() (path string, err error)

func NewJobId

func NewJobId() string

func WithFork

func WithFork(wb Bundle, name string, f func(fwb Bundle) error) error


type Application

type Application interface {
	// Toolbox home path
	Home() string

type Bundle

type Bundle interface {

	// Workspace
	Workspace() Workspace

	// Logger
	Logger() esl_container.Logger

	// REST logger
	Capture() esl_container.Logger

	// Summary logger
	Summary() esl_container.Logger

	// Storage budget
	Budget() app_budget.Budget

	// Log level for console logs
	ConsoleLogLevel() esl.Level

	// True when the workspace bundle is transient.
	IsTransient() bool

Workspace bundle

func ForkBundle

func ForkBundle(wb Bundle, name string) (bundle Bundle, err error)

func ForkBundleWithLevel

func ForkBundleWithLevel(wb Bundle, name string, consoleLevel esl.Level) (bundle Bundle, err error)

func NewBundle

func NewBundle(home string, budget app_budget.Budget, consoleLevel esl.Level, transient bool) (bundle Bundle, err error)

type Job

type Job interface {
	// Path for job
	Job() string

	// Time of the job started
	JobStartTime() time.Time

	// Job ID
	JobId() string

	// Log path for job
	Log() string

	// Test
	Test() string

	// Report path for job
	Report() string

	// Path for KVS storage
	KVS() string

	// Create or get child folder of job folder
	Descendant(name string) (path string, err error)

type MultiUser

type MultiUser interface {

	// User home path
	UserHome() string

type User

type User interface {
	// Secrets path
	Secrets() string

	// Cache
	Cache() string

type Workspace

type Workspace interface {

func Fork

func Fork(ws Workspace, name string) (Workspace, error)

func NewWorkspace

func NewWorkspace(home string, transient bool) (Workspace, error)

func NewWorkspaceByJobPath

func NewWorkspaceByJobPath(home Application, jobId string) (ws Workspace, err error)

Create workspace instance by job path. This will not create directories. Just matches to existing folder structure. Returns error if a

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to