v1

package
v1.1.3-rc1 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2023 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromAlertmanagerHandlerToHandler

func FromAlertmanagerHandlerToHandler(sync AlertmanagerHandler) generic.Handler

func FromPrometheusHandlerToHandler

func FromPrometheusHandlerToHandler(sync PrometheusHandler) generic.Handler

func RegisterPrometheusGeneratingHandler added in v1.1.2

func RegisterPrometheusGeneratingHandler(ctx context.Context, controller PrometheusController, apply apply.Apply,
	condition condition.Cond, name string, handler PrometheusGeneratingHandler, opts *generic.GeneratingHandlerOptions)

func RegisterPrometheusStatusHandler added in v1.1.2

func RegisterPrometheusStatusHandler(ctx context.Context, controller PrometheusController, condition condition.Cond, name string, handler PrometheusStatusHandler)

func UpdateAlertmanagerDeepCopyOnChange

func UpdateAlertmanagerDeepCopyOnChange(client AlertmanagerClient, obj *v1.Alertmanager, handler func(obj *v1.Alertmanager) (*v1.Alertmanager, error)) (*v1.Alertmanager, error)

func UpdatePrometheusDeepCopyOnChange

func UpdatePrometheusDeepCopyOnChange(client PrometheusClient, obj *v1.Prometheus, handler func(obj *v1.Prometheus) (*v1.Prometheus, error)) (*v1.Prometheus, error)

Types

type AlertmanagerCache

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

	AddIndexer(indexName string, indexer AlertmanagerIndexer)
	GetByIndex(indexName, key string) ([]*v1.Alertmanager, error)
}

type AlertmanagerClient

type AlertmanagerClient interface {
	Create(*v1.Alertmanager) (*v1.Alertmanager, error)
	Update(*v1.Alertmanager) (*v1.Alertmanager, error)

	Delete(namespace, name string, options *metav1.DeleteOptions) error
	Get(namespace, name string, options metav1.GetOptions) (*v1.Alertmanager, error)
	List(namespace string, opts metav1.ListOptions) (*v1.AlertmanagerList, error)
	Watch(namespace string, opts metav1.ListOptions) (watch.Interface, error)
	Patch(namespace, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Alertmanager, err error)
}

type AlertmanagerController

type AlertmanagerController interface {
	generic.ControllerMeta
	AlertmanagerClient

	OnChange(ctx context.Context, name string, sync AlertmanagerHandler)
	OnRemove(ctx context.Context, name string, sync AlertmanagerHandler)
	Enqueue(namespace, name string)
	EnqueueAfter(namespace, name string, duration time.Duration)

	Cache() AlertmanagerCache
}

func NewAlertmanagerController

func NewAlertmanagerController(gvk schema.GroupVersionKind, resource string, namespaced bool, controller controller.SharedControllerFactory) AlertmanagerController

type AlertmanagerHandler

type AlertmanagerHandler func(string, *v1.Alertmanager) (*v1.Alertmanager, error)

type AlertmanagerIndexer

type AlertmanagerIndexer func(obj *v1.Alertmanager) ([]string, error)

type Interface

type Interface interface {
	Alertmanager() AlertmanagerController
	Prometheus() PrometheusController
}

func New

func New(controllerFactory controller.SharedControllerFactory) Interface

type PrometheusCache

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

	AddIndexer(indexName string, indexer PrometheusIndexer)
	GetByIndex(indexName, key string) ([]*v1.Prometheus, error)
}

type PrometheusClient

type PrometheusClient interface {
	Create(*v1.Prometheus) (*v1.Prometheus, error)
	Update(*v1.Prometheus) (*v1.Prometheus, error)
	UpdateStatus(*v1.Prometheus) (*v1.Prometheus, error)
	Delete(namespace, name string, options *metav1.DeleteOptions) error
	Get(namespace, name string, options metav1.GetOptions) (*v1.Prometheus, error)
	List(namespace string, opts metav1.ListOptions) (*v1.PrometheusList, error)
	Watch(namespace string, opts metav1.ListOptions) (watch.Interface, error)
	Patch(namespace, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Prometheus, err error)
}

type PrometheusController

type PrometheusController interface {
	generic.ControllerMeta
	PrometheusClient

	OnChange(ctx context.Context, name string, sync PrometheusHandler)
	OnRemove(ctx context.Context, name string, sync PrometheusHandler)
	Enqueue(namespace, name string)
	EnqueueAfter(namespace, name string, duration time.Duration)

	Cache() PrometheusCache
}

func NewPrometheusController

func NewPrometheusController(gvk schema.GroupVersionKind, resource string, namespaced bool, controller controller.SharedControllerFactory) PrometheusController

type PrometheusGeneratingHandler added in v1.1.2

type PrometheusGeneratingHandler func(obj *v1.Prometheus, status v1.PrometheusStatus) ([]runtime.Object, v1.PrometheusStatus, error)

type PrometheusHandler

type PrometheusHandler func(string, *v1.Prometheus) (*v1.Prometheus, error)

type PrometheusIndexer

type PrometheusIndexer func(obj *v1.Prometheus) ([]string, error)

type PrometheusStatusHandler added in v1.1.2

type PrometheusStatusHandler func(obj *v1.Prometheus, status v1.PrometheusStatus) (v1.PrometheusStatus, error)

Jump to

Keyboard shortcuts

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