Documentation ¶
Index ¶
- Constants
- func GetResourceWatcherList(resourcesFuncList []func(ResourceWatcherArgs) watcher.ResourceWatcher, ...) []watcher.ResourceWatcher
- func GetResourcesFuncListFromConfig(c *config.Config) ([]func(ResourceWatcherArgs) watcher.ResourceWatcher, error)
- func NewDaemonsetWatcher(arg ResourceWatcherArgs) watcher.ResourceWatcher
- func NewDeploymentWatcher(arg ResourceWatcherArgs) watcher.ResourceWatcher
- func NewIngressWatcher(arg ResourceWatcherArgs) watcher.ResourceWatcher
- func NewServiceWatcher(arg ResourceWatcherArgs) watcher.ResourceWatcher
- func NewStatefulsetWatcher(arg ResourceWatcherArgs) watcher.ResourceWatcher
- type K8sResourceWatcher
- type ResourceWatcherArgs
Constants ¶
const (
// DAEMONSET const used by registration process
DAEMONSET = "daemonset"
)
const (
// DEPLOYMENT const used by registration process
DEPLOYMENT = "deployment"
)
const (
// INGRESS const used by registration process
INGRESS = "ingress"
)
const (
// SERVICE const used by registration process
SERVICE = "service"
)
const (
// STATEFULSET const used by registration process
STATEFULSET = "statefulset"
)
Variables ¶
This section is empty.
Functions ¶
func GetResourceWatcherList ¶
func GetResourceWatcherList( resourcesFuncList []func(ResourceWatcherArgs) watcher.ResourceWatcher, args ResourceWatcherArgs) []watcher.ResourceWatcher
GetResourceWatcherList return the list of configured resources
func GetResourcesFuncListFromConfig ¶
func GetResourcesFuncListFromConfig(c *config.Config) ([]func(ResourceWatcherArgs) watcher.ResourceWatcher, error)
GetResourcesFuncListFromConfig return list of resource objects from configuration
func NewDaemonsetWatcher ¶
func NewDaemonsetWatcher(arg ResourceWatcherArgs) watcher.ResourceWatcher
NewDaemonsetWatcher return a watcher for k8s daemonset
func NewDeploymentWatcher ¶
func NewDeploymentWatcher(arg ResourceWatcherArgs) watcher.ResourceWatcher
NewDeploymentWatcher return a watcher for k8s deployments
func NewIngressWatcher ¶
func NewIngressWatcher(arg ResourceWatcherArgs) watcher.ResourceWatcher
NewIngressWatcher return a watcher for k8s ingress TODO: From 1.14 extensions/v1beta1 apigroup is deprecated in favour of networking.k8s.io ideally we should handle this api group change transparently for users, although old users will eventually have to migrate over new versions of kwatchman with the new type and a go-client version compatible
func NewServiceWatcher ¶
func NewServiceWatcher(arg ResourceWatcherArgs) watcher.ResourceWatcher
NewServiceWatcher return a watcher for k8s services
func NewStatefulsetWatcher ¶
func NewStatefulsetWatcher(arg ResourceWatcherArgs) watcher.ResourceWatcher
NewStatefulsetWatcher return a watcher for k8s statefulsets
Types ¶
type K8sResourceWatcher ¶
type K8sResourceWatcher struct {
// contains filtered or unexported fields
}
K8sResourceWatcher represent the resourceWatcher
func (*K8sResourceWatcher) Shutdown ¶
func (r *K8sResourceWatcher) Shutdown()
Shutdown the resource watcher
type ResourceWatcherArgs ¶
type ResourceWatcherArgs struct { Clientset kubernetes.Interface Namespace string LabelSelector string ChainOfHandlers handler.ChainOfHandlers }
ResourceWatcherArgs hold the arguments passed to instantiate resources watchers