swarm

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateArgs

func CreateArgs(spec Spec) []string

Types

type CacheMount

type CacheMount struct {
	Name   string
	Target string
}

type Client

type Client struct {
	// contains filtered or unexported fields
}

func New

func New(config Config) *Client

func (*Client) Cancel

func (c *Client) Cancel(ctx context.Context, id string) error

func (*Client) Check

func (c *Client) Check(ctx context.Context) error

func (*Client) Create

func (c *Client) Create(ctx context.Context, spec Spec) (string, error)

func (*Client) List

func (c *Client) List(ctx context.Context) ([]protocol.Job, error)

func (*Client) Logs

func (c *Client) Logs(ctx context.Context, id string, follow bool, output io.Writer) error

func (*Client) Remove

func (c *Client) Remove(ctx context.Context, id string) error

func (*Client) Status

func (c *Client) Status(ctx context.Context, id string) (protocol.Job, error)

func (*Client) ValidateImage

func (c *Client) ValidateImage(ctx context.Context, image string) error

func (*Client) Wait

func (c *Client) Wait(ctx context.Context, id string, output io.Writer) (protocol.Job, error)

type Config

type Config struct {
	Binary string
	Host   string
}

type Spec

type Spec struct {
	ID                 string
	Image              string
	CASAddress         string
	CASInstance        string
	RootDigest         string
	JobsRoot           string
	Command            []string
	WorkingDirectory   string
	Environment        map[string]string
	EntrypointHostPath string
	Timeout            time.Duration
	CacheRoot          string
	ProjectID          string
	Caches             []CacheMount
	HostUID            string
	HostGID            string
}

Jump to

Keyboard shortcuts

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