prometheus

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2021 License: Apache-2.0 Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	prometheusapiv1.API
}

func New

func New(options *Options) (*Client, error)

func (*Client) Cluster

func (cli *Client) Cluster() types.Cluster

func (*Client) Component

func (cli *Client) Component() types.Component

func (*Client) Container

func (cli *Client) Container(namespace, pod, name, filter string) types.Container

func (*Client) GetMetadata

func (cli *Client) GetMetadata(namespace string) []types.Metadata

TODO: this interface bound to implementation

func (*Client) GetMetricLabelSet

func (cli *Client) GetMetricLabelSet(expr string, start, end time.Time) []map[string]string

func (*Client) Namespace

func (cli *Client) Namespace(workspace, name, filter string) types.Namespace

func (*Client) Node

func (cli *Client) Node(name, filter string) types.Node

func (*Client) PVC

func (cli *Client) PVC(namespace, storageClass, name, filter string) types.PVC

func (*Client) Pod

func (cli *Client) Pod(node, namespace, workloadKind, workloadName, name, filter string) types.Pod

func (*Client) Query

func (cli *Client) Query(expr string) types.MetricQuery

func (*Client) Workload

func (cli *Client) Workload(namespace, kind, filter string) types.Workload

func (*Client) Workspace

func (cli *Client) Workspace(name, filter string) types.Workspace

type Options

type Options struct {
	Endpoint string `json:"endpoint"`
}

func (*Options) Validate

func (s *Options) Validate() error

type Query

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

func (*Query) Query

func (q *Query) Query(ts time.Time) *types.Metric

func (*Query) QueryRange

func (q *Query) QueryRange(r types.Range) *types.Metric

Jump to

Keyboard shortcuts

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