Documentation
¶
Index ¶
- Constants
- type Artefact
- type ArtefactBlobs
- type ArtefactKey
- type ArtefactReader
- type ArtefactRepository
- type ArtefactUpload
- type DeploymentArtefactProvider
- type ImageTarget
- type Metadata
- type OCIArtefactService
- func (s *OCIArtefactService) BuildOCIImage(ctx context.Context, baseImage string, targetImage string, apath string, ...) error
- func (s *OCIArtefactService) BuildOCIImageFromRemote(ctx context.Context, baseImage string, targetImage string, tempDir string, ...) error
- func (s *OCIArtefactService) Download(ctx context.Context, dg sha256.SHA256) (io.ReadCloser, error)
- func (s *OCIArtefactService) DownloadArtifacts(ctx context.Context, dest string, artifacts []*schema.MetadataArtefact) error
- func (s *OCIArtefactService) GetDigestsKeys(ctx context.Context, digests []sha256.SHA256) (keys []ArtefactKey, missing []sha256.SHA256, err error)
- func (s *OCIArtefactService) GetRegistry() string
- func (s *OCIArtefactService) Resolve(r authn.Resource) (authn.Authenticator, error)
- func (s *OCIArtefactService) Upload(ctx context.Context, artefact ArtefactUpload) error
- type RegistryConfig
- type ReleaseArtefact
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 ArtefactKey ¶
type ArtefactReader ¶
type ArtefactReader interface {
io.ReadCloser
}
type ArtefactRepository ¶
type ArtefactUpload ¶
type ArtefactUpload struct {
Digest sha256.SHA256
Size int64
Content io.ReadCloser
}
type ImageTarget ¶
type ImageTarget func(ctx context.Context, s *OCIArtefactService, targetImage name.Tag, imageIndex v1.ImageIndex, image v1.Image, layers []v1.Layer) error
func WithLocalDeamon ¶
func WithLocalDeamon() ImageTarget
func WithRemotePush ¶
func WithRemotePush() ImageTarget
type OCIArtefactService ¶
type OCIArtefactService struct {
// contains filtered or unexported fields
}
func NewArtefactService ¶
func NewArtefactService(ctx context.Context, config RegistryConfig) (*OCIArtefactService, error)
func NewNewArtefactServiceForTesting ¶
func NewNewArtefactServiceForTesting() *OCIArtefactService
func (*OCIArtefactService) BuildOCIImage ¶
func (s *OCIArtefactService) BuildOCIImage(ctx context.Context, baseImage string, targetImage string, apath string, allArtifacts []*schema.MetadataArtefact, targets ...ImageTarget) error
func (*OCIArtefactService) BuildOCIImageFromRemote ¶
func (s *OCIArtefactService) BuildOCIImageFromRemote(ctx context.Context, baseImage string, targetImage string, tempDir string, module *schema.Module, artifacts []*schema.MetadataArtefact, targets ...ImageTarget) error
func (*OCIArtefactService) Download ¶
func (s *OCIArtefactService) Download(ctx context.Context, dg sha256.SHA256) (io.ReadCloser, error)
func (*OCIArtefactService) DownloadArtifacts ¶
func (s *OCIArtefactService) DownloadArtifacts(ctx context.Context, dest string, artifacts []*schema.MetadataArtefact) error
DownloadArtifacts downloads artefacts for a deployment from an OCI registry.
func (*OCIArtefactService) GetDigestsKeys ¶
func (s *OCIArtefactService) GetDigestsKeys(ctx context.Context, digests []sha256.SHA256) (keys []ArtefactKey, missing []sha256.SHA256, err error)
func (*OCIArtefactService) GetRegistry ¶
func (s *OCIArtefactService) GetRegistry() string
func (*OCIArtefactService) Resolve ¶
func (s *OCIArtefactService) Resolve(r authn.Resource) (authn.Authenticator, error)
Resolve implements authn.Keychain.
func (*OCIArtefactService) Upload ¶
func (s *OCIArtefactService) 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 RegistryConfig ¶
type RegistryConfig struct {
Registry string `help:"OCI container registry, in the form host[:port]/repository" env:"FTL_ARTEFACT_REGISTRY"`
Username string `help:"OCI container registry username" env:"FTL_ARTEFACT_REGISTRY_USERNAME"`
Password string `help:"OCI container registry password" env:"FTL_ARTEFACT_REGISTRY_PASSWORD"`
AllowInsecure bool `help:"Allows the use of insecure HTTP based registries." env:"FTL_ARTEFACT_REGISTRY_ALLOW_INSECURE"`
}
type ReleaseArtefact ¶
type ReleaseArtefact struct {
Artefact ArtefactKey
Path string
Executable bool
}
Click to show internal directories.
Click to hide internal directories.