dagger

package
v0.0.0-...-ccb11bd Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2024 License: MIT Imports: 27 Imported by: 0

Documentation

Overview

Package dagger GENERATED BY gengo:runtimedoc DON'T EDIT THIS FILE

Index

Constants

This section is empty.

Variables

View Source
var DefaultRunnerHost = fmt.Sprintf("docker-image://ghcr.io/dagger/engine:%s", engineVersion())
View Source
var RunnerContext = contextx.New[Runner]()
View Source
var ScopeContext = contextx.New[Scope](contextx.WithDefaultsFunc(func() Scope {
	return Scope{}
}))

Functions

func Run

func Run(ctx context.Context, name string, fn func(ctx context.Context) error) error

func Tracer

func Tracer() trace.Tracer

Types

type Client

type Client = dagger.Client

type Engine

type Engine interface {
	Shutdown(ctx context.Context) error
	Do(ctx context.Context, do func(ctx context.Context, client *Client) error) error
}

func NewEngine

func NewEngine(params Params) Engine

type EngineOptionFunc

type EngineOptionFunc = func(x *options)

func WithEngineCallback

func WithEngineCallback(callback func(context.Context, string, string, string)) EngineOptionFunc

func WithEngineLogs

func WithEngineLogs(exporter sdklog.Exporter) EngineOptionFunc

func WithEngineTrace

func WithEngineTrace(exporter trace.SpanExporter) EngineOptionFunc

type EngineWithScope

type EngineWithScope interface {
	Engine
	Scope() Scope
}

func Select

func Select(ctx context.Context, scope Scope) EngineWithScope

type EnvVariable

type EnvVariable struct {
	Name  string `json:"name"`
	Value string `json:"value"`
}

func (EnvVariable) RuntimeDoc

func (v EnvVariable) RuntimeDoc(names ...string) ([]string, bool)

type Hosts

type Hosts struct {
	Default    *PiperRunnerHost
	Platformed map[Platform][]*PiperRunnerHost
}

func (*Hosts) AddHost

func (h *Hosts) AddHost(runnerHost *PiperRunnerHost)

func (*Hosts) GetHost

func (h *Hosts) GetHost(platform Platform) *PiperRunnerHost

func (Hosts) RuntimeDoc

func (v Hosts) RuntimeDoc(names ...string) ([]string, bool)

func (*Hosts) WithRunnerHost

func (h *Hosts) WithRunnerHost(options client.Params, name string) client.Params

type ImageConfig

type ImageConfig struct {
	WorkingDir string            `json:"workdir,omitempty"`
	Env        map[string]string `json:"env,omitempty"`
	Labels     map[string]string `json:"label,omitempty"`
	Entrypoint []string          `json:"entrypoint,omitempty"`
	Cmd        []string          `json:"cmd,omitempty"`
	User       string            `json:"user,omitempty"`
}

func ResolveImageConfig

func ResolveImageConfig(ctx context.Context, c *Client, id dagger.ContainerID) (ImageConfig, error)

func (ImageConfig) RuntimeDoc

func (v ImageConfig) RuntimeDoc(names ...string) ([]string, bool)

type Label

type Label struct {
	Name  string `json:"name"`
	Value string `json:"value"`
}

func (Label) RuntimeDoc

func (v Label) RuntimeDoc(names ...string) ([]string, bool)

type Params

type Params = engineclient.Params

type PiperRunnerHost

type PiperRunnerHost struct {
	Name       string
	RunnerHost string
	Platforms  []pkgwd.Platform
}

func ParsePiperRunnerHosts

func ParsePiperRunnerHosts(str string) ([]PiperRunnerHost, error)

func RunnerHost

func RunnerHost() *PiperRunnerHost

func (PiperRunnerHost) RuntimeDoc

func (v PiperRunnerHost) RuntimeDoc(names ...string) ([]string, bool)

type Platform

type Platform = dagger.Platform

type Runner

type Runner interface {
	Select(ctx context.Context, scope Scope) EngineWithScope
	Shutdown(ctx context.Context) error
}

func NewRunner

func NewRunner(optFns ...EngineOptionFunc) (Runner, error)

type Scope

type Scope struct {
	Platform Platform
	ID       string
}

func (Scope) RuntimeDoc

func (v Scope) RuntimeDoc(names ...string) ([]string, bool)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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