Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnsureSemver ¶
EnsureSemver adds the 'v' prefix if needed and ensures the provided version is semver-compliant.
Types ¶
type BasicHTTPVersionGetter ¶
type BasicHTTPVersionGetter struct {
// contains filtered or unexported fields
}
BasicHTTPVersionGetter gets the version from an HTTP response containing only the version. This is used typically to get version from a file hosted in a s3 bucket or raw file served over HTTP. BasicHTTPVersionGetter uses basicHTTPVersionClient and wraps it in a cache in order to mitigate the impact of too frequent reconciliations. The structure implements the version.Getter interface.
func (BasicHTTPVersionGetter) GetVersion ¶
func (g BasicHTTPVersionGetter) GetVersion(ctx context.Context) (string, error)
type Getter ¶
Getter gets the target image version for an external source. It should cache the result to reduce io and avoid potential rate-limits and is safe to call multiple times over a short period. If the version source intentionally returns no version, a NoNewVersionError is returned.
func NewStaticGetter ¶
NewStaticGetter creates a StaticGetter
type NoNewVersionError ¶
type NoNewVersionError struct { Message string `json:"message"` CurrentVersion string `json:"currentVersion"` NextVersion string `json:"nextVersion"` }
NoNewVersionError indicates that no new version was found and the controller did not reconcile.
func (*NoNewVersionError) Error ¶
func (e *NoNewVersionError) Error() string
Error returns log friendly description of an error
type StaticGetter ¶
type StaticGetter struct {
// contains filtered or unexported fields
}
StaticGetter is a fake version.Getter that return a static answer. This is used for testing purposes.
func (StaticGetter) GetVersion ¶
func (v StaticGetter) GetVersion(_ context.Context) (string, error)
GetVersion returns the statically defined version.