core

package
v0.36.2 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2024 License: Apache-2.0 Imports: 29 Imported by: 274

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Status_State_name = map[int32]string{
		0: "Pending",
		1: "Accepted",
		2: "Rejected",
		3: "Warning",
	}
	Status_State_value = map[string]int32{
		"Pending":  0,
		"Accepted": 1,
		"Rejected": 2,
		"Warning":  3,
	}
)

Enum value maps for Status_State.

View Source
var (
	// options for a message that's intended to become a solo-kit resource
	//
	// optional core.solo.io.Resource resource = 10000;
	E_Resource = &file_solo_kit_proto_extTypes[0]
)

Extension fields to descriptor.MessageOptions.

View Source
var File_metadata_proto protoreflect.FileDescriptor
View Source
var File_solo_kit_proto protoreflect.FileDescriptor
View Source
var File_status_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type Metadata

type Metadata struct {

	// Name of the resource.
	//
	// Names must be unique and follow the following syntax rules:
	//
	// One or more lowercase rfc1035/rfc1123 labels separated by '.' with a maximum length of 253 characters.
	Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	// Namespace is used for the namespacing of resources.
	Namespace string `protobuf:"bytes,3,opt,name=namespace,proto3" json:"namespace,omitempty"`
	// Cluster indicates the cluster this resource belongs to
	// Cluster is only applicable in certain contexts, e.g. Kubernetes
	// An empty string here refers to the local cluster
	Cluster string `protobuf:"bytes,7,opt,name=cluster,proto3" json:"cluster,omitempty"`
	// An opaque value that represents the internal version of this object that can
	// be used by clients to determine when objects have changed.
	ResourceVersion string `protobuf:"bytes,4,opt,name=resource_version,json=resourceVersion,proto3" json:"resource_version,omitempty"`
	// Map of string keys and values that can be used to organize and categorize
	// (scope and select) objects. Some resources contain `selectors` which
	// can be linked with other resources by their labels
	Labels map[string]string `` /* 153-byte string literal not displayed */
	// Annotations is an unstructured key value map stored with a resource that may be
	// set by external tools to store and retrieve arbitrary metadata.
	Annotations map[string]string `` /* 163-byte string literal not displayed */
	// A sequence number representing a specific generation of the desired state.
	// Currently only populated for resources backed by Kubernetes
	Generation int64 `protobuf:"varint,8,opt,name=generation,proto3" json:"generation,omitempty"`
	// List of objects depended by this object.
	// Currently only populated for resources backed by Kubernetes
	OwnerReferences []*Metadata_OwnerReference `protobuf:"bytes,9,rep,name=owner_references,json=ownerReferences,proto3" json:"owner_references,omitempty"`
	// contains filtered or unexported fields
}

* Metadata contains general properties of resources for purposes of versioning, annotating, and namespacing.

func (*Metadata) Clone added in v0.20.5

func (m *Metadata) Clone() proto.Message

Clone function

func (*Metadata) Descriptor deprecated

func (*Metadata) Descriptor() ([]byte, []int)

Deprecated: Use Metadata.ProtoReflect.Descriptor instead.

func (*Metadata) Equal

func (m *Metadata) Equal(that interface{}) bool

Equal function

func (*Metadata) GetAnnotations

func (x *Metadata) GetAnnotations() map[string]string

func (*Metadata) GetCluster

func (x *Metadata) GetCluster() string

func (*Metadata) GetGeneration added in v0.10.15

func (x *Metadata) GetGeneration() int64

func (*Metadata) GetLabels

func (x *Metadata) GetLabels() map[string]string

func (*Metadata) GetName

func (x *Metadata) GetName() string

func (*Metadata) GetNamespace

func (x *Metadata) GetNamespace() string

func (*Metadata) GetOwnerReferences added in v0.10.18

func (x *Metadata) GetOwnerReferences() []*Metadata_OwnerReference

func (*Metadata) GetResourceVersion

func (x *Metadata) GetResourceVersion() string

func (*Metadata) Hash added in v0.11.14

func (m *Metadata) Hash(hasher hash.Hash64) (uint64, error)

Hash function

func (*Metadata) Less

func (m *Metadata) Less(m2 *Metadata) bool

func (*Metadata) Match

func (m *Metadata) Match(ref *ResourceRef) bool

