dagger

package
v0.0.0-...-9004d47 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2024 License: MIT Imports: 19 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

This section is empty.

Types

type Client

type Client = dagger.Client

type Conn

type Conn func(*http.Request) (*http.Response, error)

func EngineConn

func EngineConn(engineClient *engineclient.Client) Conn

func (Conn) Close

func (f Conn) Close() error

func (Conn) Do

func (f Conn) Do(r *http.Request) (*http.Response, error)

func (Conn) Host

func (f Conn) Host() string

func (Conn) RuntimeDoc

func (Conn) RuntimeDoc(names ...string) ([]string, bool)

type Engine

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

func NewEngine

func NewEngine(scope Scope, params Params) Engine

func Select

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

type EngineOptionFunc

type EngineOptionFunc = func(x *options)

func WithLogExporter

func WithLogExporter(exporter sdklog.LogExporter) EngineOptionFunc

func WithSpanExporter

func WithSpanExporter(exporter trace.SpanExporter) EngineOptionFunc

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)

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) Engine
	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)

Jump to

Keyboard shortcuts

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