Documentation
¶
Index ¶
- func InstallableFromManifest(m ReleaseManifest, name string) habpkg.Installable
- func NewCannotParseError(err error) error
- func NewInvalidSchemaError(err error) error
- func NewNoSuchManifestError(err error) error
- func VersionedPackageFromManifest(m ReleaseManifest, name string) habpkg.VersionedPackage
- type A2
- type CachingReleaseManifestProvider
- type CannotParseError
- type InvalidSchemaError
- type LocalHartManifestProvider
- type NoSuchManifestError
- type ReleaseManifest
- type ReleaseManifestProvider
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InstallableFromManifest ¶
func InstallableFromManifest(m ReleaseManifest, name string) habpkg.Installable
InstallableFromManifest returns a hart if one was provided for the given service, falling back to the package provided in the manifest If the service is not found, both will be nil
func NewCannotParseError ¶
func NewInvalidSchemaError ¶
func NewNoSuchManifestError ¶
func VersionedPackageFromManifest ¶
func VersionedPackageFromManifest(m ReleaseManifest, name string) habpkg.VersionedPackage
VersionedPackageFromManifest returns a VersionedPackage from the manifest for the given service. If a hartifact exists, the hartifact is preferred. Returns nil if not found.
Types ¶
type A2 ¶
type A2 struct {
Build string `json:"build"`
BuildSHA string `json:"build_sha"`
Packages []habpkg.HabPkg `json:"packages"`
HartOverrides []habpkg.Hart `json:"hart_overrides"`
}
An A2 manifest specifies the expected contents of a build
func (*A2) HartForServiceName ¶
HartForServiceName returns a hart for the named service to use as an override
func (*A2) ListPackages ¶
func (*A2) PackageForServiceName ¶
PackageForServiceName returns a Package for the named service
type CachingReleaseManifestProvider ¶
type CachingReleaseManifestProvider interface {
ReleaseManifestProvider
// RefreshManifest forces fetching a new manifest from the given channel
RefreshManifest(ctx context.Context, channel string) (*A2, error)
}
CachingReleaseManifestProvider caches the manifest entry for a configured amount of time. A refresh can be forced with RefreshManifest
func NewCachingReleaseManifestProvider ¶
func NewCachingReleaseManifestProvider(baseProvider ReleaseManifestProvider, cacheTime time.Duration) CachingReleaseManifestProvider
NewCachingReleaseManifestProvider creates a caching ReleaseManifestProvider
type CannotParseError ¶
type CannotParseError struct {
// contains filtered or unexported fields
}
func (*CannotParseError) Error ¶
func (e *CannotParseError) Error() string
type InvalidSchemaError ¶
type InvalidSchemaError struct {
// contains filtered or unexported fields
}
func (*InvalidSchemaError) Error ¶
func (e *InvalidSchemaError) Error() string
type LocalHartManifestProvider ¶
type LocalHartManifestProvider struct {
// contains filtered or unexported fields
}
A LocalHartManifestProvider can add local harts to the manifest for another manifest provider.
func (*LocalHartManifestProvider) GetCurrentManifest ¶
func (provider *LocalHartManifestProvider) GetCurrentManifest(ctx context.Context, channel string) (*A2, error)
GetCurrentManifest returns a release manifest
func (*LocalHartManifestProvider) GetManifest ¶
type NoSuchManifestError ¶
type NoSuchManifestError struct {
// contains filtered or unexported fields
}
func (*NoSuchManifestError) Error ¶
func (e *NoSuchManifestError) Error() string
type ReleaseManifest ¶
type ReleaseManifest interface {
HartForServiceName(name string) (bool, habpkg.Hart)
PackageForServiceName(name string) (bool, habpkg.HabPkg)
ListPackages() []habpkg.HabPkg
Version() string
SHA() string
}
A ReleaseManifest specifies the expected contents of the build.
type ReleaseManifestProvider ¶
type ReleaseManifestProvider interface {
GetCurrentManifest(ctx context.Context, channel string) (*A2, error)
// GetManifest forces fetching the specified manifest
GetManifest(ctx context.Context, release string) (*A2, error)
}
A ReleaseManifestProvider is something that can return a manifest
func NewLocalHartManifestProvider ¶
func NewLocalHartManifestProvider(baseProvider ReleaseManifestProvider, hartPath string, overrideOrigin string) ReleaseManifestProvider
NewLocalHartManifestProvider creates a LocalHartManifestProvider