Documentation
¶
Overview ¶
Package versionbundle provides primitives for dynamic and recursive version management within infrastructures of distributed microservices.
Index ¶
- func IsBundleNotFound(err error) bool
- func IsExecutionFailed(err error) bool
- func IsInvalidBundle(err error) bool
- func IsInvalidBundleError(err error) bool
- func IsInvalidBundles(err error) bool
- func IsInvalidBundlesError(err error) bool
- func IsInvalidChangelog(err error) bool
- func IsInvalidComponent(err error) bool
- func IsInvalidConfig(err error) bool
- func IsInvalidRelease(err error) bool
- func ValidateIndexReleases(indexReleases []IndexRelease) error
- type App
- type Authority
- type Bundle
- func CopyBundles(bundles []Bundle) []Bundle
- func GetBundleByName(bundles []Bundle, name string) (Bundle, error)
- func GetBundleByNameForProvider(bundles []Bundle, name, provider string) (Bundle, error)
- func GetNewestBundle(bundles []Bundle) (Bundle, error)
- func GetNewestBundleForProvider(bundles []Bundle, provider string) (Bundle, error)
- type Bundles
- type Collector
- type CollectorConfig
- type CollectorEndpointResponse
- type Component
- type IndexRelease
- type Release
- type ReleaseConfig
- type SortBundlesByName
- type SortBundlesByVersion
- type SortComponentsByName
- type SortIndexReleasesByVersion
- type SortReleasesByTimestamp
- type SortReleasesByVersion
- type URL
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsBundleNotFound ¶
IsBundleNotFound asserts bundleNotFoundError.
func IsExecutionFailed ¶
IsExecutionFailed asserts executionFailedError.
func IsInvalidBundle ¶ added in v0.2.0
IsInvalidBundle asserts invalidBundleError.
func IsInvalidBundleError ¶
IsInvalidBundleError asserts invalidBundleError.
func IsInvalidBundles ¶ added in v0.2.0
IsInvalidBundles asserts invalidBundlesError.
func IsInvalidBundlesError ¶
IsInvalidBundlesError asserts invalidBundlesError.
func IsInvalidChangelog ¶
IsInvalidChangelog asserts invalidChangelogError.
func IsInvalidComponent ¶
IsInvalidComponent asserts invalidComponentError.
func IsInvalidConfig ¶
IsInvalidConfig asserts invalidConfigError.
func IsInvalidRelease ¶
IsInvalidRelease asserts invalidReleaseError.
func ValidateIndexReleases ¶
func ValidateIndexReleases(indexReleases []IndexRelease) error
ValidateIndexReleases ensures semantic rules for collection of indexReleases so that when used together, they form consistent and integral release index.
Types ¶
type App ¶
type Authority ¶
type Bundle ¶
type Bundle struct {
// Components describe the components an authority exposes. Functionality of
// components listed here is guaranteed to be implemented in the according
// versions.
//
// NOTE that once this property is set it must never change again.
Components []Component `json:"components" yaml:"components"`
// Name is the name of the authority exposing the version bundle.
//
// NOTE that once this property is set it must never change again.
Name string `json:"name" yaml:"name"`
// Provider describes infrastructure provider that is specific for this
// Bundle.
Provider string `json:"provider,omitempty" yaml:"provider,omitempty"`
// Version describes the version of the version bundle. Versions of version
// bundles must be semver versions. Versions must not be duplicated. Versions
// should be incremented gradually.
//
// NOTE that once this property is set it must never change again.
Version string `json:"version" yaml:"version"`
}
Bundle represents a single version bundle exposed by an authority. An authority might exposes mutliple version bundles using the Capability structure. Version bundles are aggregated into a merged structure represented by the Aggregation structure. Also see the Aggregate function.
func CopyBundles ¶
func GetNewestBundle ¶
type Bundles ¶
type Bundles []Bundle
Bundles is a plain validation type for a list of version bundles. A list of version bundles is exposed by authorities. Lists of version bundles of multiple authorities are aggregated and grouped to reflect releases.
type Collector ¶
type Collector struct {
// contains filtered or unexported fields
}
func NewCollector ¶
func NewCollector(config CollectorConfig) (*Collector, error)
type CollectorConfig ¶
type CollectorEndpointResponse ¶
type CollectorEndpointResponse struct {
VersionBundles []Bundle `json:"version_bundles"`
}
type Component ¶
type Component struct {
// Name is the name of the exposed component.
Name string `json:"name" yaml:"name"`
// Version is the version of the exposed component.
Version string `json:"version" yaml:"version"`
}
Component is the software component an authority provides. It describes the functionality of such a component being exposed by the authority. In return an authority guarantees to provide the components functionality.
func CopyComponents ¶
type IndexRelease ¶
type Release ¶
type Release struct {
// contains filtered or unexported fields
}
func CompileReleases ¶
func CompileReleases(logger micrologger.Logger, indexReleases []IndexRelease, bundles []Bundle) ([]Release, error)
CompileReleases takes indexReleases and collected version bundles and compiles canonicalized Releases from them.
func GetNewestRelease ¶
func NewRelease ¶
func NewRelease(config ReleaseConfig) (Release, error)
func (Release) Components ¶
type ReleaseConfig ¶
type SortBundlesByName ¶
type SortBundlesByName []Bundle
func (SortBundlesByName) Len ¶
func (b SortBundlesByName) Len() int
func (SortBundlesByName) Less ¶
func (b SortBundlesByName) Less(i, j int) bool
func (SortBundlesByName) Swap ¶
func (b SortBundlesByName) Swap(i, j int)
type SortBundlesByVersion ¶
type SortBundlesByVersion []Bundle
func (SortBundlesByVersion) Len ¶
func (b SortBundlesByVersion) Len() int
func (SortBundlesByVersion) Less ¶
func (b SortBundlesByVersion) Less(i, j int) bool
func (SortBundlesByVersion) Swap ¶
func (b SortBundlesByVersion) Swap(i, j int)
type SortComponentsByName ¶
type SortComponentsByName []Component
func (SortComponentsByName) Len ¶
func (c SortComponentsByName) Len() int
func (SortComponentsByName) Less ¶
func (c SortComponentsByName) Less(i, j int) bool
func (SortComponentsByName) Swap ¶
func (c SortComponentsByName) Swap(i, j int)
type SortIndexReleasesByVersion ¶
type SortIndexReleasesByVersion []IndexRelease
func (SortIndexReleasesByVersion) Len ¶
func (r SortIndexReleasesByVersion) Len() int
func (SortIndexReleasesByVersion) Less ¶
func (r SortIndexReleasesByVersion) Less(i, j int) bool
func (SortIndexReleasesByVersion) Swap ¶
func (r SortIndexReleasesByVersion) Swap(i, j int)
type SortReleasesByTimestamp ¶
type SortReleasesByTimestamp []Release
func (SortReleasesByTimestamp) Len ¶
func (r SortReleasesByTimestamp) Len() int
func (SortReleasesByTimestamp) Less ¶
func (r SortReleasesByTimestamp) Less(i, j int) bool
func (SortReleasesByTimestamp) Swap ¶
func (r SortReleasesByTimestamp) Swap(i, j int)
type SortReleasesByVersion ¶
type SortReleasesByVersion []Release
func (SortReleasesByVersion) Len ¶
func (r SortReleasesByVersion) Len() int
func (SortReleasesByVersion) Less ¶
func (r SortReleasesByVersion) Less(i, j int) bool
func (SortReleasesByVersion) Swap ¶
func (r SortReleasesByVersion) Swap(i, j int)