rest

package
v2.0.0-...-27a1933 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2024 License: Apache-2.0 Imports: 44 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandleDuration

func HandleDuration(value string) float64

func HandleTimestamp

func HandleTimestamp(value string) float64

func TemplateFn

func TemplateFn(n *node.Node, obj string) string

Types

type EndPoint

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

type Metric

type Metric struct {
	Label      string
	Name       string
	MetricType string
	Exportable bool
}

type Rest

type Rest struct {
	*collector.AbstractCollector
	Client *rest.Client
	Prop   *prop

	BatchSize string
	// contains filtered or unexported fields
}

func (*Rest) CollectAutoSupport

func (r *Rest) CollectAutoSupport(p *collector.Payload)

func (*Rest) Fields

func (r *Rest) Fields(prop *prop) []string

func (*Rest) GetRestData

func (r *Rest) GetRestData(href string, headers ...map[string]string) ([]gjson.Result, error)

func (*Rest) HandleResults

func (r *Rest) HandleResults(mat *matrix.Matrix, result []gjson.Result, prop *prop, isEndPoint bool, oldInstances *set.Set) (uint64, uint64)

HandleResults function is used for handling the rest response for parent as well as endpoints calls, isEndPoint would be true only for the endpoint call, and it can't create/delete instance.

func (*Rest) HarvestModule

func (r *Rest) HarvestModule() plugin.ModuleInfo

func (*Rest) Init

func (r *Rest) Init(a *collector.AbstractCollector) error

func (*Rest) InitCache

func (r *Rest) InitCache() error

func (*Rest) InitClient

func (r *Rest) InitClient() error

func (*Rest) InitEndPoints

func (r *Rest) InitEndPoints() error

func (*Rest) InitMatrix

func (r *Rest) InitMatrix() error

func (*Rest) InitProp

func (r *Rest) InitProp()

func (*Rest) InitVars

func (r *Rest) InitVars(config *node.Node)

func (*Rest) LoadPlugin

func (r *Rest) LoadPlugin(kind string, abc *plugin.AbstractPlugin) plugin.Plugin

func (*Rest) LoadTemplate

func (r *Rest) LoadTemplate() (string, error)

func (*Rest) ParseRestCounters

func (r *Rest) ParseRestCounters(counter *node.Node, prop *prop)

func (*Rest) PollCounter

func (r *Rest) PollCounter() (map[string]*matrix.Matrix, error)

PollCounter performs daily tasks such as updating the cluster info and caching href.

func (*Rest) PollData

func (r *Rest) PollData() (map[string]*matrix.Matrix, error)

func (*Rest) ProcessEndPoint

func (r *Rest) ProcessEndPoint(e *EndPoint) ([]gjson.Result, time.Duration, error)

func (*Rest) ProcessEndPoints

func (r *Rest) ProcessEndPoints(mat *matrix.Matrix, endpointFunc func(e *EndPoint) ([]gjson.Result, time.Duration, error), oldInstances *set.Set) (uint64, time.Duration)

Directories

Path Synopsis
plugins
shelf
Package shelf Copyright NetApp Inc, 2021 All rights reserved
Package shelf Copyright NetApp Inc, 2021 All rights reserved
svm

Jump to

Keyboard shortcuts

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