monitoring

package
v0.0.0-...-4d019ae Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Builder

type Builder struct {
	// serviceMonitor definition, used to create the serviceMonitor object.
	Definition *monv1.ServiceMonitor
	// Created serviceMonitor object.
	Object *monv1.ServiceMonitor
	// contains filtered or unexported fields
}

Builder provides a struct for serviceMonitor object from the cluster and a serviceMonitor definition.

func NewBuilder

func NewBuilder(
	apiClient *clients.Settings, name, nsname string) *Builder

NewBuilder creates a new instance of Builder.

func Pull

func Pull(apiClient *clients.Settings, name, nsname string) (*Builder, error)

Pull pulls existing serviceMonitor from cluster.

func (*Builder) Create

func (builder *Builder) Create() (*Builder, error)

Create makes a serviceMonitor in the cluster and stores the created object in struct.

func (*Builder) Delete

func (builder *Builder) Delete() (*Builder, error)

Delete removes serviceMonitor from a cluster.

func (*Builder) Exists

func (builder *Builder) Exists() bool

Exists checks whether the given serviceMonitor exists.

func (*Builder) Get

func (builder *Builder) Get() (*monv1.ServiceMonitor, error)

Get fetches the defined serviceMonitor from the cluster.

func (*Builder) Update

func (builder *Builder) Update() (*Builder, error)

Update renovates the existing serviceMonitor object with serviceMonitor definition in builder.

func (*Builder) WithEndpoints

func (builder *Builder) WithEndpoints(
	endpoints []monv1.Endpoint) *Builder

WithEndpoints sets the serviceMonitor operator's endpoints.

func (*Builder) WithLabels

func (builder *Builder) WithLabels(labels map[string]string) *Builder

WithLabels redefines the serviceMonitor with labels.

func (*Builder) WithNamespaceSelector

func (builder *Builder) WithNamespaceSelector(namespaceSelector []string) *Builder

WithNamespaceSelector redefines the serviceMonitor with namespaceSelector.

func (*Builder) WithSelector

func (builder *Builder) WithSelector(selector map[string]string) *Builder

WithSelector redefines the serviceMonitor with selector.

Jump to

Keyboard shortcuts

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