Documentation ¶
Index ¶
Constants ¶
const ( // DefaultNamespace is the default value when no namespace is set DefaultNamespace string = "default" )
Variables ¶
This section is empty.
Functions ¶
func FromLabels ¶
FromLabels converts a collection of selectors from the much richer labels type to selectors
Types ¶
type Resource ¶
type Resource struct { Name string ID string Meta interface{} Labels labels.Labels Config interface{} }
Resource is a general representation of some kind of resource which a provider might handle (ec2 instance, k8s pod, lambda function)
type Selection ¶
Selection is the selection result of a select operation which uses target rules to grab a set of resources
func (*Selection) Select ¶
func (s *Selection) Select(p parameters.Parameters) []Resource
Select will take a list of resources in data, and apply selection criteria to those in order to segment and select a set of resources to include in selection
type Target ¶
type Target struct { // ID (optional) should be set if we // are targeting an existing resource (ie: lambda, ec2) // that we want to make a clone of for seeding the base configuration // of variants with // // +optional ID string `json:"id,omitempty"` // Namespace represents a specific namespace you want to target // resources in, usually only applicable to kubernetes // // +optional Namespace string // Resource (optional) a specific external resource // such as ec2, lambda // // +optional Resource string `json:"resource,omitempty"` // Kind (optional) represents a Kubernetes specific kind/resource // // +optional Kind string `json:"kind,omitempty"` // Selectors // +optional Selectors *selectors `yaml:"selectors,omitempty" json:"selectors,omitempty"` // Count is the number to select from a collection target Count int // Selection is the criteria for fulfilling the count number when // we are selecting a collection and that size exceeds the count // possible options are random, oldest, newest Selection string }
Target is a set of rules for targetting a resource, or collection of resources for performing some experiment operation
func (*Target) DeepCopyInto ¶
DeepCopyInto is generated, don't edit
func (*Target) Empty ¶
Empty returns true if all selector rules are unset or nil, ie: there are no selection criteria
func (*Target) SafeNamespace ¶
SafeNamespace returns the set namespace or 'default' in the case it is not set