mesh

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ListKey

func ListKey(kind, name, namespace string) *v1.ObjectReference

listKey constructs a key that is useful for getting elements from a TrafficMetricsList

Types

type ErrorResponse

type ErrorResponse struct {
	Error string `json:"error"`
}

type Mesh

type Mesh interface {
	// Return the list of supported resource kinds
	GetSupportedResources(ctx context.Context) (*metav1.APIResourceList, error)
	// Return metrics for a resource or for the type if name is empty
	GetResourceMetrics(ctx context.Context,
		query Query,
		interval *metrics.Interval) (*metrics.TrafficMetricsList, error)
	// Return the Edge Metrics for a resource
	GetEdgeMetrics(ctx context.Context,
		query Query,
		interval *metrics.Interval,
		details *ResourceDetails) (*metrics.TrafficMetricsList, error)
}

type Query

type Query struct {
	Name      string
	Namespace string
	Kind      string
}

type ResourceDetails

type ResourceDetails struct {
	Kind       string
	Namespaced bool
}

func GetResourceDetails

func GetResourceDetails(name string) (*ResourceDetails, bool)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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