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 DeferBuildFilesystem(makeClient ClientFactory, secrets secrets.GroundedSecrets, ...) compute.Computable[fs.FS]
- 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 ColocatedBuildCluster
- func (*ColocatedBuildCluster) Descriptor() ([]byte, []int)deprecated
- func (x *ColocatedBuildCluster) GetMatchingPodLabels() map[string]string
- func (x *ColocatedBuildCluster) GetNamespace() string
- func (x *ColocatedBuildCluster) GetTargetPort() int32
- func (*ColocatedBuildCluster) ProtoMessage()
- func (x *ColocatedBuildCluster) ProtoReflect() protoreflect.Message
- func (x *ColocatedBuildCluster) Reset()
- func (x *ColocatedBuildCluster) String() string
- type ExportToRegistryRequest
- type FrontendRequest
- type GatewayClient
- type HostedBuildCluster
- func (*HostedBuildCluster) Descriptor() ([]byte, []int)deprecated
- func (x *HostedBuildCluster) GetClusterId() string
- func (x *HostedBuildCluster) GetEndpoint() 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 Input
- type LocalContents
- type Overrides
- func (*Overrides) Descriptor() ([]byte, []int)deprecated
- func (x *Overrides) GetBuildkitAddr() string
- func (x *Overrides) GetColocatedBuildCluster() *ColocatedBuildCluster
- 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 ( ImportCacheVar = &cacheVar{} ExportCacheVar = &cacheVar{} )
View Source
var ( BuildkitSecrets string ForwardKeychain = true )
View Source
var ( BuildOnNamespaceCloud = knobs.Bool("build_in_nscloud", "If set to true, builds are triggered remotely.", false) BuildOnNamespaceCloudUnlessHost = knobs.Bool("build_in_nscloud_unless_host", "If set to true, builds that match the host platform run locally. All other builds are triggered remotely.", false) )
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 DeferBuildFilesystem ¶ added in v0.0.112
func DeferBuildFilesystem(makeClient ClientFactory, secrets secrets.GroundedSecrets, target build.BuildTarget, state compute.Computable[*Input], localDirs ...LocalContents) compute.Computable[fs.FS]
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.RepositoryWithParent]) 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.RepositoryWithParent) (*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 ColocatedBuildCluster ¶ added in v0.0.124
type ColocatedBuildCluster struct { Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` MatchingPodLabels map[string]string `` /* 202-byte string literal not displayed */ TargetPort int32 `protobuf:"varint,3,opt,name=target_port,json=targetPort,proto3" json:"target_port,omitempty"` // contains filtered or unexported fields }
func (*ColocatedBuildCluster) Descriptor
deprecated
added in
v0.0.124
func (*ColocatedBuildCluster) Descriptor() ([]byte, []int)
Deprecated: Use ColocatedBuildCluster.ProtoReflect.Descriptor instead.
func (*ColocatedBuildCluster) GetMatchingPodLabels ¶ added in v0.0.124
func (x *ColocatedBuildCluster) GetMatchingPodLabels() map[string]string
func (*ColocatedBuildCluster) GetNamespace ¶ added in v0.0.124
func (x *ColocatedBuildCluster) GetNamespace() string
func (*ColocatedBuildCluster) GetTargetPort ¶ added in v0.0.124
func (x *ColocatedBuildCluster) GetTargetPort() int32
func (*ColocatedBuildCluster) ProtoMessage ¶ added in v0.0.124
func (*ColocatedBuildCluster) ProtoMessage()
func (*ColocatedBuildCluster) ProtoReflect ¶ added in v0.0.124
func (x *ColocatedBuildCluster) ProtoReflect() protoreflect.Message
func (*ColocatedBuildCluster) Reset ¶ added in v0.0.124
func (x *ColocatedBuildCluster) Reset()
func (*ColocatedBuildCluster) String ¶ added in v0.0.124
func (x *ColocatedBuildCluster) String() string
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"` Endpoint string `protobuf:"bytes,3,opt,name=endpoint,proto3" json:"endpoint,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) GetEndpoint ¶ added in v0.0.336
func (x *HostedBuildCluster) GetEndpoint() 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 // Added to the base exclude patterns. ExcludePatterns []string }
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"` ColocatedBuildCluster *ColocatedBuildCluster `` /* 126-byte string literal not displayed */ // contains filtered or unexported fields }
Used for configuration purposes.
func (*Overrides) Descriptor
deprecated
func (*Overrides) GetBuildkitAddr ¶
func (*Overrides) GetColocatedBuildCluster ¶ added in v0.0.124
func (x *Overrides) GetColocatedBuildCluster() *ColocatedBuildCluster
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
Source Files ¶
Click to show internal directories.
Click to hide internal directories.