Documentation ¶
Index ¶
- Constants
- Variables
- func ApplyReplaceRule(c *Controller, rule *Rule, target *ResourceInstance) error
- func FindInListers(dls []cache.GenericLister, namespace, name string) (runtime.Object, error)
- type Controller
- func (c *Controller) AddInformers(gvr *schema.GroupVersionResource, handler cache.ResourceEventHandler) []cache.SharedInformer
- func (c *Controller) AddTarget(target string) error
- func (c *Controller) FindResourceInstance(resource *Resource) (*ResourceInstance, error)
- func (c *Controller) Run(workers int, stopCh <-chan struct{}) error
- func (c *Controller) Start(stopCh <-chan struct{}) error
- type JSONSource
- type QueuingEventHandler
- type Resource
- type ResourceInstance
- type ResourceSource
- type Rule
- type Source
Constants ¶
View Source
const (
AnnotationPrefix = "k8s-copier.fig.org/"
)
Variables ¶
View Source
var (
KeyFunc = cache.DeletionHandlingMetaNamespaceKeyFunc
)
Functions ¶
func ApplyReplaceRule ¶
func ApplyReplaceRule(c *Controller, rule *Rule, target *ResourceInstance) error
func FindInListers ¶
Types ¶
type Controller ¶
func (*Controller) AddInformers ¶
func (c *Controller) AddInformers(gvr *schema.GroupVersionResource, handler cache.ResourceEventHandler) []cache.SharedInformer
func (*Controller) AddTarget ¶
func (c *Controller) AddTarget(target string) error
func (*Controller) FindResourceInstance ¶
func (c *Controller) FindResourceInstance(resource *Resource) (*ResourceInstance, error)
func (*Controller) Run ¶
func (c *Controller) Run(workers int, stopCh <-chan struct{}) error
func (*Controller) Start ¶
func (c *Controller) Start(stopCh <-chan struct{}) error
type JSONSource ¶
type JSONSource struct {
Data interface{}
}
func (*JSONSource) GetData ¶
func (src *JSONSource) GetData() (interface{}, error)
func (*JSONSource) Register ¶
func (src *JSONSource) Register(c *Controller, stopCh <-chan struct{}, rule *Rule, target *ResourceInstance) error
type QueuingEventHandler ¶
type QueuingEventHandler struct { GVR *schema.GroupVersionResource Queue workqueue.RateLimitingInterface }
func (*QueuingEventHandler) Enqueue ¶
func (q *QueuingEventHandler) Enqueue(obj interface{})
func (*QueuingEventHandler) OnAdd ¶
func (q *QueuingEventHandler) OnAdd(obj interface{})
func (*QueuingEventHandler) OnDelete ¶
func (q *QueuingEventHandler) OnDelete(obj interface{})
func (*QueuingEventHandler) OnUpdate ¶
func (q *QueuingEventHandler) OnUpdate(old, new interface{})
type ResourceInstance ¶
type ResourceInstance struct { *Resource GVR schema.GroupVersionResource Object interface{} }
type ResourceSource ¶
type ResourceSource struct { Control *Controller Spec *Resource Path []string }
func (*ResourceSource) GetData ¶
func (src *ResourceSource) GetData() (interface{}, error)
func (*ResourceSource) Register ¶
func (src *ResourceSource) Register(c *Controller, stopCh <-chan struct{}, rule *Rule, target *ResourceInstance) error
type Rule ¶
type Rule struct { Apply func(*Controller, *Rule, *ResourceInstance) error Target *Resource TargetPath string Source Source }
type Source ¶
type Source interface { GetData() (interface{}, error) Register(*Controller, <-chan struct{}, *Rule, *ResourceInstance) error }
func ParseSource ¶
Click to show internal directories.
Click to hide internal directories.