Documentation ¶
Index ¶
- func EagerlyEnsureRemoteBuilder(ctx context.Context, apiClient flyutil.Client, org *fly.Organization, ...)
- func EnsureBuilder(ctx context.Context, org *fly.Organization, region string, ...) (*fly.Machine, *fly.App, error)
- func NewDeploymentTag(appName string, label string) string
- func NewLocalDockerClient() (*dockerclient.Client, error)
- func ResolveDockerfile(cwd string) string
- type Annotations
- type ArchiveInfo
- type DeploymentImage
- type DepotBuilder
- type Descriptor
- type DockerDaemonType
- func (t DockerDaemonType) AllowLocal() bool
- func (t DockerDaemonType) AllowNone() bool
- func (t DockerDaemonType) AllowRemote() bool
- func (t DockerDaemonType) IsAvailable() bool
- func (t DockerDaemonType) IsNone() bool
- func (t DockerDaemonType) PrefersLocal() bool
- func (t DockerDaemonType) String() string
- func (t DockerDaemonType) UseDepot() bool
- func (t DockerDaemonType) UseNixpacks() bool
- type ImageOptions
- type Manifest
- type OCIDescriptor
- type RefOptions
- type RegistryUnauthorizedError
- type Resolver
- func (r *Resolver) BuildImage(ctx context.Context, streams *iostreams.IOStreams, opts ImageOptions) (img *DeploymentImage, err error)
- func (r *Resolver) ResolveReference(ctx context.Context, streams *iostreams.IOStreams, opts RefOptions) (img *DeploymentImage, err error)
- func (r *Resolver) StartHeartbeat(ctx context.Context) (*StopSignal, error)
- type StopSignal
- type ValidateBuilderError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EagerlyEnsureRemoteBuilder ¶ added in v0.0.217
func EnsureBuilder ¶ added in v0.2.67
func NewDeploymentTag ¶ added in v0.0.302
NewDeploymentTag generates a Docker image reference including the current registry, the app name, and a timestamp: registry.fly.io/appname:deployment-$timestamp
func NewLocalDockerClient ¶ added in v0.0.286
func NewLocalDockerClient() (*dockerclient.Client, error)
func ResolveDockerfile ¶ added in v0.0.500
ResolveDockerfile - Resolve the location of the dockerfile, allowing for upper and lowercase naming
Types ¶
type Annotations ¶ added in v0.2.101
type Annotations struct {
RawManifest string `json:"depot.containerimage.manifest,omitempty"`
}
func (*Annotations) Bytes ¶ added in v0.2.101
func (a *Annotations) Bytes() int64
func (*Annotations) Manifest ¶ added in v0.2.101
func (a *Annotations) Manifest() (*Manifest, error)
type ArchiveInfo ¶ added in v0.0.436
func CreateArchive ¶ added in v0.0.436
func CreateArchive(dockerfile, workingDir, ignoreFile string, compressed bool) (*ArchiveInfo, error)
type DeploymentImage ¶
type DeploymentImage struct { ID string Tag string Size int64 BuildID string Labels map[string]string }
func (DeploymentImage) ToSpanAttributes ¶ added in v0.1.135
func (di DeploymentImage) ToSpanAttributes() []attribute.KeyValue
type DepotBuilder ¶ added in v0.2.101
type DepotBuilder struct{}
func (*DepotBuilder) Name ¶ added in v0.2.101
func (d *DepotBuilder) Name() string
func (*DepotBuilder) Run ¶ added in v0.2.101
func (d *DepotBuilder) Run(ctx context.Context, _ *dockerClientFactory, streams *iostreams.IOStreams, opts ImageOptions, build *build) (*DeploymentImage, string, error)
type Descriptor ¶ added in v0.2.101
type Descriptor struct { MediaType string `json:"mediaType,omitempty"` Digest string `json:"digest,omitempty"` Size int64 `json:"size,omitempty"` Annotations Annotations `json:"annotations,omitempty"` }
func (*Descriptor) Bytes ¶ added in v0.2.101
func (d *Descriptor) Bytes() int64
type DockerDaemonType ¶
type DockerDaemonType int
const ( DockerDaemonTypeLocal DockerDaemonType = 1 << iota DockerDaemonTypeRemote DockerDaemonTypeNone DockerDaemonTypePrefersLocal DockerDaemonTypeNixpacks DockerDaemonTypeDepot )
func NewDockerDaemonType ¶
func NewDockerDaemonType(allowLocal, allowRemote, prefersLocal, useDepot, useNixpacks bool) DockerDaemonType
func (DockerDaemonType) AllowLocal ¶
func (t DockerDaemonType) AllowLocal() bool
func (DockerDaemonType) AllowNone ¶
func (t DockerDaemonType) AllowNone() bool
func (DockerDaemonType) AllowRemote ¶
func (t DockerDaemonType) AllowRemote() bool
func (DockerDaemonType) IsAvailable ¶
func (t DockerDaemonType) IsAvailable() bool
func (DockerDaemonType) IsNone ¶
func (t DockerDaemonType) IsNone() bool
func (DockerDaemonType) PrefersLocal ¶ added in v0.0.354
func (t DockerDaemonType) PrefersLocal() bool
func (DockerDaemonType) String ¶ added in v0.1.135
func (t DockerDaemonType) String() string
func (DockerDaemonType) UseDepot ¶ added in v0.2.101
func (t DockerDaemonType) UseDepot() bool
func (DockerDaemonType) UseNixpacks ¶ added in v0.0.361
func (t DockerDaemonType) UseNixpacks() bool
type ImageOptions ¶
type ImageOptions struct { AppName string WorkingDir string DockerfilePath string IgnorefilePath string ImageRef string BuildArgs map[string]string ExtraBuildArgs map[string]string BuildSecrets map[string]string ImageLabel string Publish bool Tag string Target string NoCache bool BuiltIn string BuiltInSettings map[string]interface{} Builder string Buildpacks []string Label map[string]string BuildpacksDockerHost string BuildpacksVolumes []string UseOverlaybd bool }
func (ImageOptions) ToSpanAttributes ¶ added in v0.1.135
func (io ImageOptions) ToSpanAttributes() []attribute.KeyValue
type Manifest ¶ added in v0.2.101
type Manifest struct { SchemaVersion int `json:"schemaVersion,omitempty"` MediaType string `json:"mediaType,omitempty"` Config OCIDescriptor `json:"config,omitempty"` Layers []OCIDescriptor `json:"layers,omitempty"` }
type OCIDescriptor ¶ added in v0.2.101
type RefOptions ¶ added in v0.0.198
type RefOptions struct { AppName string WorkingDir string ImageRef string ImageLabel string Publish bool Tag string }
func (RefOptions) ToSpanAttributes ¶ added in v0.1.135
func (ro RefOptions) ToSpanAttributes() []attribute.KeyValue
type RegistryUnauthorizedError ¶
type RegistryUnauthorizedError struct {
}func (*RegistryUnauthorizedError) Error ¶
func (err *RegistryUnauthorizedError) Error() string
type Resolver ¶
type Resolver struct {
// contains filtered or unexported fields
}
func NewResolver ¶
func (*Resolver) BuildImage ¶ added in v0.0.198
func (r *Resolver) BuildImage(ctx context.Context, streams *iostreams.IOStreams, opts ImageOptions) (img *DeploymentImage, err error)
BuildImage converts source code to an image using a Dockerfile, buildpacks, or builtins.
func (*Resolver) ResolveReference ¶ added in v0.0.198
func (r *Resolver) ResolveReference(ctx context.Context, streams *iostreams.IOStreams, opts RefOptions) (img *DeploymentImage, err error)
ResolveReference returns an Image give an reference using either the local docker daemon or remote registry
func (*Resolver) StartHeartbeat ¶ added in v0.0.409
func (r *Resolver) StartHeartbeat(ctx context.Context) (*StopSignal, error)
For remote builders send a periodic heartbeat during build to ensure machine stays alive This is a noop for local builders
type StopSignal ¶ added in v0.0.500
type StopSignal struct { Chan chan struct{} // contains filtered or unexported fields }
func (*StopSignal) Stop ¶ added in v0.0.500
func (s *StopSignal) Stop()
type ValidateBuilderError ¶ added in v0.2.67
type ValidateBuilderError int
const ( NoBuilderApp ValidateBuilderError = iota NoBuilderVolume InvalidMachineCount BuilderMachineNotStarted ShouldReplaceBuilderMachine )
func (ValidateBuilderError) Error ¶ added in v0.2.67
func (e ValidateBuilderError) Error() string
Source Files ¶
Click to show internal directories.
Click to hide internal directories.