types

package
v0.0.0-...-f3eac6d Latest Latest
Warning

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

Go to latest
Published: Oct 29, 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 TenantID

type TenantID string
const (
	DEFAULT_TENANT TenantID = "" // the default tenant (GitHub user ID)
)

func (TenantID) String

func (t TenantID) String() string

Jump to

Keyboard shortcuts

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