runtime

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2023 License: Apache-2.0 Imports: 4 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

+k8s:deepcopy-gen=package

Index

Constants

View Source
const DefaultNamespace = "default"

DefaultNamespace describes the default namespace name used for the system.

Variables

This section is empty.

Functions

This section is empty.

Types

type IdentifierFactory

type IdentifierFactory interface {
	Identify(o interface{}) (id Identifyable, ok bool)
}
var (
	// Metav1Identifier identifies an object using its metav1.ObjectMeta Name and Namespace
	Metav1NameIdentifier IdentifierFactory = Metav1NameIdentifierFactory{}
	// ObjectUIDIdentifier identifies an object using its libgitops/pkg/runtime.ObjectMeta UID field
	ObjectUIDIdentifier IdentifierFactory = ObjectUIDIdentifierFactory{}
)

type Identifyable

type Identifyable interface {
	// GetIdentifier can return e.g. a "namespace/name" combination, which is not guaranteed
	// to be unique world-wide, or alternatively a random SHA for instance
	GetIdentifier() string
}

Identifyable is an object which can be identified

func NewIdentifier

func NewIdentifier(str string) Identifyable

type Metav1NameIdentifierFactory

type Metav1NameIdentifierFactory struct{}

func (*Metav1NameIdentifierFactory) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Metav1NameIdentifierFactory.

func (*Metav1NameIdentifierFactory) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (Metav1NameIdentifierFactory) Identify

func (id Metav1NameIdentifierFactory) Identify(o interface{}) (Identifyable, bool)

type Object

type Object interface {
	runtime.Object
	metav1.ObjectMetaAccessor
	metav1.Object
}

Object is an union of the Object interfaces that are accessible for a type that embeds both metav1.TypeMeta and metav1.ObjectMeta.

type ObjectUIDIdentifierFactory

type ObjectUIDIdentifierFactory struct{}

func (*ObjectUIDIdentifierFactory) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ObjectUIDIdentifierFactory.

func (*ObjectUIDIdentifierFactory) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (ObjectUIDIdentifierFactory) Identify

func (id ObjectUIDIdentifierFactory) Identify(o interface{}) (Identifyable, bool)

type PartialObject

type PartialObject interface {
	Object

	// IsPartialObject is a dummy function for signalling that this is a partially-loaded object
	// i.e. only TypeMeta and ObjectMeta are stored in memory.
	IsPartialObject()
}

PartialObject is a partially-decoded object, where only metadata has been loaded.

func NewPartialObject

func NewPartialObject(frame []byte) (PartialObject, error)

This constructor ensures the PartialObjectImpl fields are not nil. TODO: Make this multi-document-aware?

type PartialObjectImpl

type PartialObjectImpl struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata"`
}

PartialObjectImpl is a struct implementing PartialObject, used for unmarshalling unknown objects into this intermediate type where .Name, .UID, .Kind and .APIVersion become easily available +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*PartialObjectImpl) DeepCopy

func (in *PartialObjectImpl) DeepCopy() *PartialObjectImpl

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PartialObjectImpl.

func (*PartialObjectImpl) DeepCopyInto

func (in *PartialObjectImpl) DeepCopyInto(out *PartialObjectImpl)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*PartialObjectImpl) DeepCopyObject

func (in *PartialObjectImpl) DeepCopyObject() pkgruntime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new pkgruntime.Object.

func (*PartialObjectImpl) IsPartialObject

func (po *PartialObjectImpl) IsPartialObject()

Jump to

Keyboard shortcuts

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