Documentation ¶
Index ¶
Constants ¶
const (
DefaultMesh = "default"
)
Variables ¶
var ( // ResourceNameExtensionsUnsupported is a convenience constant // that is meant to make source code more readable. ResourceNameExtensionsUnsupported = ResourceNameExtensions(nil) )
Functions ¶
func ErrorInvalidItemType ¶
func ErrorInvalidItemType(expected, actual interface{}) error
Types ¶
type Pagination ¶
func (*Pagination) GetNextOffset ¶
func (p *Pagination) GetNextOffset() string
func (*Pagination) GetTotal ¶
func (p *Pagination) GetTotal() uint32
func (*Pagination) SetNextOffset ¶
func (p *Pagination) SetNextOffset(nextOffset string)
func (*Pagination) SetTotal ¶
func (p *Pagination) SetTotal(total uint32)
type Resource ¶
type Resource interface { GetType() ResourceType GetMeta() ResourceMeta SetMeta(ResourceMeta) GetSpec() ResourceSpec SetSpec(ResourceSpec) error Validate() error }
type ResourceKey ¶
func MetaToResourceKey ¶
func MetaToResourceKey(meta ResourceMeta) ResourceKey
type ResourceList ¶
type ResourceList interface { GetItemType() ResourceType GetItems() []Resource NewItem() Resource AddItem(Resource) error GetPagination() *Pagination }
type ResourceMeta ¶
type ResourceNameExtensions ¶
ResourceNameExtensions represents an composite resource name in environments other than Universal.
E.g., name of a Kubernetes resource consists of a namespace component and a name component that is local to that namespace.
Technically, ResourceNameExtensions is a mapping between a component identifier and a component value, e.g.
"k8s.kuma.io/namespace" => "my-namespace" "k8s.kuma.io/name" => "my-policy"
Component identifier must be considered a part of user-facing Kuma API. In other words, it is supposed to be visible to users and should not be changed lightly.
Component identifier might have any value, however, it's preferable to choose one that is intuitive to users of that particular environment. E.g., on Kubernetes component identifiers should use a label name format, like in "k8s.kuma.io/namespace" and "k8s.kuma.io/name".
type ResourceSpec ¶
type ResourceType ¶
type ResourceType string