types

package
v0.0.0-...-d889d1a Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ContainerStarted  ContainerCondition = "START"
	ContainerComplete                    = "COMPLETE"
	ContainerSuccess                     = "SUCCESS"
	ContainerHealthy                     = "HEALTHY"
)
View Source
const (
	ProjectName = "crun"
)

Variables

View Source
var ErrComposeFileNotFound = errors.New("no compose.yaml file found")

Functions

This section is empty.

Types

type Container

type Container struct {
	Image       string
	Name        string
	Cpus        float32
	Memory      uint64
	Platform    string
	Essential   *bool // default true
	Volumes     []TaskVolume
	VolumesFrom []string // container (default rw), container:rw, or container:ro
	EntryPoint  []string
	Command     []string // overridden by Run()
	WorkDir     string
	DependsOn   map[string]ContainerCondition // container name -> condition
}

type ContainerCondition

type ContainerCondition string

type Driver

type Driver interface {
	SetUp(ctx context.Context, containers []Container) error
	TearDown(ctx context.Context) error
	Run(ctx context.Context, env map[string]string, args ...string) (TaskID, error)
	Tail(ctx context.Context, taskID TaskID) error
	// Query(ctx context.Context, taskID TaskID, since time.Time) error
	Stop(ctx context.Context, taskID TaskID) error
	// Exec(ctx context.Context, taskID TaskID, args ...string) error
	GetInfo(ctx context.Context, taskID TaskID) (*TaskInfo, error)
	PutSecret(ctx context.Context, name, value string) error
	// DeleteSecrets(ctx context.Context, names ...string) error
	ListSecrets(ctx context.Context) ([]string, error) // no values
	CreateUploadURL(ctx context.Context, name string) (string, error)
}

type ETag

type ETag = string

type TaskID

type TaskID *string

type TaskInfo

type TaskInfo struct {
	IP string
}

type TaskVolume

type TaskVolume struct {
	Source   string
	Target   string
	ReadOnly bool
}

type TenantName

type TenantName string
const (
	DEFAULT_TENANT TenantName = "" // the default tenant (GitHub login)
)

func (TenantName) String

func (t TenantName) String() string

Jump to

Keyboard shortcuts

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