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 DevelopmentVersion = fmt.Sprintf("devel (%s)", vcsRevision())
View Source
var Version string
Version holds the complete version number. Filled in at linking time.
Functions ¶
func ContextWithClientMetadata ¶ added in v0.8.0
func ContextWithClientMetadata(ctx context.Context, clientMetadata *ClientMetadata) context.Context
func RunnerHost ¶ added in v0.8.0
func RunnerHost() string
Types ¶
type ClientMetadata ¶ added in v0.8.0
type ClientMetadata struct {
// ClientID is unique to every session created by every client
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.Solve 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 opportunisticly 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 []pipeline.Label `json:"labels"`
// ParentClientIDs is a list of session ids that are parents of the current
// session. The first element is the direct parent, the second element is the
// parent of the parent, and so on.
ParentClientIDs []string `json:"parent_client_ids"`
// If this client is for a module function, this digest will be set in the
// grpc context metadata for any api requests back to the engine. It's used by the API
// server to determine which schema to serve and other module context metadata.
ModuleCallerDigest digest.Digest `json:"module_caller_digest"`
// Import configuration for Buildkit's remote cache
UpstreamCacheImportConfig []*controlapi.CacheOptionsEntry
}
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) ClientIDs ¶ added in v0.8.0
func (m ClientMetadata) ClientIDs() []string
ClientIDs returns the ClientID followed by ParentClientIDs.
func (ClientMetadata) ToGRPCMD ¶ added in v0.8.0
func (m ClientMetadata) ToGRPCMD() metadata.MD
type LocalExportOpts ¶ added in v0.8.0
type LocalExportOpts struct {
DestClientID string `json:"dest_client_id"`
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"`
}
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) ToGRPCMD ¶ added in v0.8.0
func (o LocalExportOpts) ToGRPCMD() metadata.MD
type LocalImportOpts ¶ added in v0.8.0
type LocalImportOpts struct {
OwnerClientID string `json:"owner_client_id"`
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"`
}
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) ToGRPCMD ¶ added in v0.8.0
func (o LocalImportOpts) ToGRPCMD() metadata.MD
Click to show internal directories.
Click to hide internal directories.