Documentation
¶
Index ¶
- Constants
- Variables
- func BuildDefinitionToImage(makeClient ClientFactory, conf build.BuildTarget, def *llb.Definition) compute.Computable[oci.Image]
- func BuildFilesystem(ctx context.Context, makeClient ClientFactory, target build.BuildTarget, ...) (compute.Computable[fs.FS], error)
- func BuildImage(ctx context.Context, makeClient ClientFactory, conf build.BuildTarget, ...) (compute.Computable[oci.Image], error)
- func EnsureBuildkitd(ctx context.Context, containerName string) (string, error)
- func MakeClient(config cfg.Configuration, targetPlatform *specs.Platform) compute.Computable[*GatewayClient]
- func MakeImage(makeClient ClientFactory, conf build.BuildTarget, ...) compute.Computable[oci.Image]
- func MakeLocalExcludes(src LocalContents) []string
- func MakeLocalState(src LocalContents) llb.State
- func MarshalForTarget(ctx context.Context, state llb.State, target build.BuildTarget) (*llb.Definition, error)
- func Prune(ctx context.Context, cfg cfg.Configuration, targetPlatform *specs.Platform) error
- func RemoveBuildkitd(ctx context.Context) error
- func Version() (string, error)
- type BuildkitAwareRegistry
- type ClientFactory
- type ExportToRegistryRequest
- type FrontendRequest
- type GatewayClient
- type HostedBuildCluster
- func (*HostedBuildCluster) Descriptor() ([]byte, []int)deprecated
- func (x *HostedBuildCluster) GetClusterId() string
- func (x *HostedBuildCluster) GetTargetPort() int32
- func (*HostedBuildCluster) ProtoMessage()
- func (x *HostedBuildCluster) ProtoReflect() protoreflect.Message
- func (x *HostedBuildCluster) Reset()
- func (x *HostedBuildCluster) String() string
- type LocalContents
- type Overrides
- func (*Overrides) Descriptor() ([]byte, []int)deprecated
- func (x *Overrides) GetBuildkitAddr() string
- func (x *Overrides) GetContainerName() string
- func (x *Overrides) GetHostedBuildCluster() *HostedBuildCluster
- func (*Overrides) ProtoMessage()
- func (x *Overrides) ProtoReflect() protoreflect.Message
- func (x *Overrides) Reset()
- func (x *Overrides) String() string
Constants ¶
View Source
const DefaultContainerName = "fn-buildkitd"
View Source
const KeySourceDateEpoch = "source-date-epoch"
View Source
const SSHAgentProviderID = "default"
Variables ¶
View Source
var ( BuildkitSecrets string ForwardKeychain = false )
View Source
var ( ImportCacheVar = &cacheVar{} ExportCacheVar = &cacheVar{} )
View Source
var File_internal_build_buildkit_devhost_proto protoreflect.FileDescriptor
View Source
var OverridesConfigType = cfg.DefineConfigType[*Overrides]()
View Source
var PreDigestLocalInputs = environment.IsRunningInCI()
XXX make this a flag instead. The assumption here is that in CI the filesystem is readonly.
View Source
var SkipExpectedMaxWorkspaceSizeCheck = false
View Source
var TaskOutputBuildkitJsonLog = tasks.Output("buildkit.json", "application/json+fn.buildkit")
View Source
var UsePlaintextLogging = false
Functions ¶
func BuildDefinitionToImage ¶
func BuildDefinitionToImage(makeClient ClientFactory, conf build.BuildTarget, def *llb.Definition) compute.Computable[oci.Image]
func BuildFilesystem ¶
func BuildFilesystem(ctx context.Context, makeClient ClientFactory, target build.BuildTarget, state llb.State, localDirs ...LocalContents) (compute.Computable[fs.FS], error)
func BuildImage ¶
func BuildImage(ctx context.Context, makeClient ClientFactory, conf build.BuildTarget, state llb.State, localDirs ...LocalContents) (compute.Computable[oci.Image], error)
func EnsureBuildkitd ¶
func MakeClient ¶ added in v0.0.108
func MakeClient(config cfg.Configuration, targetPlatform *specs.Platform) compute.Computable[*GatewayClient]
func MakeImage ¶ added in v0.0.83
func MakeImage(makeClient ClientFactory, conf build.BuildTarget, req compute.Computable[*FrontendRequest], localDirs []LocalContents, targetName compute.Computable[oci.AllocatedRepository]) compute.Computable[oci.Image]
func MakeLocalExcludes ¶
func MakeLocalExcludes(src LocalContents) []string
func MakeLocalState ¶
func MakeLocalState(src LocalContents) llb.State
func MarshalForTarget ¶ added in v0.0.108
func MarshalForTarget(ctx context.Context, state llb.State, target build.BuildTarget) (*llb.Definition, error)
func RemoveBuildkitd ¶
Types ¶
type BuildkitAwareRegistry ¶
type BuildkitAwareRegistry interface {
CheckExportRequest(*GatewayClient, oci.AllocatedRepository) (*ExportToRegistryRequest, *ExportToRegistryRequest)
}
type ClientFactory ¶ added in v0.0.108
type ClientFactory interface {
MakeClient(context.Context) (*GatewayClient, error)
}
func DeferClient ¶ added in v0.0.108
func DeferClient(config cfg.Configuration, targetPlatform *specs.Platform) ClientFactory
type ExportToRegistryRequest ¶
type FrontendRequest ¶ added in v0.0.83
type GatewayClient ¶
func Client ¶ added in v0.0.108
func Client(ctx context.Context, config cfg.Configuration, targetPlatform *specs.Platform) (*GatewayClient, error)
func (*GatewayClient) BuildkitOpts ¶ added in v0.0.108
func (cli *GatewayClient) BuildkitOpts() builtkitOpts
func (*GatewayClient) MakeClient ¶ added in v0.0.108
func (cli *GatewayClient) MakeClient(_ context.Context) (*GatewayClient, error)
func (*GatewayClient) UsesDocker ¶
func (cli *GatewayClient) UsesDocker() bool
type HostedBuildCluster ¶ added in v0.0.92
type HostedBuildCluster struct { ClusterId string `protobuf:"bytes,1,opt,name=cluster_id,json=clusterId,proto3" json:"cluster_id,omitempty"` TargetPort int32 `protobuf:"varint,2,opt,name=target_port,json=targetPort,proto3" json:"target_port,omitempty"` // contains filtered or unexported fields }
func (*HostedBuildCluster) Descriptor
deprecated
added in
v0.0.92
func (*HostedBuildCluster) Descriptor() ([]byte, []int)
Deprecated: Use HostedBuildCluster.ProtoReflect.Descriptor instead.
func (*HostedBuildCluster) GetClusterId ¶ added in v0.0.92
func (x *HostedBuildCluster) GetClusterId() string
func (*HostedBuildCluster) GetTargetPort ¶ added in v0.0.92
func (x *HostedBuildCluster) GetTargetPort() int32
func (*HostedBuildCluster) ProtoMessage ¶ added in v0.0.92
func (*HostedBuildCluster) ProtoMessage()
func (*HostedBuildCluster) ProtoReflect ¶ added in v0.0.92
func (x *HostedBuildCluster) ProtoReflect() protoreflect.Message
func (*HostedBuildCluster) Reset ¶ added in v0.0.92
func (x *HostedBuildCluster) Reset()
func (*HostedBuildCluster) String ¶ added in v0.0.92
func (x *HostedBuildCluster) String() string
type LocalContents ¶
type LocalContents struct { Module build.Workspace Path string ObserveChanges bool // For Web we apply special handling temporarily: not including the root tsconfig.json as it belongs to Node.js TemporaryIsWeb bool // If set, only files matching these patterns will be included in the state. IncludePatterns []string // Added to the base exclude patterns. Override include patterns: if a file matches both, it is not included. ExcludePatterns []string }
func Unwrap ¶
func Unwrap(c compute.Computable[oci.Image]) (llb.State, []LocalContents, bool)
func (LocalContents) Abs ¶
func (l LocalContents) Abs() string
type Overrides ¶
type Overrides struct { ContainerName string `protobuf:"bytes,1,opt,name=container_name,json=containerName,proto3" json:"container_name,omitempty"` BuildkitAddr string `protobuf:"bytes,2,opt,name=buildkit_addr,json=buildkitAddr,proto3" json:"buildkit_addr,omitempty"` HostedBuildCluster *HostedBuildCluster `protobuf:"bytes,3,opt,name=hosted_build_cluster,json=hostedBuildCluster,proto3" json:"hosted_build_cluster,omitempty"` // contains filtered or unexported fields }
Used for configuration purposes.
func (*Overrides) Descriptor
deprecated
func (*Overrides) GetBuildkitAddr ¶
func (*Overrides) GetContainerName ¶
func (*Overrides) GetHostedBuildCluster ¶ added in v0.0.92
func (x *Overrides) GetHostedBuildCluster() *HostedBuildCluster
func (*Overrides) ProtoMessage ¶
func (*Overrides) ProtoMessage()
func (*Overrides) ProtoReflect ¶
func (x *Overrides) ProtoReflect() protoreflect.Message
Click to show internal directories.
Click to hide internal directories.