resource

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Slice

func Slice(comp *apiv1.Composition, previous []*apiv1.ResourceSlice, outputs []*unstructured.Unstructured, maxJsonBytes int) ([]*apiv1.ResourceSlice, error)

Slice builds a new set of resource slices by merging a new set of resources onto an old set of slices. - New and updated resources are partitioned across slices per maxJsonBytes - Removed resources are converted into "tombstones" i.e. manifests with Deleted == true

Types

type Ref

type Ref struct {
	Name, Namespace, Kind string
}

Ref refers to a specific synthesized resource.

type Resource

type Resource struct {
	Ref             Ref
	Manifest        *apiv1.Manifest
	GVK             schema.GroupVersionKind
	SliceDeleted    bool
	ReadinessChecks readiness.Checks
	// contains filtered or unexported fields
}

Resource is the controller's internal representation of a single resource out of a ResourceSlice.

func NewResource

func NewResource(ctx context.Context, renv *readiness.Env, slice *apiv1.ResourceSlice, resource *apiv1.Manifest) (*Resource, error)

func (*Resource) Deleted

func (r *Resource) Deleted() bool

func (*Resource) HasBeenSeen

func (l *Resource) HasBeenSeen() bool

func (*Resource) MatchesLastSeen

func (l *Resource) MatchesLastSeen(rv string) bool

func (*Resource) ObserveReconciliation

func (l *Resource) ObserveReconciliation() time.Duration

func (*Resource) ObserveVersion

func (l *Resource) ObserveVersion(rv string)

func (*Resource) Parse

func (r *Resource) Parse() (*unstructured.Unstructured, error)

Jump to

Keyboard shortcuts

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