Documentation
¶
Index ¶
- Constants
- Variables
- func AssessDeploymentStatus(deployment *appsv1.Deployment) (string, bool)
- func ComputeHash(values ...any) (string, error)
- func CredsFromDockerCfg(rawCfg []byte, host string) (string, string, error)
- func DockerCfgFromCreds(username, password, host string) ([]byte, error)
- func GetValue[TValue any](input *go_hook.HookInput, path string) (TValue, error)
- func RegistryAddressAndPathFromImagesRepo(imgRepo string) (string, string)
- func SnapshotToList[TValue any](input *go_hook.HookInput, name string) ([]TValue, error)
- func SnapshotToMap[TKey comparable, TValue any](input *go_hook.HookInput, name string) (map[TKey]TValue, error)
- func SnapshotToSingle[TValue any](input *go_hook.HookInput, name string) (TValue, error)
- func TrimWithEllipsis(value string) string
- type KeyValue
- type ValuesAccessor
Constants ¶
View Source
const ( RegistryServiceName = "registry" RegistryServiceNamespace = "d8-system" )
Variables ¶
View Source
var ( NamespaceSelector = &types.NamespaceSelector{ NameSelector: &types.NameSelector{ MatchNames: []string{"d8-system"}, }, } RegistryServiceDNSName = fmt.Sprintf("%s.%s.svc", RegistryServiceName, RegistryServiceNamespace) )
View Source
var ( ErrNoSnapshot = errors.New("no snapshot found or too many snapshots") ErrSnapshotTypeError = errors.New("snapshot cannot be converted to requested type") )
View Source
var (
ErrNoValue = errors.New("value not found")
)
Functions ¶
func AssessDeploymentStatus ¶
func AssessDeploymentStatus(deployment *appsv1.Deployment) (string, bool)
AssessDeploymentStatus evaluates whether a Deployment has reached its desired state.
func ComputeHash ¶
func CredsFromDockerCfg ¶
func DockerCfgFromCreds ¶
func SnapshotToList ¶
func SnapshotToMap ¶
func SnapshotToSingle ¶
func TrimWithEllipsis ¶
Types ¶
type KeyValue ¶
type KeyValue[TKey comparable, TValue any] struct { Key TKey Value TValue }
func NewKeyValue ¶
func NewKeyValue[TKey comparable, TValue any](key TKey, value TValue) KeyValue[TKey, TValue]
type ValuesAccessor ¶
type ValuesAccessor[TValue any] interface { Set(value TValue) Get() TValue Clear() }
func NewValuesAccessor ¶
func NewValuesAccessor[TValue any](input *go_hook.HookInput, path string) ValuesAccessor[TValue]
Click to show internal directories.
Click to hide internal directories.