Documentation
¶
Overview ¶
Package api will have all the basic objects that will be used to work in the application. The objects will be versioned by version and kind, also every object will have serialization capabilities using the apimachinery/serializers package in YAML, JSON and Protobuffer formats.
Index ¶
Constants ¶
const ( LabelNode = "node" LabelFailure = "failure" LabelExperiment = "experiment" LabelID = "id" )
Common reserved labels that are standarized and used by the system, they are reserved and can only be used by the system.
Variables ¶
var NoObjectMeta = ObjectMeta{}
NoObjectMeta is a shortcut to specify the object is not an object.
Functions ¶
func GetAllReserverLabels ¶
func GetAllReserverLabels() map[string]struct{}
GetAllReserverLabels will return all the reserved labels on the system.
Types ¶
type ListMeta ¶
type ListMeta struct { // Continue if not empty means that there are more objects remaining in the list Continue string `json:"continue,omitempty"` }
ListMeta is the metadata all the objects lists should have.
type ListOptions ¶
type ListOptions struct { TypeMeta `json:",inline"` LabelSelector map[string]string `json:"labelSelector,omitempty"` }
ListOptions are the options required to list & watch objects.
func (ListOptions) DeepCopy ¶
func (l ListOptions) DeepCopy() Object
DeepCopy satisfies object interface.
func (ListOptions) GetObjectKind ¶
func (l ListOptions) GetObjectKind() Kind
GetObjectKind satisfies Object interface.
func (ListOptions) GetObjectMetadata ¶
func (l ListOptions) GetObjectMetadata() ObjectMeta
GetObjectMetadata isn't needed in this kind of object.
func (ListOptions) GetObjectVersion ¶
func (l ListOptions) GetObjectVersion() Version
GetObjectVersion satisfies Object interface.
type Object ¶
type Object interface { // GetObjectKind returns the kind of the object. GetObjectKind() Kind // GetObjectVersion returns the version of the object. GetObjectVersion() Version // GetObjectMetadata returns the metadata of the object. GetObjectMetadata() ObjectMeta // DeepCopy makes a copy of the object. DeepCopy() Object }
Object is an interface that every configuration object that can be converted, used & stored needs to implement.
type ObjectList ¶
ObjectList is an object that is also a list of objects.
type ObjectMeta ¶
type ObjectMeta struct { // ID is the id of the object. ID string `json:"id,omitempty"` // Labels are key/value pairs related with the object used to identify the object. Labels map[string]string `json:"labels,omitempty"` // Annotations are free key/value pairs related with the object that aren't queryable. Annotations map[string]string `json:"annotations,omitempty"` }
ObjectMeta is the metadata all the objects should have.
type TypeMeta ¶
type TypeMeta struct { // Kind represents the kind of the object Kind Kind `json:"kind,omitempty"` // Version represents the version of the object Version Version `json:"version,omitempty"` }
TypeMeta is the meta type all the objects should have
func (TypeMeta) GetObjectKind ¶
GetObjectKind satisfies Object interface.
func (TypeMeta) GetObjectVersion ¶
GetObjectVersion satisfies Object interface.