instance

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Name        string           `json:"name"`
	DisplayName string           `json:"displayName"`
	Description string           `json:"description"`
	Home        bool             `json:"home"`
	Prometheus  ConfigPrometheus `json:"prometheus"`
	Klogs       ConfigKlogs      `json:"klogs"`
}

Config is the structure of the configuration for a single Opsgenie instance.

type ConfigKlogs

type ConfigKlogs struct {
	Enabled bool   `json:"enabled"`
	Name    string `json:"name"`
}

ConfigKlogs is the structure of the configuration, which is required to enabled the klogs integration for the Istio plugin.

type ConfigPrometheus

type ConfigPrometheus struct {
	Enabled bool   `json:"enabled"`
	Name    string `json:"name"`
}

ConfigPrometheus is the structure of the configuration, which is required to enabled the Prometheus integration for the Istio plugin.

type Edge

type Edge struct {
	Data EdgeData `json:"data"`
}

type EdgeData

type EdgeData struct {
	ID     string `json:"id"`
	Source string `json:"source"`
	Target string `json:"target"`
}

type Instance

type Instance struct {
	Name string
	// contains filtered or unexported fields
}

Instance represents a single Jaeger instance, which can be added via the configuration file.

func New

func New(config Config, prometheusInstances []*prometheusInstance.Instance, klogsInstances []*klogsInstance.Instance) (*Instance, error)

New returns a new Elasticsearch instance for the given configuration.

func (*Instance) GetMetrics

func (i *Instance) GetMetrics(ctx context.Context, namespaces []string, application, label, groupBy, reporter string, timeStart int64, timeEnd int64) (map[string]map[string]string, error)

GetMetrics returns the success rate, requests per second, P50, P90 and P99 latency for the specified namespaces and labels.

func (*Instance) GetMetricsDetails

func (i *Instance) GetMetricsDetails(ctx context.Context, metric, reporter, destinationWorkload, destinationWorkloadNamespace, destinationVersion, destinationService, sourceWorkload, sourceWorkloadNamespace, pod string, timeStart int64, timeEnd int64) (*prometheusInstance.Metrics, error)

GetMetricsDetails returns the timeseries data for the requested details metric.

func (*Instance) GetMetricsPod

func (i *Instance) GetMetricsPod(ctx context.Context, metric, namespace, pod string, timeStart int64, timeEnd int64) (*prometheusInstance.Metrics, error)

GetMetricsPod returns the timeseries data for the requested details metric.

func (*Instance) GetNamespaces

func (i *Instance) GetNamespaces(ctx context.Context, timeStart int64, timeEnd int64) ([]string, error)

GetNamespaces returns a list of namespaces, which can be selected to get the applications from.

func (*Instance) GetTopology

func (i *Instance) GetTopology(ctx context.Context, namespace, application string, timeStart int64, timeEnd int64) ([]Edge, []Node, error)

GetTopology creates a simple topology graph for the given application, with all the incoming sources and outgoing destinations for the application.

func (*Instance) Tap

func (i *Instance) Tap(ctx context.Context, namespace, application, filterUpstreamCluster, filterMethod, filterPath string, timeStart int64, timeEnd int64) ([]map[string]interface{}, error)

Tap returns the logs for the specified Istio application.

func (*Instance) Top

func (i *Instance) Top(ctx context.Context, namespace, application, filterUpstreamCluster, filterMethod, filterPath, sortBy, sortDirection string, timeStart int64, timeEnd int64) ([][]interface{}, error)

Top returns the aggregated logs for the specified Istio application.

func (*Instance) TopDetails

func (i *Instance) TopDetails(ctx context.Context, namespace, application, upstreamCluster, method, path string, timeStart int64, timeEnd int64) ([][]interface{}, error)

TopDetails returns the success rate and latency for the specified upstream cluster, method and path.

type Node

type Node struct {
	Data NodeData `json:"data"`
}

type NodeData

type NodeData struct {
	ID      string            `json:"id"`
	Metrics map[string]string `json:"metrics"`
}

Jump to

Keyboard shortcuts

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