Documentation
¶
Overview ¶
Package top things related to metrics the service mesh
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildTopMetrics ¶
func BuildTopMetrics(writer io.Writer, obj MetricsMetaInterface) error
BuildTopMetrics build metrics by querying the traffic metrics endpoint.
Types ¶
type FakeMetricsMeta ¶
type FakeMetricsMeta struct {
MetricsMeta
// contains filtered or unexported fields
}
FakeMetricsMeta stubs the call to the apiservice, but otherwise operates the same as object.
func (*FakeMetricsMeta) GetDisplayName ¶
func (f *FakeMetricsMeta) GetDisplayName() string
GetDisplayName gets the display name referenced in the Object.
func (*FakeMetricsMeta) GetMetricsList ¶
func (f *FakeMetricsMeta) GetMetricsList() (*tm.TrafficMetricsList, error)
GetMetricsList returns the trafficMetricsList defined in the FakeMetricsMeta.
func (*FakeMetricsMeta) GetName ¶
func (f *FakeMetricsMeta) GetName() string
GetName gets the name referenced in the Object.
type MetricsMeta ¶
type MetricsMeta struct {
Client *aggregator.Clientset
DisplayName string
v1.ObjectReference
}
MetricsMeta holds information on what resource should be queried and displayed to the user.
func (*MetricsMeta) GetDisplayName ¶
func (m *MetricsMeta) GetDisplayName() string
GetDisplayName returns the display name of the object.
func (*MetricsMeta) GetMetricsList ¶
func (m *MetricsMeta) GetMetricsList() (*tm.TrafficMetricsList, error)
GetMetricsList queries the apiservice for the trafficmetricslist associated with the given object.
func (*MetricsMeta) GetName ¶
func (m *MetricsMeta) GetName() string
GetName returns the name of the object.
type MetricsMetaInterface ¶
type MetricsMetaInterface interface {
GetName() string
GetDisplayName() string
GetMetricsList() (*tm.TrafficMetricsList, error)
}
MetricsMetaInterface provides an abstraction over Object, so that it may be faked.