Documentation
¶
Index ¶
- Constants
- type Artefact
- type ArtefactBlobs
- type ArtefactConfig
- type ArtefactKey
- type ArtefactReader
- type ArtefactRepository
- type ArtefactService
- func (s *ArtefactService) Download(ctx context.Context, dg sha256.SHA256) (io.ReadCloser, error)
- func (s *ArtefactService) DownloadArtifacts(ctx context.Context, dest string, artifacts []*schema.MetadataArtefact) error
- func (s *ArtefactService) GetDigestsKeys(ctx context.Context, digests []sha256.SHA256) (keys []ArtefactKey, missing []sha256.SHA256, err error)
- func (s *ArtefactService) GetRepository() Repository
- func (s *ArtefactService) Upload(ctx context.Context, artefact ArtefactUpload) error
- type ArtefactUpload
- type DeploymentArtefactProvider
- type Image
- type ImageConfig
- type ImageService
- func (s *ImageService) BuildOCIImage(ctx context.Context, baseImage string, targetImage string, apath string, ...) error
- func (s *ImageService) BuildOCIImageFromRemote(ctx context.Context, baseImage string, targetImage string, tempDir string, ...) error
- func (s *ImageService) Image(realm, module, tag string) Image
- type ImageTarget
- type Metadata
- type Registry
- type ReleaseArtefact
- type Repository
Constants ¶
View Source
const (
FTLFullSchemaPath = "ftl-full-schema.pb"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Artefact ¶
type Artefact struct {
Digest sha256.SHA256
Metadata Metadata
Content io.ReadCloser
}
Artefact container for an artefact's payload and metadata
type ArtefactConfig ¶ added in v0.504.4
type ArtefactConfig struct {
Repository Repository `help:"OCI container repository, in the form host[:port]/repository" env:"FTL_ARTEFACT_REPOSITORY"`
Username string `help:"OCI container repository username" env:"FTL_ARTEFACT_REPOSITORY_USERNAME"`
Password string `help:"OCI container repository password" env:"FTL_ARTEFACT_REPOSITORY_PASSWORD"`
AllowInsecure bool `help:"Allows the use of insecure HTTP based registries." env:"FTL_ARTEFACT_REPOSITORY_ALLOW_INSECURE"`
}
type ArtefactKey ¶
type ArtefactReader ¶
type ArtefactReader interface {
io.ReadCloser
}
type ArtefactRepository ¶
type ArtefactService ¶ added in v0.504.3
type ArtefactService struct {
// contains filtered or unexported fields
}
func NewArtefactService ¶
func NewArtefactService(ctx context.Context, config ArtefactConfig) (*ArtefactService, error)
func NewNewArtefactServiceForTesting ¶
func NewNewArtefactServiceForTesting() *ArtefactService
func (*ArtefactService) Download ¶ added in v0.504.3
func (s *ArtefactService) Download(ctx context.Context, dg sha256.SHA256) (io.ReadCloser, error)
func (*ArtefactService) DownloadArtifacts ¶ added in v0.504.3
func (s *ArtefactService) DownloadArtifacts(ctx context.Context, dest string, artifacts []*schema.MetadataArtefact) error
DownloadArtifacts downloads artefacts for a deployment from an OCI registry.
func (*ArtefactService) GetDigestsKeys ¶ added in v0.504.3
func (s *ArtefactService) GetDigestsKeys(ctx context.Context, digests []sha256.SHA256) (keys []ArtefactKey, missing []sha256.SHA256, err error)
func (*ArtefactService) GetRepository ¶ added in v0.504.3
func (s *ArtefactService) GetRepository() Repository
func (*ArtefactService) Upload ¶ added in v0.504.3
func (s *ArtefactService) Upload(ctx context.Context, artefact ArtefactUpload) error
Upload uploads the specific artifact as a raw blob and links it to a manifest to prevent GC
type ArtefactUpload ¶
type ArtefactUpload struct {
Digest sha256.SHA256
Size int64
Content io.ReadCloser
}
type Image ¶ added in v0.504.4
type Image string
Image is a string that represents an OCI image. For example, "123456789012.dkr.ecr.us-west-2.amazonaws.com/ftl-tests/ftl-tests:latest"
type ImageConfig ¶ added in v0.504.4
type ImageConfig struct {
AllowInsecureImages bool `help:"Allows the use of insecure HTTP based registries." env:"FTL_IMAGE_REPOSITORY_ALLOW_INSECURE"`
Registry Registry `help:"Registry to use for the image service." env:"FTL_IMAGE_REGISTRY"`
RepositoryTemplate string `` /* 127-byte string literal not displayed */
TagTemplate string `help:"Tag template to use for the image service." env:"FTL_IMAGE_TAG_TEMPLATE" default:"$${tag}"`
}
type ImageService ¶ added in v0.504.3
type ImageService struct {
// contains filtered or unexported fields
}
func NewImageService ¶ added in v0.504.3
func NewImageService(ctx context.Context, artefactService *ArtefactService, config *ImageConfig) (*ImageService, error)
func (*ImageService) BuildOCIImage ¶ added in v0.504.3
func (s *ImageService) BuildOCIImage( ctx context.Context, baseImage string, targetImage string, apath string, deployment key.Deployment, allArtifacts []*schema.MetadataArtefact, targets ...ImageTarget, ) error
func (*ImageService) BuildOCIImageFromRemote ¶ added in v0.504.3
func (s *ImageService) BuildOCIImageFromRemote( ctx context.Context, baseImage string, targetImage string, tempDir string, module *schema.Module, deployment key.Deployment, artifacts []*schema.MetadataArtefact, targets ...ImageTarget, ) error
func (*ImageService) Image ¶ added in v0.504.4
func (s *ImageService) Image(realm, module, tag string) Image
type ImageTarget ¶
type ImageTarget func(ctx context.Context, s *ImageService, targetImage name.Tag, imageIndex v1.ImageIndex, image v1.Image, layers []v1.Layer) error
func WithLocalDeamon ¶
func WithLocalDeamon() ImageTarget
func WithRemotePush ¶
func WithRemotePush() ImageTarget
type Registry ¶ added in v0.504.3
type Registry string
Registry is a string that represents an OCI container registry. For example, "123456789012.dkr.ecr.us-west-2.amazonaws.com"
type ReleaseArtefact ¶
type ReleaseArtefact struct {
Artefact ArtefactKey
Path string
Executable bool
}
type Repository ¶ added in v0.504.3
type Repository string
Repository is a string that represents an OCI container repository. For example, "123456789012.dkr.ecr.us-west-2.amazonaws.com/ftl-tests"
Click to show internal directories.
Click to hide internal directories.