Documentation ¶
Index ¶
- Variables
- type Controller
- type Option
- func DisableRevision() Option
- func EnableDebug() Option
- func IncludeNamespaces(namespaces ...string) Option
- func IncludeResources(resources ...string) Option
- func WithExcludes(excludes []*regexp.Regexp) Option
- func WithIgnoreCreatedBefore(d time.Duration) Option
- func WithIncludes(includes []*regexp.Regexp) Option
- func WithKeyFunc(kf func(interface{}) (string, error)) Option
- func WithTimeFormat(tf string) Option
- type Options
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNotReady = fmt.Errorf("NotReady") ErrNotSynced = fmt.Errorf("NotSynced") )
Functions ¶
This section is empty.
Types ¶
type Controller ¶
type Controller struct { *Options // contains filtered or unexported fields }
func New ¶
func New( podInformer coreinformers.PodInformer, rsInformer appsinformers.ReplicaSetInformer, dInformer appsinformers.DeploymentInformer, ssInformer appsinformers.StatefulSetInformer, dsInformer appsinformers.DaemonSetInformer, crInformer appsinformers.ControllerRevisionInformer, notifyFunc notify.NotifyFunc, opts ...Option, ) (*Controller, error)
func (*Controller) Inspect ¶
func (ctl *Controller) Inspect(kind, key string) error
func (*Controller) OnAdd ¶
func (ctl *Controller) OnAdd(obj interface{})
func (*Controller) OnDelete ¶
func (ctl *Controller) OnDelete(obj interface{})
func (*Controller) OnUpdate ¶
func (ctl *Controller) OnUpdate(before, after interface{})
func (*Controller) Run ¶
func (ctl *Controller) Run(workers int, stopCh <-chan struct{})
type Option ¶
type Option func(*Options)
func DisableRevision ¶
func DisableRevision() Option
func EnableDebug ¶
func EnableDebug() Option
func IncludeNamespaces ¶
func IncludeResources ¶
func WithExcludes ¶
func WithIgnoreCreatedBefore ¶
func WithIncludes ¶
func WithKeyFunc ¶
func WithTimeFormat ¶
type Options ¶
type Options struct { KeyFunc func(interface{}) (string, error) TimeFormat string InitBackoff time.Duration MaxBackoff time.Duration MaxRetries int IgnoreCreatedBefore time.Duration Excludes []*regexp.Regexp Includes []*regexp.Regexp // Namespaces, watch only these namespaces, default all IncludeNamespaces map[string]bool // Resources, watch only these resources, default all // Support Deployment, StatefulSet, DaemonSet IncludeResources map[string]bool Debug bool EnableRevision bool }
Click to show internal directories.
Click to hide internal directories.