Documentation ¶
Index ¶
Constants ¶
View Source
const ( // SandboxesManagerService is service key SandboxesManagerService = "PipSandboxesManager" // NamespacesUnitService is service key NamespacesUnitService = "PipNamespacesUnit" // RunnerService is service key RunnerService = "PipRunner" // TasksUnitService is service key TasksUnitService = "PipTasksUnit" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NamasepacesParams ¶
NamasepacesParams is params for scope
type Namespaces ¶
type Namespaces interface { // Task return task namespace Task() (value string) // Lock return lock namespace Lock() (value string) }
Namespaces storage namespaces
type NamespacesUnit ¶
type NamespacesUnit interface { // FromScope return namespace from scope (or defaultNamespace if scope is undefined) FromScope(scp app.Scope, defaultNamespace Namespaces) (namespace Namespaces, err error) // DefineScope define scope namespaces Define(scp app.Scope, namspaces Namespaces) (err error) // Bind copy namespaces from parent scope to child scope Bind(parent, child app.Scope) (err error) }
NamespacesUnit is a service to controll namespaces
type Pip ¶
type Pip struct { Name string Description string Context PipContext Namespaces Namespaces Sandbox string Lock commservices.LockMap Wait []string }
Pip describe single commands pipeline
type PipContext ¶
type PipContext struct { In app.Input Out app.Output Err app.Output CWD filesystem.Filespace Scope app.Scope }
PipContext contains pip I/O data
type Sandbox ¶
Sandbox is a security mechanism for separating running programs, usually in an effort to mitigate system failures or software vulnerabilities from spreading
type SandboxBuilder ¶
type SandboxBuilder interface { Is(name string) bool Build(name string) (sandbox Sandbox, err error) }
SandboxBuilder is a sandbox instance generator
type SandboxesManager ¶
type SandboxesManager interface { Add(sandboxsFactory SandboxBuilder) Get(name string) (sandbox Sandbox, err error) }
SandboxesManager is a tool to menage sandboxes.
type Task ¶
type Task interface { // Name return task name Name() string // FullName return name with task namespace as prefix FullName() string // Description return task description Description() string // OBroadcast write task output (and error output) to broadcast OBroadcast() app.BufferedBroadcast // IOBroadcast write input, output and error output to broadcast IOBroadcast() app.BufferedBroadcast // Done return true if task is finished Done() bool // Status return task status description Status() string // Wait for task finish Wait() error // WaitList return list of related tasks to wait for WaitList() []string // WaitLockMapList return map described related resources to lock LockMap() commservices.LockMap // Errors return task errors (or nil) Errors() []error }
Task contains single task data
type TaskWriter ¶
type TaskWriter interface { Task // IOContext return task IOContext IOContext() app.IOContext // SetStatus set task status SetStatus(status string) // Close make task done Close() (err error) }
TaskWriter write data to task
type TasksManager ¶
type TasksManager interface { // OBroadcast write all tasks output logs to broadcast OBroadcast() app.BufferedBroadcast // StatusBroadcast write tasks statuses changes to broadcast StatusBroadcast() app.BufferedBroadcast // Summary write summary log to output Summary(out app.Output) (err error) // Names return tasks names Names() []string // Get task by name Get(name string) (task Task, ok bool) // Create new task from Pip Create(pip Pip) (task TaskWriter, err error) // Wait Wait() (err error) }
TasksManager contains tasks data
Source Files ¶
Click to show internal directories.
Click to hide internal directories.