Documentation ¶
Index ¶
- Constants
- func BK2Progrock(event *bkclient.SolveStatus) *progrock.StatusUpdate
- func ConvertToWorkerCacheResult(ctx context.Context, res *solverresult.Result[*ref]) (*solverresult.Result[bkcache.ImmutableRef], error)
- func DecodeIDHack(scheme string, id string, val any) error
- func EncodeIDHack(val any) (string, error)
- func ProgrockForwarder(sockPath string, w progrock.Writer) (progrock.Writer, func() error, error)
- func RecordBuildkitStatus(rec *progrock.Recorder, solveCh <-chan *bkclient.SolveStatus) error
- func RecordVertexes(recorder *progrock.Recorder, def *pb.Definition)
- type Client
- func (c *Client) Close() error
- func (c *Client) CombinedResult(ctx context.Context) (*Result, error)
- func (c *Client) ExportContainerImage(ctx context.Context, inputByPlatform map[string]ContainerExport, ...) (map[string]string, error)
- func (c *Client) GetSessionCaller(ctx context.Context, clientID string) (bksession.Caller, error)
- func (c *Client) ID() string
- func (c *Client) LocalDirExport(ctx context.Context, def *bksolverpb.Definition, destPath string) error
- func (c *Client) LocalFileExport(ctx context.Context, def *bksolverpb.Definition, destPath string, ...) error
- func (c *Client) LocalImportLLB(ctx context.Context, srcPath string, opts ...llb.LocalOption) (llb.State, error)
- func (c *Client) NewContainer(ctx context.Context, req bkgw.NewContainerRequest) (bkgw.Container, error)
- func (c *Client) PublishContainerImage(ctx context.Context, inputByPlatform map[string]ContainerExport, ...) (map[string]string, error)
- func (c *Client) ReadCallerHostFile(ctx context.Context, path string) ([]byte, error)
- func (c *Client) RegisterClient(clientID, clientHostname, secretToken string) error
- func (c *Client) ResolveImageConfig(ctx context.Context, ref string, opt llb.ResolveImageConfigOpt) (digest.Digest, []byte, error)
- func (c *Client) Solve(ctx context.Context, req bkgw.SolveRequest) (_ *Result, rerr error)
- func (c *Client) UpstreamCacheExport(ctx context.Context, cacheExportFuncs []ResolveCacheExporterFunc) error
- func (c *Client) VerifyClient(clientID, secretToken string) error
- func (c *Client) WriteStatusesTo(ctx context.Context, ch chan *bkclient.SolveStatus) error
- type ContainerExport
- type ExecError
- type Opts
- type ProgrockLogrusWriter
- type ResolveCacheExporterFunc
- type Result
Constants ¶
View Source
const ( // Exec errors will only include the last this number of bytes of output. MaxExecErrorOutputBytes = 100 * 1024 // TruncationMessage is the message that will be prepended to truncated output. TruncationMessage = "[omitting %d bytes]..." // MaxFileContentsChunkSize sets the maximum chunk size for ReadFile calls // Equals around 95% of the max message size (4MB) in // order to keep space for any Protocol Buffers overhead: MaxFileContentsChunkSize = 3984588 // MaxFileContentsSize sets the limit of the maximum file size // that can be retrieved using File.Contents, currently set to 128MB: MaxFileContentsSize = 128 << 20 // MetaMountDestPath is the special path that the shim writes metadata to. MetaMountDestPath = "/.dagger_meta_mount" // MetaSourcePath is a world-writable directory created and mounted to /dagger. MetaSourcePath = "meta" )
View Source
const FocusPrefix = "[focus] "
View Source
const InternalPrefix = "[internal] "
View Source
const OCIStoreName = "dagger-oci"
OCIStoreName is the name of the OCI content store used for OCI tarball imports.
Variables ¶
This section is empty.
Functions ¶
func BK2Progrock ¶
func BK2Progrock(event *bkclient.SolveStatus) *progrock.StatusUpdate
func ConvertToWorkerCacheResult ¶
func ConvertToWorkerCacheResult(ctx context.Context, res *solverresult.Result[*ref]) (*solverresult.Result[bkcache.ImmutableRef], error)
func EncodeIDHack ¶
func ProgrockForwarder ¶
func RecordBuildkitStatus ¶
func RecordBuildkitStatus(rec *progrock.Recorder, solveCh <-chan *bkclient.SolveStatus) error
func RecordVertexes ¶
func RecordVertexes(recorder *progrock.Recorder, def *pb.Definition)
Types ¶
type Client ¶
type Client struct { Opts // contains filtered or unexported fields }
Client is dagger's internal interface to buildkit APIs
func (*Client) CombinedResult ¶
CombinedResult returns a buildkit result with all the refs solved by this client so far. This is useful for constructing a result for upstream remote caching.
func (*Client) ExportContainerImage ¶
func (*Client) GetSessionCaller ¶
func (*Client) LocalDirExport ¶
func (c *Client) LocalDirExport( ctx context.Context, def *bksolverpb.Definition, destPath string, ) error
func (*Client) LocalFileExport ¶
func (c *Client) LocalFileExport( ctx context.Context, def *bksolverpb.Definition, destPath string, filePath string, allowParentDirPath bool, ) error
func (*Client) LocalImportLLB ¶
func (*Client) NewContainer ¶
func (*Client) PublishContainerImage ¶
func (*Client) ReadCallerHostFile ¶
func (*Client) RegisterClient ¶
func (*Client) ResolveImageConfig ¶
func (*Client) UpstreamCacheExport ¶
func (c *Client) UpstreamCacheExport(ctx context.Context, cacheExportFuncs []ResolveCacheExporterFunc) error
func (*Client) VerifyClient ¶
func (*Client) WriteStatusesTo ¶
type ContainerExport ¶
type ContainerExport struct { Definition *bksolverpb.Definition Config specs.ImageConfig }
type ExecError ¶
type ExecError struct { Cmd []string ExitCode int Stdout string Stderr string // contains filtered or unexported fields }
ExecError is an error that occurred while executing an `Op_Exec`.
func (*ExecError) Extensions ¶
type Opts ¶
type Opts struct { Worker bkworker.Worker SessionManager *bksession.Manager LLBSolver *llbsolver.Solver GenericSolver *bksolver.Solver SecretStore bksecrets.SecretStore AuthProvider *auth.RegistryAuthProvider PrivilegedExecEnabled bool UpstreamCacheImports []bkgw.CacheOptionsEntry // MainClientCaller is the caller who initialized the server associated with this // client. It is special in that when it shuts down, the client will be closed and // that registry auth and sockets are currently only ever sourced from this caller, // not any nested clients (may change in future). MainClientCaller bksession.Caller }
type ProgrockLogrusWriter ¶
type ProgrockLogrusWriter struct{}
func (ProgrockLogrusWriter) Close ¶
func (w ProgrockLogrusWriter) Close() error
func (ProgrockLogrusWriter) WriteStatus ¶
func (w ProgrockLogrusWriter) WriteStatus(ev *progrock.StatusUpdate) error
type Result ¶
type Result = solverresult.Result[*ref]
Click to show internal directories.
Click to hide internal directories.