func (*Metadata) ProtoMessage

func (*Metadata) ProtoMessage()

func (*Metadata) ProtoReflect added in v0.16.0

func (x *Metadata) ProtoReflect() protoreflect.Message

func (*Metadata) Ref

func (m *Metadata) Ref() *ResourceRef

func (*Metadata) Reset

func (x *Metadata) Reset()

func (*Metadata) String

func (x *Metadata) String() string

type Metadata_OwnerReference added in v0.10.18

type Metadata_OwnerReference struct {
	ApiVersion         string              `protobuf:"bytes,1,opt,name=api_version,json=apiVersion,proto3" json:"api_version,omitempty"`
	BlockOwnerDeletion *wrappers.BoolValue `protobuf:"bytes,2,opt,name=block_owner_deletion,json=blockOwnerDeletion,proto3" json:"block_owner_deletion,omitempty"`
	Controller         *wrappers.BoolValue `protobuf:"bytes,3,opt,name=controller,proto3" json:"controller,omitempty"`
	Kind               string              `protobuf:"bytes,4,opt,name=kind,proto3" json:"kind,omitempty"`
	Name               string              `protobuf:"bytes,5,opt,name=name,proto3" json:"name,omitempty"`
	Uid                string              `protobuf:"bytes,6,opt,name=uid,proto3" json:"uid,omitempty"`
	// contains filtered or unexported fields
}

proto message representing kubernertes owner reference https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.15/#ownerreference-v1-meta

func (*Metadata_OwnerReference) Clone added in v0.20.5

Clone function

func (*Metadata_OwnerReference) Descriptor deprecated added in v0.10.18

func (*Metadata_OwnerReference) Descriptor() ([]byte, []int)

Deprecated: Use Metadata_OwnerReference.ProtoReflect.Descriptor instead.

func (*Metadata_OwnerReference) Equal added in v0.10.18

func (m *Metadata_OwnerReference) Equal(that interface{}) bool

Equal function

func (*Metadata_OwnerReference) GetApiVersion added in v0.10.18

func (x *Metadata_OwnerReference) GetApiVersion() string

func (*Metadata_OwnerReference) GetBlockOwnerDeletion added in v0.10.18

func (x *Metadata_OwnerReference) GetBlockOwnerDeletion() *wrappers.BoolValue

func (*Metadata_OwnerReference) GetController added in v0.10.18

func (x *Metadata_OwnerReference) GetController() *wrappers.BoolValue

func (*Metadata_OwnerReference) GetKind added in v0.10.18

func (x *Metadata_OwnerReference) GetKind() string

func (*Metadata_OwnerReference) GetName added in v0.10.18

func (x *Metadata_OwnerReference) GetName() string

func (*Metadata_OwnerReference) GetUid added in v0.10.18

func (x *Metadata_OwnerReference) GetUid() string

func (*Metadata_OwnerReference) Hash added in v0.11.14

func (m *Metadata_OwnerReference) Hash(hasher hash.Hash64) (uint64, error)

Hash function

func (*Metadata_OwnerReference) ProtoMessage added in v0.10.18

func (*Metadata_OwnerReference) ProtoMessage()

func (*Metadata_OwnerReference) ProtoReflect added in v0.16.0

func (x *Metadata_OwnerReference) ProtoReflect() protoreflect.Message

func (*Metadata_OwnerReference) Reset added in v0.10.18

func (x *Metadata_OwnerReference) Reset()

func (*Metadata_OwnerReference) String added in v0.10.18

func (x *Metadata_OwnerReference) String() string

type NamespacedStatuses added in v0.23.0

type NamespacedStatuses struct {

	// Mapping from namespace to the Status written by the controller running in that namespace.
	Statuses map[string]*Status `` /* 157-byte string literal not displayed */
	// contains filtered or unexported fields
}

* NamespacedStatuses indicates the Status of a resource according to each controller. NamespacedStatuses are meant to be read-only by users

func (*NamespacedStatuses) Clone added in v0.24.2

func (m *NamespacedStatuses) Clone() proto.Message

Clone function

func (NamespacedStatuses) DeepCopyInto added in v0.23.0

func (s NamespacedStatuses) DeepCopyInto(out *NamespacedStatuses)

func (*NamespacedStatuses) Descriptor deprecated added in v0.23.0

