core

package
Version: v0.21.1 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2021 License: Apache-2.0 Imports: 27 Imported by: 137

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) Descriptor deprecated

This method has been 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

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

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

func (*Metadata) GetResourceVersion

func (x *Metadata) GetResourceVersion() string

func (*Metadata) Hash

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

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

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) Descriptor deprecated

This method has been deprecated.
func (*Metadata_OwnerReference) Descriptor() ([]byte, []int)

Deprecated: Use Metadata_OwnerReference.ProtoReflect.Descriptor instead.

func (*Metadata_OwnerReference) Equal

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

Equal function

func (*Metadata_OwnerReference) GetApiVersion

func (x *Metadata_OwnerReference) GetApiVersion() string

func (*Metadata_OwnerReference) GetBlockOwnerDeletion

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

func (*Metadata_OwnerReference) GetController

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

func (*Metadata_OwnerReference) GetKind

func (x *Metadata_OwnerReference) GetKind() string

func (*Metadata_OwnerReference) GetName

func (x *Metadata_OwnerReference) GetName() string

func (*Metadata_OwnerReference) GetUid

func (x *Metadata_OwnerReference) GetUid() string

func (*Metadata_OwnerReference) Hash

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

Hash function

func (*Metadata_OwnerReference) ProtoMessage

func (*Metadata_OwnerReference) ProtoMessage()

func (*Metadata_OwnerReference) ProtoReflect

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

func (*Metadata_OwnerReference) Reset

func (x *Metadata_OwnerReference) Reset()

func (*Metadata_OwnerReference) String

func (x *Metadata_OwnerReference) String() string

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

This method has been 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

func (x *Resource) GetSkipHashingAnnotations() bool

func (*Resource) Hash

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

Hash function

func (*Resource) ProtoMessage

func (*Resource) ProtoMessage()

func (*Resource) ProtoReflect

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) Descriptor deprecated

This method has been 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

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

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"`
	// 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) DeepCopyInto

func (s Status) DeepCopyInto(out *Status)

func (*Status) Descriptor deprecated

This method has been 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

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

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

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

Hash function

func (*Status) ProtoMessage

func (*Status) ProtoMessage()

func (*Status) ProtoReflect

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

func (Status_State) Enum

func (x Status_State) Enum() *Status_State

func (Status_State) EnumDescriptor deprecated

This method has been deprecated.
func (Status_State) EnumDescriptor() ([]byte, []int)

Deprecated: Use Status_State.Descriptor instead.

func (Status_State) Number

func (Status_State) String

func (x Status_State) String() string

func (Status_State) Type

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto