Documentation ¶
Index ¶
- Constants
- Variables
- func CIDevEngineContainer(ctx context.Context, c *dagger.Client, opts ...DevEngineOpts) (*dagger.Container, error)
- func CIDevEngineContainerAndEndpoint(ctx context.Context, c *dagger.Client, opts ...DevEngineOpts) (*dagger.Service, string, error)
- func CodegenBinary(c *dagger.Client) *dagger.File
- func DaggerBinary(c *dagger.Client, version string) *dagger.File
- func DevEngineContainer(ctx context.Context, c *dagger.Client, arches []string, version string, ...) ([]*dagger.Container, error)
- func DevEngineContainerWithGPUSupport(ctx context.Context, c *dagger.Client, arches []string, version string, ...) ([]*dagger.Container, error)
- func DevelDaggerBinary(ctx context.Context, c *dagger.Client) (*dagger.File, error)
- func GetHostEnv(name string) string
- func GoBase(c *dagger.Client) *dagger.Container
- func HostDaggerBinary(c *dagger.Client, version string) *dagger.File
- func HostDockerDir(c *dagger.Client) *dagger.Directory
- func HostSecretVar(c *dagger.Client, name string) dagger.WithContainerFunc
- func HostVar(c *dagger.Client, name string) dagger.WithContainerFunc
- func LintGeneratedCode(target string, fn func() error, files ...string) error
- func PlatformDaggerBinary(c *dagger.Client, goos, goarch, goarm string, version string) *dagger.File
- func Repository(c *dagger.Client) *dagger.Directory
- func RepositoryGoCodeOnly(c *dagger.Client) *dagger.Directory
- func ShellCmd(cmd string) dagger.WithContainerFunc
- func ShellCmds(cmds ...string) dagger.WithContainerFunc
- type DevEngineOpts
- type VersionInfo
Constants ¶
const ( CacheConfigEnvName = "_EXPERIMENTAL_DAGGER_CACHE_CONFIG" GPUSupportEnvName = "_EXPERIMENTAL_DAGGER_GPU_SUPPORT" )
const (
EngineContainerName = "dagger-engine.dev"
)
Variables ¶
var DefaultDevEngineOpts = DevEngineOpts{ EntrypointArgs: map[string]string{ "network-name": "dagger-dev", "network-cidr": "10.88.0.0/16", }, ConfigEntries: map[string]string{ "grpc": `address=["unix:///var/run/buildkit/buildkitd.sock", "tcp://0.0.0.0:1234"]`, `registry."docker.io"`: `mirrors = ["mirror.gcr.io"]`, }, }
Functions ¶
func CIDevEngineContainer ¶
func CodegenBinary ¶
CodegenBinary returns a binary for generating the Go and TypeScript SDKs.
func DaggerBinary ¶
DaggerBinary returns a compiled dagger binary
func DevEngineContainer ¶
func DevEngineContainer(ctx context.Context, c *dagger.Client, arches []string, version string, opts ...DevEngineOpts) ([]*dagger.Container, error)
DevEngineContainer returns a container that runs a dev engine
func DevEngineContainerWithGPUSupport ¶
func DevEngineContainerWithGPUSupport(ctx context.Context, c *dagger.Client, arches []string, version string, opts ...DevEngineOpts) ([]*dagger.Container, error)
DevEngineContainerWithGPUSUpport returns a container that runs a dev engine
func DevelDaggerBinary ¶
DevelDaggerBinary returns a compiled dagger binary with the devel version
func GetHostEnv ¶
GetHostEnv is like os.Getenv but ensures that the env var is set.
func GoBase ¶
GoBase is a standardized base image for running Go, cache optimized for the layout of this repository
NOTE: this function is a shared util ONLY because it's used both by the Engine and the Go SDK. Other languages shouldn't have a common helper.
func HostDaggerBinary ¶
HostDaggerBinary returns a dagger binary compiled to target the host's OS+arch
func HostDockerDir ¶
HostDockerCredentials returns the host's ~/.docker dir if it exists, otherwise just an empty dir
func HostSecretVar ¶
func HostSecretVar(c *dagger.Client, name string) dagger.WithContainerFunc
HostSecretVar is a chainable util for setting a secret env var from the host in a container.
func HostVar ¶
func HostVar(c *dagger.Client, name string) dagger.WithContainerFunc
HostVar is a chainable util for setting an env var from the host in a container.
func LintGeneratedCode ¶
LintGeneratedCode ensures the generated code is up to date.
1) Read currently generated code 2) Generate again 3) Compare 4) Restore original generated code.
func PlatformDaggerBinary ¶
func Repository ¶
Repository with common set of exclude filters to speed up upload
func RepositoryGoCodeOnly ¶
RepositoryGoCodeOnly is Repository, filtered to only contain Go code.
NOTE: this function is a shared util ONLY because it's used both by the Engine and the Go SDK. Other languages shouldn't have a common helper.
func ShellCmd ¶
func ShellCmd(cmd string) dagger.WithContainerFunc
func ShellCmds ¶
func ShellCmds(cmds ...string) dagger.WithContainerFunc
Types ¶
type DevEngineOpts ¶
type DevEngineOpts struct { EntrypointArgs map[string]string ConfigEntries map[string]string Name string }
DevEngineOpts are options for the dev engine
type VersionInfo ¶
func DevelVersionInfo ¶
func (VersionInfo) EngineVersion ¶
func (info VersionInfo) EngineVersion() string