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.
func NewGetterMock ¶
NewGetterMock creates a GetterMock
type GetterMock ¶
type GetterMock struct {
// contains filtered or unexported fields
}
GetterMock is a fake version.Getter that return a static answer. This is used for testing purposes.
func (GetterMock) GetVersion ¶
func (v GetterMock) GetVersion(_ context.Context) (string, error)
GetVersion returns the statically defined version.