 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Index ¶
- Constants
- Variables
- func BaseVersion(version string) string
- func CheckMaxVersionCompatibility(version string, maxVersion string) bool
- func CheckVersionCompatibility(version string, minVersion string) bool
- func ContextWithClientMetadata(ctx context.Context, clientMetadata *ClientMetadata) context.Context
- func IsDevVersion(version string) bool
- func NormalizeVersion(version string) string
- func RunnerHost() string
- type ClientMetadata
- type LocalExportOpts
- type LocalImportOpts
Constants ¶
      View Source
      
  
    const ( EngineImageRepo = "registry.dagger.io/engine" Package = "github.com/dagger/dagger" DaggerNameEnv = "_EXPERIMENTAL_DAGGER_ENGINE_NAME" DaggerVersionEnv = "_EXPERIMENTAL_DAGGER_VERSION" DaggerMinimumVersionEnv = "_EXPERIMENTAL_DAGGER_MIN_VERSION" GPUSupportEnv = "_EXPERIMENTAL_DAGGER_GPU_SUPPORT" RunnerHostEnv = "_EXPERIMENTAL_DAGGER_RUNNER_HOST" )
      View Source
      
  
    const ( StdinPrefix = "\x00," StdoutPrefix = "\x01," StderrPrefix = "\x02," ResizePrefix = "resize," ExitPrefix = "exit," )
      View Source
      
  
    const ( HTTPProxyEnvName = "HTTP_PROXY" HTTPSProxyEnvName = "HTTPS_PROXY" FTPProxyEnvName = "FTP_PROXY" NoProxyEnvName = "NO_PROXY" AllProxyEnvName = "ALL_PROXY" SessionAttachablesEndpoint = "/sessionAttachables" InitEndpoint = "/init" QueryEndpoint = "/query" ShutdownEndpoint = "/shutdown" // Buildkit-interpreted session keys, can't change SessionIDMetaKey = "X-Docker-Expose-Session-Uuid" SessionNameMetaKey = "X-Docker-Expose-Session-Name" SessionMethodNameMetaKey = "X-Docker-Expose-Session-Grpc-Method" )
      View Source
      
  
const ( EngineVersionMetaKey = "X-Dagger-Engine" ClientMetadataMetaKey = "X-Dagger-Client-Metadata" // socket session attachable keys SocketURLEncodedKey = "X-Dagger-Socket-URLEncoded" )
Variables ¶
      View Source
      
  
    var ( // Version holds the complete version number. // // Note: this is filled at link-time. // // - For official tagged releases, this is simple semver like vX.Y.Z // - For builds off our repo's main branch, this is a pre-release of the // form vX.Y.Z-<timestamp>-<commit> // - For local dev builds with no other specified version, this is a // pre-release of the form vX.Y.Z-<timestamp>-dev-<dirhash> Version string // MinimumEngineVersion is used by the client to determine the minimum // allowed engine version that can be used by that client. MinimumEngineVersion = "v0.12.5" // MinimumClientVersion is used by the engine to determine the minimum // allowed client version that can connect to that engine. MinimumClientVersion = "v0.12.5" // MinimumModuleVersion is used by the engine to determine the minimum // allowed module engine version that can connect to this engine. // // Set to v0.9.9, because this was when the engineVersion field was // introduced - if it's present and not a dev version, it must be higher // than v0.9.9. MinimumModuleVersion = "v0.9.9" )
      View Source
      
  
    var ProxyEnvNames = []string{ HTTPProxyEnvName, HTTPSProxyEnvName, FTPProxyEnvName, NoProxyEnvName, AllProxyEnvName, }
      View Source
      
  
var ( // Tag holds the tag that the respective engine version is tagged with. // // Note: this is filled at link-time. // // - For official tagged releases, this is simple semver like vX.Y.Z // - For untagged builds, this is a commit sha for the last known commit from main // - For dev builds, this is the last known commit from main (or maybe empty) Tag string )
Functions ¶
func BaseVersion ¶ added in v0.12.4
func CheckMaxVersionCompatibility ¶ added in v0.12.4
func CheckVersionCompatibility ¶ added in v0.11.7
func ContextWithClientMetadata ¶ added in v0.8.0
func ContextWithClientMetadata(ctx context.Context, clientMetadata *ClientMetadata) context.Context
func IsDevVersion ¶ added in v0.13.1
func NormalizeVersion ¶ added in v0.12.4
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 each client, randomly generated each time a client initializes.
	// It's also used as the *buildkit* session ID (as opposed to the dagger session ID), which
	// is created for each client.
	ClientID string `json:"client_id"`
	// ClientSecretToken is a secret token that is unique to every client.
	// Every request w/ that client ID must also include the same token.
	ClientSecretToken string `json:"client_secret_token"`
	// SessionID is the id of the dagger session that a client and any of its nested
	// module clients connect to
	SessionID string `json:"session_id"`
	// ClientHostname is the hostname of the client that made the request. It's
	// used to help identify clients in the logs more clearly; nothing functional.
	ClientHostname string `json:"client_hostname"`
	// ClientStableID is an ID that's persisted in a client's XDG state directory.
	// It's currently used to identify clients that are executing on the same host in order to
	// tell buildkit which filesync cache ref to re-use when syncing dirs+files to the engine.
	ClientStableID string `json:"client_stable_id"`
	// ClientVersion is the version string of the client that make the request.
	ClientVersion string `json:"client_version"`
	// (Optional) Pipeline labels for e.g. vcs info like branch, commit, etc.
	Labels map[string]string `json:"labels"`
	// Interactive mode
	Interactive bool `json:"interactive"`
	// InteractiveCommand changes the command that is run in interactive mode.
	InteractiveCommand []string `json:"interactive_command"`
	// 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
	// SSH auth socket path
	SSHAuthSocketPath string
}
    func ClientMetadataFromContext ¶ added in v0.8.0
func ClientMetadataFromContext(ctx context.Context) (*ClientMetadata, error)
func ClientMetadataFromHTTPHeaders ¶ added in v0.11.8
func ClientMetadataFromHTTPHeaders(h http.Header) (*ClientMetadata, error)
func (ClientMetadata) AppendToHTTPHeaders ¶ added in v0.11.8
func (m ClientMetadata) AppendToHTTPHeaders(h http.Header) http.Header
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"`
	StatResolvePath    bool     `json:"stat_resolve_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
      ¶
      Directories
      ¶
    
    | Path | Synopsis | 
|---|---|
| distconsts
            module
           | |
| sources
       | |
| Package vcs exposes functions for resolving import paths and using version control systems, which can be used to implement behavior similar to the standard "go get" command. | Package vcs exposes functions for resolving import paths and using version control systems, which can be used to implement behavior similar to the standard "go get" command. | 
 Click to show internal directories. 
   Click to hide internal directories.