func (*NamespacedStatuses) Descriptor() ([]byte, []int)

Deprecated: Use NamespacedStatuses.ProtoReflect.Descriptor instead.

func (*NamespacedStatuses) Equal added in v0.23.0

func (m *NamespacedStatuses) Equal(that interface{}) bool

Equal function

func (*NamespacedStatuses) GetStatuses added in v0.23.0

func (x *NamespacedStatuses) GetStatuses() map[string]*Status

func (*NamespacedStatuses) Hash added in v0.23.0

func (m *NamespacedStatuses) Hash(hasher hash.Hash64) (uint64, error)

Hash function

func (*NamespacedStatuses) ProtoMessage added in v0.23.0

func (*NamespacedStatuses) ProtoMessage()

func (*NamespacedStatuses) ProtoReflect added in v0.23.0

func (x *NamespacedStatuses) ProtoReflect() protoreflect.Message

func (*NamespacedStatuses) Reset added in v0.23.0

func (x *NamespacedStatuses) Reset()

func (*NamespacedStatuses) String added in v0.23.0

func (x *NamespacedStatuses) String() string

type Predicate added in v0.35.4

type Predicate func(metadata *Metadata) bool

type Resource

type Resource struct {

	// becomes the kubernetes short name for the generated crd
	ShortName string `protobuf:"bytes,1,opt,name=short_name,json=shortName,proto3" json:"short_name,omitempty"`
	// becomes the kubernetes plural name for the generated crd
	PluralName string `protobuf:"bytes,2,opt,name=plural_name,json=pluralName,proto3" json:"plural_name,omitempty"`
	// the resource lives at the cluster level, namespace is ignored by the server
	ClusterScoped bool `protobuf:"varint,3,opt,name=cluster_scoped,json=clusterScoped,proto3" json:"cluster_scoped,omitempty"`
	// indicates whether documentation generation has to be skipped for the given resource, defaults to false
	SkipDocsGen bool `protobuf:"varint,4,opt,name=skip_docs_gen,json=skipDocsGen,proto3" json:"skip_docs_gen,omitempty"`
	// indicates whether annotations should be excluded from the resource's generated hash function.
	// if set to true, changes in annotations will not cause a new snapshot to be emitted
	SkipHashingAnnotations bool `` /* 130-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*Resource) Descriptor deprecated

func (*Resource) Descriptor() ([]byte, []int)

Deprecated: Use Resource.ProtoReflect.Descriptor instead.

func (*Resource) GetClusterScoped

func (x *Resource) GetClusterScoped() bool

func (*Resource) GetPluralName

func (x *Resource) GetPluralName() string

func (*Resource) GetShortName

func (x *Resource) GetShortName() string

func (*Resource) GetSkipDocsGen

func (x *Resource) GetSkipDocsGen() bool

func (*Resource) GetSkipHashingAnnotations added in v0.10.18

func (x *Resource) GetSkipHashingAnnotations() bool

func (*Resource) Hash added in v0.11.14

func (m *Resource) Hash(hasher hash.Hash64) (uint64, error)

Hash function

func (*Resource) ProtoMessage

func (*Resource) ProtoMessage()

func (*Resource) ProtoReflect added in v0.16.0

func (x *Resource) ProtoReflect() protoreflect.Message

func (*Resource) Reset

func (x *Resource) Reset()

func (*Resource) String

func (x *Resource) String() string

type ResourceRef

type ResourceRef struct {
	Name      string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"`
	// contains filtered or unexported fields
}

A way to reference resources across namespaces

func (*ResourceRef) Clone added in v0.20.5

func (m *ResourceRef) Clone() proto.Message

Clone function

func (*ResourceRef) Descriptor deprecated

func (*ResourceRef) Descriptor() ([]byte, []int)

Deprecated: Use ResourceRef.ProtoReflect.Descriptor instead.

func (*ResourceRef) Equal

func (m *ResourceRef) Equal(that interface{}) bool

Equal function

func (*ResourceRef) GetName

func (x *ResourceRef) GetName() string

func (*ResourceRef) GetNamespace

func (x *ResourceRef) GetNamespace() string

func (*ResourceRef) Hash added in v0.11.14

func (m *ResourceRef) Hash(hasher hash.Hash64) (uint64, error)

Hash function

func (ResourceRef) Key

func (r ResourceRef) Key() string

func (*ResourceRef) ProtoMessage

func (*ResourceRef) ProtoMessage()

func (*ResourceRef) ProtoReflect added in v0.16.0

func (x *ResourceRef) ProtoReflect() protoreflect.Message

func (*ResourceRef) Reset

func (x *ResourceRef) Reset()

func (*ResourceRef) String

func (x *ResourceRef) String() string

func (ResourceRef) Strings

func (r ResourceRef) Strings() (string, string)

type Status

type Status struct {

	// State is the enum indicating the state of the resource
	State Status_State `protobuf:"varint,1,opt,name=state,proto3,enum=core.solo.io.Status_State" json:"state,omitempty"`
	// Reason is a description of the error for Rejected resources. If the resource is pending or accepted, this field will be empty
	Reason string `protobuf:"bytes,2,opt,name=reason,proto3" json:"reason,omitempty"`
	// Reference to the reporter who wrote this status
	ReportedBy string `protobuf:"bytes,3,opt,name=reported_by,json=reportedBy,proto3" json:"reported_by,omitempty"`
	// Reference to statuses (by resource-ref string: "Kind.Namespace.Name") of subresources of the parent resource
	SubresourceStatuses map[string]*Status `` /* 206-byte string literal not displayed */
	// Opaque details about status results
	Details *_struct.Struct `protobuf:"bytes,5,opt,name=details,proto3" json:"details,omitempty"`
	// Additional information about the current state of the resource.
	Messages []string `protobuf:"bytes,6,rep,name=Messages,proto3" json:"Messages,omitempty"`
	// contains filtered or unexported fields
}

