Documentation ¶
Index ¶
Constants ¶
View Source
const ( StdinPrefix = "\x00," StdoutPrefix = "\x01," StderrPrefix = "\x02," ResizePrefix = "resize," ExitPrefix = "exit," )
View Source
const (
EngineVersionMetaKey = "x-dagger-engine"
)
Variables ¶
View Source
var ( EngineImageRepo = "registry.dagger.io/engine" Package = "github.com/dagger/dagger" GPUSupportEnvName = "_EXPERIMENTAL_DAGGER_GPU_SUPPORT" )
View Source
var Version string
Version holds the complete version number. Filled in at linking time. For official tagged releases, this is simple semver like x.y.z For builds off our repo's main branch, this is the git commit sha For local dev builds, this is a content hash of dagger repo source from "git write-tree"
Functions ¶
func ContextWithClientMetadata ¶ added in v0.8.0
func ContextWithClientMetadata(ctx context.Context, clientMetadata *ClientMetadata) context.Context
func RunnerHost ¶ added in v0.8.0
Types ¶
type ClientMetadata ¶ added in v0.8.0
type ClientMetadata struct { // ClientID is unique to each client. The main client's ID is the empty string, // any module and/or nested exec client's ID is a unique digest. ClientID string `json:"client_id"` // ClientSecretToken is a secret token that is unique to every client. It's // initially provided to the server in the controller.Session request. Every // other request w/ that client ID must also include the same token. ClientSecretToken string `json:"client_secret_token"` // ServerID is the id of the server that a client and any of its nested // module clients connect to ServerID string `json:"server_id"` // If RegisterClient is true, then a call to Session will initialize the // server if it hasn't already been initialized and register the session's // attachables with it either way. If false, then the session conn will be // forwarded to the server RegisterClient bool `json:"register_client"` // ClientHostname is the hostname of the client that made the request. It's // used opportunistically as a best-effort, semi-stable identifier for the // client across multiple sessions, which can be useful for debugging and for // minimizing occurrences of both excessive cache misses and excessive cache // matches. ClientHostname string `json:"client_hostname"` // (Optional) Pipeline labels for e.g. vcs info like branch, commit, etc. Labels telemetry.Labels `json:"labels"` // Import configuration for Buildkit's remote cache UpstreamCacheImportConfig []*controlapi.CacheOptionsEntry // Export configuration for Buildkit's remote cache UpstreamCacheExportConfig []*controlapi.CacheOptionsEntry // Dagger Cloud Token CloudToken string // Disable analytics DoNotTrack bool }
func ClientMetadataFromContext ¶ added in v0.8.0
func ClientMetadataFromContext(ctx context.Context) (*ClientMetadata, error)
func (ClientMetadata) AppendToMD ¶ added in v0.8.0
func (m ClientMetadata) AppendToMD(md metadata.MD) metadata.MD
func (ClientMetadata) BuildkitSessionID ¶ added in v0.11.3
func (m ClientMetadata) BuildkitSessionID() string
The ID to use for this client's buildkit session. It's a combination of both the client and the server IDs to account for the fact that the client ID is a content digest for functions/nested-execs, meaning it can reoccur across different servers; that doesn't work because buildkit's SessionManager is global to the whole process.
func (ClientMetadata) ToGRPCMD ¶ added in v0.8.0
func (m ClientMetadata) ToGRPCMD() metadata.MD
type LocalExportOpts ¶ added in v0.8.0
type LocalExportOpts struct { Path string `json:"path"` IsFileStream bool `json:"is_file_stream"` FileOriginalName string `json:"file_original_name"` AllowParentDirPath bool `json:"allow_parent_dir_path"` FileMode os.FileMode `json:"file_mode"` // whether to just merge in contents of a directory to the target on the host // or to replace the target entirely such that it matches the source directory, // which includes deleting any files that are not in the source directory Merge bool }
func LocalExportOptsFromContext ¶ added in v0.8.0
func LocalExportOptsFromContext(ctx context.Context) (*LocalExportOpts, error)
func (LocalExportOpts) AppendToOutgoingContext ¶ added in v0.8.0
func (o LocalExportOpts) AppendToOutgoingContext(ctx context.Context) context.Context
func (*LocalExportOpts) FromGRPCMD ¶ added in v0.11.2
func (o *LocalExportOpts) FromGRPCMD(md metadata.MD) error
func (LocalExportOpts) ToGRPCMD ¶ added in v0.8.0
func (o LocalExportOpts) ToGRPCMD() metadata.MD
type LocalImportOpts ¶ added in v0.8.0
type LocalImportOpts struct { Path string `json:"path"` IncludePatterns []string `json:"include_patterns"` ExcludePatterns []string `json:"exclude_patterns"` FollowPaths []string `json:"follow_paths"` ReadSingleFileOnly bool `json:"read_single_file_only"` MaxFileSize int64 `json:"max_file_size"` StatPathOnly bool `json:"stat_path_only"` StatReturnAbsPath bool `json:"stat_return_abs_path"` }
func LocalImportOptsFromContext ¶ added in v0.8.0
func LocalImportOptsFromContext(ctx context.Context) (*LocalImportOpts, error)
func (LocalImportOpts) AppendToOutgoingContext ¶ added in v0.8.0
func (o LocalImportOpts) AppendToOutgoingContext(ctx context.Context) context.Context
func (*LocalImportOpts) FromGRPCMD ¶ added in v0.11.2
func (o *LocalImportOpts) FromGRPCMD(md metadata.MD) error
func (LocalImportOpts) ToGRPCMD ¶ added in v0.8.0
func (o LocalImportOpts) ToGRPCMD() metadata.MD
Directories ¶
Path | Synopsis |
---|---|
Package consts exists to facilitate sharing values between our CI infra and dependent code (e.g.
|
Package consts exists to facilitate sharing values between our CI infra and dependent code (e.g. |
sources
|
|
Click to show internal directories.
Click to hide internal directories.