Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( NameField = &CustomField{ Name: "name", FieldFunc: func(res v2.Resource) []string { return []string{res.GetObjectMeta().Name} }, } LabelsField = &MapField{ Name: "labels", FieldFunc: func(res v2.Resource) map[string]string { return res.GetObjectMeta().Labels }, } )
View Source
var (
ErrInvalidRef = errors.New("reference to field must take the form :group/:version/:resource/:field/:name")
)
Functions ¶
This section is empty.
Types ¶
type CustomField ¶
func (*CustomField) Matches ¶
func (f *CustomField) Matches(path string) bool
type ObjectField ¶
func (*ObjectField) Matches ¶
func (f *ObjectField) Matches(path string) bool
type RefComponents ¶
func ParseRef ¶
func ParseRef(ref string) (r RefComponents, err error)
ParseRef takes an identifier and returns it's components.
type Register ¶
type Register []*Resource
Register is used to store and later find Sensu resources
func (Register) Lookup ¶
func (r Register) Lookup(ref RefComponents) *Resource
Lookup finds a Resource given a ref
type Resource ¶
Resource represents a Sensu resource
func (*Resource) LookupField ¶
func (r *Resource) LookupField(ref RefComponents) Field
LookupField uses given ref to find the appropriate field.
Click to show internal directories.
Click to hide internal directories.