* Status indicates whether a resource has been (in)validated by a reporter in the system. Statuses are meant to be read-only by users

func (*Status) Clone added in v0.20.5

func (m *Status) Clone() proto.Message

Clone function

func (Status) DeepCopyInto added in v0.11.3

func (s Status) DeepCopyInto(out *Status)

func (*Status) Descriptor deprecated

func (*Status) Descriptor() ([]byte, []int)

Deprecated: Use Status.ProtoReflect.Descriptor instead.

func (*Status) Equal

func (m *Status) Equal(that interface{}) bool

Equal function

func (Status) Flatten

func (s Status) Flatten() Status

collapse a status into a status with no children

func (*Status) GetDetails added in v0.10.15

func (x *Status) GetDetails() *_struct.Struct

func (*Status) GetMessages added in v0.28.1

func (x *Status) GetMessages() []string

func (*Status) GetReason

func (x *Status) GetReason() string

func (*Status) GetReportedBy

func (x *Status) GetReportedBy() string

func (*Status) GetState

func (x *Status) GetState() Status_State

func (*Status) GetSubresourceStatuses

func (x *Status) GetSubresourceStatuses() map[string]*Status

func (*Status) Hash added in v0.11.14

func (m *Status) Hash(hasher hash.Hash64) (uint64, error)

Hash function

func (*Status) ProtoMessage

func (*Status) ProtoMessage()

func (*Status) ProtoReflect added in v0.16.0

func (x *Status) ProtoReflect() protoreflect.Message

func (*Status) Reset

func (x *Status) Reset()

func (*Status) String

func (x *Status) String() string

type Status_State

type Status_State int32
const (
	// Pending status indicates the resource has not yet been validated
	Status_Pending Status_State = 0
	// Accepted indicates the resource has been validated
	Status_Accepted Status_State = 1
	// Rejected indicates an invalid configuration by the user
	// Rejected resources may be propagated to the xDS server depending on their severity
	Status_Rejected Status_State = 2
	// Warning indicates a partially invalid configuration by the user
	// Resources with Warnings may be partially accepted by a controller, depending on the implementation
	Status_Warning Status_State = 3
)

func (Status_State) Descriptor added in v0.16.0

func (Status_State) Enum added in v0.16.0

func (x Status_State) Enum() *Status_State

func (Status_State) EnumDescriptor deprecated

func (Status_State) EnumDescriptor() ([]byte, []int)

Deprecated: Use Status_State.Descriptor instead.

func (Status_State) Number added in v0.16.0

func (Status_State) String

func (x Status_State) String() string

func (Status_State) Type added in v0.16.0

Jump to

Keyboard shortcuts

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