alongside

package
v0.28.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 16, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package alongside provides a mechanism for recording the fact that one object was installed alongside another object as part of the installation of the same operator version.

Index

Constants

View Source
const (
	AnnotationPrefix = "operatorframework.io/installed-alongside-"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Annotatable

type Annotatable interface {
	GetAnnotations() map[string]string
	SetAnnotations(map[string]string)
}

type Annotator

type Annotator struct{}

Annotator translates installed-alongside references to and from object annotations.

func (Annotator) FromObject

func (a Annotator) FromObject(o Annotatable) []NamespacedName

FromObject returns a slice containing each namespaced name referenced by an alongside annotation on the provided Object.

func (Annotator) ToObject

func (a Annotator) ToObject(o Annotatable, nns []NamespacedName)

ToObject removes all existing alongside annotations on the provided Object and adds one new annotation per entry in the provided slice of namespaced names.

type NamespacedName

type NamespacedName struct {
	Namespace string
	Name      string
}

NamespacedName is a reference to an object by namespace and name.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL