v1

package
v0.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 1, 2021 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GroupName = "monitoring.coreos.com"
	Version   = "v1"
)

Variables

View Source
var (
	AlertmanagerGroupVersionKind = schema.GroupVersionKind{
		Version: Version,
		Group:   GroupName,
		Kind:    "Alertmanager",
	}
	AlertmanagerResource = metav1.APIResource{
		Name:         "alertmanagers",
		SingularName: "alertmanager",
		Namespaced:   true,

		Kind: AlertmanagerGroupVersionKind.Kind,
	}

	AlertmanagerGroupVersionResource = schema.GroupVersionResource{
		Group:    GroupName,
		Version:  Version,
		Resource: "alertmanagers",
	}
)
View Source
var (
	PrometheusGroupVersionKind = schema.GroupVersionKind{
		Version: Version,
		Group:   GroupName,
		Kind:    "Prometheus",
	}
	PrometheusResource = metav1.APIResource{
		Name:         "prometheuses",
		SingularName: "prometheus",
		Namespaced:   true,

		Kind: PrometheusGroupVersionKind.Kind,
	}

	PrometheusGroupVersionResource = schema.GroupVersionResource{
		Group:    GroupName,
		Version:  Version,
		Resource: "prometheuses",
	}
)
View Source
var (
	PrometheusRuleGroupVersionKind = schema.GroupVersionKind{
		Version: Version,
		Group:   GroupName,
		Kind:    "PrometheusRule",
	}
	PrometheusRuleResource = metav1.APIResource{
		Name:         "prometheusrules",
		SingularName: "prometheusrule",
		Namespaced:   true,

		Kind: PrometheusRuleGroupVersionKind.Kind,
	}

	PrometheusRuleGroupVersionResource = schema.GroupVersionResource{
		Group:    GroupName,
		Version:  Version,
		Resource: "prometheusrules",
	}
)
View Source
var (
	ServiceMonitorGroupVersionKind = schema.GroupVersionKind{
		Version: Version,
		Group:   GroupName,
		Kind:    "ServiceMonitor",
	}
	ServiceMonitorResource = metav1.APIResource{
		Name:         "servicemonitors",
		SingularName: "servicemonitor",
		Namespaced:   true,

		Kind: ServiceMonitorGroupVersionKind.Kind,
	}

	ServiceMonitorGroupVersionResource = schema.GroupVersionResource{
		Group:    GroupName,
		Version:  Version,
		Resource: "servicemonitors",
	}
)
View Source
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: Version}

SchemeGroupVersion is group version used to register these objects

Functions

func Kind

func Kind(kind string) schema.GroupKind

Kind takes an unqualified kind and returns a Group qualified GroupKind

func NewAlertmanager

func NewAlertmanager(namespace, name string, obj v1.Alertmanager) *v1.Alertmanager

func NewPrometheus

func NewPrometheus(namespace, name string, obj v1.Prometheus) *v1.Prometheus

func NewPrometheusRule

func NewPrometheusRule(namespace, name string, obj v1.PrometheusRule) *v1.PrometheusRule

func NewServiceMonitor

func NewServiceMonitor(namespace, name string, obj v1.ServiceMonitor) *v1.ServiceMonitor

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource

Types

type AlertmanagerChangeHandlerFunc

type AlertmanagerChangeHandlerFunc func(obj *v1.Alertmanager) (runtime.Object, error)

type AlertmanagerController

type AlertmanagerController interface {
	Generic() controller.GenericController
	Informer() cache.SharedIndexInformer
	Lister() AlertmanagerLister
	AddHandler(ctx context.Context, name string, handler AlertmanagerHandlerFunc)
	AddFeatureHandler(ctx context.Context, enabled func() bool, name string, sync AlertmanagerHandlerFunc)
	AddClusterScopedHandler(ctx context.Context, name, clusterName string, handler AlertmanagerHandlerFunc)
	AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler AlertmanagerHandlerFunc)
	Enqueue(namespace, name string)
	EnqueueAfter(namespace, name string, after time.Duration)
}

type AlertmanagerHandlerFunc

type AlertmanagerHandlerFunc func(key string, obj *v1.Alertmanager) (runtime.Object, error)

func NewAlertmanagerLifecycleAdapter

func NewAlertmanagerLifecycleAdapter(name string, clusterScoped bool, client AlertmanagerInterface, l AlertmanagerLifecycle) AlertmanagerHandlerFunc

type AlertmanagerInterface

type AlertmanagerInterface interface {
	ObjectClient() *objectclient.ObjectClient
	Create(*v1.Alertmanager) (*v1.Alertmanager, error)
	GetNamespaced(namespace, name string, opts metav1.GetOptions) (*v1.Alertmanager, error)
	Get(name string, opts metav1.GetOptions) (*v1.Alertmanager, error)
	Update(*v1.Alertmanager) (*v1.Alertmanager, error)
	Delete(name string, options *metav1.DeleteOptions) error
	DeleteNamespaced(namespace, name string, options *metav1.DeleteOptions) error
	List(opts metav1.ListOptions) (*v1.AlertmanagerList, error)
	ListNamespaced(namespace string, opts metav1.ListOptions) (*v1.AlertmanagerList, error)
	Watch(opts metav1.ListOptions) (watch.Interface, error)
	DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error
	Controller() AlertmanagerController
	AddHandler(ctx context.Context, name string, sync AlertmanagerHandlerFunc)
	AddFeatureHandler(ctx context.Context, enabled func() bool, name string, sync AlertmanagerHandlerFunc)
	AddLifecycle(ctx context.Context, name string, lifecycle AlertmanagerLifecycle)
	AddFeatureLifecycle(ctx context.Context, enabled func() bool, name string, lifecycle AlertmanagerLifecycle)
	AddClusterScopedHandler(ctx context.Context, name, clusterName string, sync AlertmanagerHandlerFunc)
	AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, sync AlertmanagerHandlerFunc)
	AddClusterScopedLifecycle(ctx context.Context, name, clusterName string, lifecycle AlertmanagerLifecycle)
	AddClusterScopedFeatureLifecycle(ctx context.Context, enabled func() bool, name, clusterName string, lifecycle AlertmanagerLifecycle)
}

type AlertmanagerLifecycle

type AlertmanagerLifecycle interface {
	Create(obj *v1.Alertmanager) (runtime.Object, error)
	Remove(obj *v1.Alertmanager) (runtime.Object, error)
	Updated(obj *v1.Alertmanager) (runtime.Object, error)
}

type AlertmanagerLister

type AlertmanagerLister interface {
	List(namespace string, selector labels.Selector) (ret []*v1.Alertmanager, err error)
	Get(namespace, name string) (*v1.Alertmanager, error)
}

type AlertmanagersGetter

type AlertmanagersGetter interface {
	Alertmanagers(namespace string) AlertmanagerInterface
}

type Client

type Client struct {
	// contains filtered or unexported fields
}

func (*Client) Alertmanagers

func (c *Client) Alertmanagers(namespace string) AlertmanagerInterface

func (*Client) PrometheusRules

func (c *Client) PrometheusRules(namespace string) PrometheusRuleInterface

func (*Client) Prometheuses

func (c *Client) Prometheuses(namespace string) PrometheusInterface

func (*Client) ServiceMonitors

func (c *Client) ServiceMonitors(namespace string) ServiceMonitorInterface

type Interface

func NewFromControllerFactory added in v0.0.2

func NewFromControllerFactory(factory controller.SharedControllerFactory) (Interface, error)

type PrometheusChangeHandlerFunc

type PrometheusChangeHandlerFunc func(obj *v1.Prometheus) (runtime.Object, error)

type PrometheusController

type PrometheusController interface {
	Generic() controller.GenericController
	Informer() cache.SharedIndexInformer
	Lister() PrometheusLister
	AddHandler(ctx context.Context, name string, handler PrometheusHandlerFunc)
	AddFeatureHandler(ctx context.Context, enabled func() bool, name string, sync PrometheusHandlerFunc)
	AddClusterScopedHandler(ctx context.Context, name, clusterName string, handler PrometheusHandlerFunc)
	AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler PrometheusHandlerFunc)
	Enqueue(namespace, name string)
	EnqueueAfter(namespace, name string, after time.Duration)
}

type PrometheusHandlerFunc

type PrometheusHandlerFunc func(key string, obj *v1.Prometheus) (runtime.Object, error)

func NewPrometheusLifecycleAdapter

func NewPrometheusLifecycleAdapter(name string, clusterScoped bool, client PrometheusInterface, l PrometheusLifecycle) PrometheusHandlerFunc

type PrometheusInterface

type PrometheusInterface interface {
	ObjectClient() *objectclient.ObjectClient
	Create(*v1.Prometheus) (*v1.Prometheus, error)
	GetNamespaced(namespace, name string, opts metav1.GetOptions) (*v1.Prometheus, error)
	Get(name string, opts metav1.GetOptions) (*v1.Prometheus, error)
	Update(*v1.Prometheus) (*v1.Prometheus, error)
	Delete(name string, options *metav1.DeleteOptions) error
	DeleteNamespaced(namespace, name string, options *metav1.DeleteOptions) error
	List(opts metav1.ListOptions) (*v1.PrometheusList, error)
	ListNamespaced(namespace string, opts metav1.ListOptions) (*v1.PrometheusList, error)
	Watch(opts metav1.ListOptions) (watch.Interface, error)
	DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error
	Controller() PrometheusController
	AddHandler(ctx context.Context, name string, sync PrometheusHandlerFunc)
	AddFeatureHandler(ctx context.Context, enabled func() bool, name string, sync PrometheusHandlerFunc)
	AddLifecycle(ctx context.Context, name string, lifecycle PrometheusLifecycle)
	AddFeatureLifecycle(ctx context.Context, enabled func() bool, name string, lifecycle PrometheusLifecycle)
	AddClusterScopedHandler(ctx context.Context, name, clusterName string, sync PrometheusHandlerFunc)
	AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, sync PrometheusHandlerFunc)
	AddClusterScopedLifecycle(ctx context.Context, name, clusterName string, lifecycle PrometheusLifecycle)
	AddClusterScopedFeatureLifecycle(ctx context.Context, enabled func() bool, name, clusterName string, lifecycle PrometheusLifecycle)
}

type PrometheusLifecycle

type PrometheusLifecycle interface {
	Create(obj *v1.Prometheus) (runtime.Object, error)
	Remove(obj *v1.Prometheus) (runtime.Object, error)
	Updated(obj *v1.Prometheus) (runtime.Object, error)
}

type PrometheusLister

type PrometheusLister interface {
	List(namespace string, selector labels.Selector) (ret []*v1.Prometheus, err error)
	Get(namespace, name string) (*v1.Prometheus, error)
}

type PrometheusRuleChangeHandlerFunc

type PrometheusRuleChangeHandlerFunc func(obj *v1.PrometheusRule) (runtime.Object, error)

type PrometheusRuleController

type PrometheusRuleController interface {
	Generic() controller.GenericController
	Informer() cache.SharedIndexInformer
	Lister() PrometheusRuleLister
	AddHandler(ctx context.Context, name string, handler PrometheusRuleHandlerFunc)
	AddFeatureHandler(ctx context.Context, enabled func() bool, name string, sync PrometheusRuleHandlerFunc)
	AddClusterScopedHandler(ctx context.Context, name, clusterName string, handler PrometheusRuleHandlerFunc)
	AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler PrometheusRuleHandlerFunc)
	Enqueue(namespace, name string)
	EnqueueAfter(namespace, name string, after time.Duration)
}

type PrometheusRuleHandlerFunc

type PrometheusRuleHandlerFunc func(key string, obj *v1.PrometheusRule) (runtime.Object, error)

func NewPrometheusRuleLifecycleAdapter

func NewPrometheusRuleLifecycleAdapter(name string, clusterScoped bool, client PrometheusRuleInterface, l PrometheusRuleLifecycle) PrometheusRuleHandlerFunc

type PrometheusRuleInterface

type PrometheusRuleInterface interface {
	ObjectClient() *objectclient.ObjectClient
	Create(*v1.PrometheusRule) (*v1.PrometheusRule, error)
	GetNamespaced(namespace, name string, opts metav1.GetOptions) (*v1.PrometheusRule, error)
	Get(name string, opts metav1.GetOptions) (*v1.PrometheusRule, error)
	Update(*v1.PrometheusRule) (*v1.PrometheusRule, error)
	Delete(name string, options *metav1.DeleteOptions) error
	DeleteNamespaced(namespace, name string, options *metav1.DeleteOptions) error
	List(opts metav1.ListOptions) (*v1.PrometheusRuleList, error)
	ListNamespaced(namespace string, opts metav1.ListOptions) (*v1.PrometheusRuleList, error)
	Watch(opts metav1.ListOptions) (watch.Interface, error)
	DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error
	Controller() PrometheusRuleController
	AddHandler(ctx context.Context, name string, sync PrometheusRuleHandlerFunc)
	AddFeatureHandler(ctx context.Context, enabled func() bool, name string, sync PrometheusRuleHandlerFunc)
	AddLifecycle(ctx context.Context, name string, lifecycle PrometheusRuleLifecycle)
	AddFeatureLifecycle(ctx context.Context, enabled func() bool, name string, lifecycle PrometheusRuleLifecycle)
	AddClusterScopedHandler(ctx context.Context, name, clusterName string, sync PrometheusRuleHandlerFunc)
	AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, sync PrometheusRuleHandlerFunc)
	AddClusterScopedLifecycle(ctx context.Context, name, clusterName string, lifecycle PrometheusRuleLifecycle)
	AddClusterScopedFeatureLifecycle(ctx context.Context, enabled func() bool, name, clusterName string, lifecycle PrometheusRuleLifecycle)
}

type PrometheusRuleLifecycle

type PrometheusRuleLifecycle interface {
	Create(obj *v1.PrometheusRule) (runtime.Object, error)
	Remove(obj *v1.PrometheusRule) (runtime.Object, error)
	Updated(obj *v1.PrometheusRule) (runtime.Object, error)
}

type PrometheusRuleLister

type PrometheusRuleLister interface {
	List(namespace string, selector labels.Selector) (ret []*v1.PrometheusRule, err error)
	Get(namespace, name string) (*v1.PrometheusRule, error)
}

type PrometheusRulesGetter

type PrometheusRulesGetter interface {
	PrometheusRules(namespace string) PrometheusRuleInterface
}

type PrometheusesGetter

type PrometheusesGetter interface {
	Prometheuses(namespace string) PrometheusInterface
}

type ServiceMonitorChangeHandlerFunc

type ServiceMonitorChangeHandlerFunc func(obj *v1.ServiceMonitor) (runtime.Object, error)

type ServiceMonitorController

type ServiceMonitorController interface {
	Generic() controller.GenericController
	Informer() cache.SharedIndexInformer
	Lister() ServiceMonitorLister
	AddHandler(ctx context.Context, name string, handler ServiceMonitorHandlerFunc)
	AddFeatureHandler(ctx context.Context, enabled func() bool, name string, sync ServiceMonitorHandlerFunc)
	AddClusterScopedHandler(ctx context.Context, name, clusterName string, handler ServiceMonitorHandlerFunc)
	AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler ServiceMonitorHandlerFunc)
	Enqueue(namespace, name string)
	EnqueueAfter(namespace, name string, after time.Duration)
}

type ServiceMonitorHandlerFunc

type ServiceMonitorHandlerFunc func(key string, obj *v1.ServiceMonitor) (runtime.Object, error)

func NewServiceMonitorLifecycleAdapter

func NewServiceMonitorLifecycleAdapter(name string, clusterScoped bool, client ServiceMonitorInterface, l ServiceMonitorLifecycle) ServiceMonitorHandlerFunc

type ServiceMonitorInterface

type ServiceMonitorInterface interface {
	ObjectClient() *objectclient.ObjectClient
	Create(*v1.ServiceMonitor) (*v1.ServiceMonitor, error)
	GetNamespaced(namespace, name string, opts metav1.GetOptions) (*v1.ServiceMonitor, error)
	Get(name string, opts metav1.GetOptions) (*v1.ServiceMonitor, error)
	Update(*v1.ServiceMonitor) (*v1.ServiceMonitor, error)
	Delete(name string, options *metav1.DeleteOptions) error
	DeleteNamespaced(namespace, name string, options *metav1.DeleteOptions) error
	List(opts metav1.ListOptions) (*v1.ServiceMonitorList, error)
	ListNamespaced(namespace string, opts metav1.ListOptions) (*v1.ServiceMonitorList, error)
	Watch(opts metav1.ListOptions) (watch.Interface, error)
	DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error
	Controller() ServiceMonitorController
	AddHandler(ctx context.Context, name string, sync ServiceMonitorHandlerFunc)
	AddFeatureHandler(ctx context.Context, enabled func() bool, name string, sync ServiceMonitorHandlerFunc)
	AddLifecycle(ctx context.Context, name string, lifecycle ServiceMonitorLifecycle)
	AddFeatureLifecycle(ctx context.Context, enabled func() bool, name string, lifecycle ServiceMonitorLifecycle)
	AddClusterScopedHandler(ctx context.Context, name, clusterName string, sync ServiceMonitorHandlerFunc)
	AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, sync ServiceMonitorHandlerFunc)
	AddClusterScopedLifecycle(ctx context.Context, name, clusterName string, lifecycle ServiceMonitorLifecycle)
	AddClusterScopedFeatureLifecycle(ctx context.Context, enabled func() bool, name, clusterName string, lifecycle ServiceMonitorLifecycle)
}

type ServiceMonitorLifecycle

type ServiceMonitorLifecycle interface {
	Create(obj *v1.ServiceMonitor) (runtime.Object, error)
	Remove(obj *v1.ServiceMonitor) (runtime.Object, error)
	Updated(obj *v1.ServiceMonitor) (runtime.Object, error)
}

type ServiceMonitorLister

type ServiceMonitorLister interface {
	List(namespace string, selector labels.Selector) (ret []*v1.ServiceMonitor, err error)
	Get(namespace, name string) (*v1.ServiceMonitor, error)
}

type ServiceMonitorsGetter

type ServiceMonitorsGetter interface {
	ServiceMonitors(namespace string) ServiceMonitorInterface
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL