Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddPrototyper ¶
func AddPrototyper(kind string, p Prototyper)
AddPrototyper adds a prototyper for the given resource type to the list of supported resources of the engine
Types ¶
type Changeable ¶
type Changeable interface {
// Name returns the name of this resource
Name() string
// Namespace returns the namespace of this resource
Namespace() string
// Kind returns the name of the resource type
Kind() string
// Changed indicates whether the resource has materially changed
Changed(ctx context.Context, kc *k8s.Client) (bool, error)
}
A Changeable resource is a stateful kubernetes resource which tracks old and present states, making it able to indicate when a change occurs.
type Prototyper ¶
type Prototyper interface {
// Object returns a new empty object of this resource type
Object() k8s.Resource
// Changeable returns a Changeable for this resource type
Changeable(ctx context.Context, kc *k8s.Client, namespace, name string) (Changeable, error)
}
Prototyper implements a kubernetes resource to be handled by this templating engine. It needs to be able to instantiate a kubernetes resource of its matching type, as well as create a stateful implementation of that resource which can indicate when a change of its salient details occurs.
func GetPrototyper ¶
func GetPrototyper(kind string) (Prototyper, bool)
GetPrototyper returns a prototyper for the given resource
Click to show internal directories.
Click to hide internal directories.