Documentation
¶
Index ¶
- func ExecTemplate(tpl *template.Template, params map[string]interface{}) ([]byte, error)
- func Exp2Regexp(expr []string) ([]*regexp.Regexp, error)
- func Flag2Verbosity(f *flag.Flag) int
- func GenerateNames(pattern string, n int, params map[string]interface{}) ([]string, error)
- func GetK8sConfig(cfg *cfg.KubeConfig) (*rest.Config, error)
- func IsSubset(obj, subset map[string]interface{}) bool
- func SetObjectID(val int64)
- type NameIterator
- type NameList
- type NameMatcher
- type NameRange
- type NameSelector
- type PatchData
- type SyncMap
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExecTemplate ¶
func Flag2Verbosity ¶
Flag2Verbosity expects flag.Lookup("v") as a parameter and returns verbosity level
func GenerateNames ¶
func GetK8sConfig ¶
func GetK8sConfig(cfg *cfg.KubeConfig) (*rest.Config, error)
func SetObjectID ¶
func SetObjectID(val int64)
Types ¶
type NameIterator ¶
type NameIterator struct {
// contains filtered or unexported fields
}
NameSelector represents an object for iterating over names generated by NameSelector
func (*NameIterator) GetNext ¶
func (iter *NameIterator) GetNext() string
func (*NameIterator) HasNext ¶
func (iter *NameIterator) HasNext() bool
type NameList ¶
type NameList struct {
Patterns []string `yaml:"patterns"`
Params map[string]interface{} `yaml:"params,omitempty"`
}
NameList represents a list of names, where :
- "Patterns" is an array of name templates,
- "Params" is a key-value map of parameters for the templates.
type NameMatcher ¶
type NameMatcher struct {
// contains filtered or unexported fields
}
NameMatcher represents an object for matching names represented by NameSelector
func (*NameMatcher) IsMatch ¶
func (nm *NameMatcher) IsMatch(name string) bool
type NameRange ¶
type NameRange struct {
Pattern string `yaml:"pattern"`
Ranges []string `yaml:"ranges"`
Params map[string]interface{} `yaml:"params,omitempty"`
}
NameRange represents a range of names, where :
- "Pattern" is a name template. The reserved variable _INDEX_ represents a number from the range.
- "Ranges" is an array os values formatted as 'm-n' or 'n'. Each range 'm-n' denotes a sequence from 'm' to 'n', inclusive.
- "Params" is a key-value map of parameters for the template.
type NameSelector ¶
type NameSelector struct {
List *NameList `yaml:"list,omitempty"`
Range *NameRange `yaml:"range,omitempty"`
Regexp string `yaml:"regexp,omitempty"`
// contains filtered or unexported fields
}
NameSelector represents an object for generating and matching a set of names
func (*NameSelector) Finalize ¶
func (ns *NameSelector) Finalize() error
Finalize validates and finalizes instantiation of NameSelector
func (*NameSelector) Init ¶
func (ns *NameSelector) Init()
func (*NameSelector) Iter ¶
func (ns *NameSelector) Iter() *NameIterator
func (*NameSelector) Matcher ¶
func (ns *NameSelector) Matcher() *NameMatcher
func (*NameSelector) Names ¶
func (ns *NameSelector) Names() []string
type PatchData ¶
PatchData contains patches for root and status subresources.
func NewPatchData ¶
NewPatchData initializes PatchData object
type SyncMap ¶
type SyncMap struct {
// contains filtered or unexported fields
}
SyncMap implements a map with synchronous access
func (*SyncMap) Delete ¶
Delete deletes a map entry specified by key, and returns updated number of elements in the map
func (*SyncMap) Get ¶
Get return a value for a key (first returned argument) if found (second returned argument)