Documentation ¶
Index ¶
- type Config
- type ConfigKlogs
- type ConfigPrometheus
- type Edge
- type EdgeData
- type Instance
- type MockInstance
- func (_m *MockInstance) GetMetrics(ctx context.Context, namespaces []string, application string, label string, ...) (map[string]map[string]string, error)
- func (_m *MockInstance) GetMetricsDetails(ctx context.Context, metric string, reporter string, ...) (*pkginstance.Metrics, error)
- func (_m *MockInstance) GetMetricsPod(ctx context.Context, metric string, namespace string, pod string, ...) (*pkginstance.Metrics, error)
- func (_m *MockInstance) GetName() string
- func (_m *MockInstance) GetNamespaces(ctx context.Context, timeStart int64, timeEnd int64) ([]string, error)
- func (_m *MockInstance) GetTopology(ctx context.Context, namespace string, application string, timeStart int64, ...) ([]Edge, []Node, error)
- func (_m *MockInstance) Tap(ctx context.Context, namespace string, application string, ...) ([]map[string]interface{}, error)
- func (_m *MockInstance) Top(ctx context.Context, namespace string, application string, ...) ([][]interface{}, error)
- func (_m *MockInstance) TopDetails(ctx context.Context, namespace string, application string, ...) ([][]interface{}, error)
- type Node
- type NodeData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Prometheus ConfigPrometheus `json:"prometheus"` Klogs ConfigKlogs `json:"klogs"` }
Config is the structure of the configuration for a single Harbor database instance.
type ConfigKlogs ¶
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"` Options map[string]any `json:"options"` }
ConfigPrometheus is the structure of the configuration, which is required to enabled the Prometheus integration for the Istio plugin.
type Instance ¶
type Instance interface { GetName() string GetNamespaces(ctx context.Context, timeStart int64, timeEnd int64) ([]string, error) GetMetrics(ctx context.Context, namespaces []string, application, label, groupBy, reporter string, timeStart int64, timeEnd int64) (map[string]map[string]string, error) GetMetricsDetails(ctx context.Context, metric, reporter, destinationWorkload, destinationWorkloadNamespace, destinationVersion, destinationService, sourceWorkload, sourceWorkloadNamespace, pod string, timeStart int64, timeEnd int64) (*prometheusInstance.Metrics, error) GetMetricsPod(ctx context.Context, metric, namespace, pod string, timeStart int64, timeEnd int64) (*prometheusInstance.Metrics, error) GetTopology(ctx context.Context, namespace, application string, timeStart int64, timeEnd int64) ([]Edge, []Node, error) Tap(ctx context.Context, namespace, application, filterUpstreamCluster, filterMethod, filterPath string, timeStart int64, timeEnd int64) ([]map[string]any, error) Top(ctx context.Context, namespace, application, filterUpstreamCluster, filterMethod, filterPath, sortBy, sortDirection string, timeStart int64, timeEnd int64) ([][]any, error) TopDetails(ctx context.Context, namespace, application, upstreamCluster, method, path string, timeStart int64, timeEnd int64) ([][]any, error) }
type MockInstance ¶
MockInstance is an autogenerated mock type for the Instance type
func NewMockInstance ¶
func NewMockInstance(t testing.TB) *MockInstance
NewMockInstance creates a new instance of MockInstance. It also registers the testing.TB interface on the mock and a cleanup function to assert the mocks expectations.
func (*MockInstance) GetMetrics ¶
func (_m *MockInstance) GetMetrics(ctx context.Context, namespaces []string, application string, label string, groupBy string, reporter string, timeStart int64, timeEnd int64) (map[string]map[string]string, error)
GetMetrics provides a mock function with given fields: ctx, namespaces, application, label, groupBy, reporter, timeStart, timeEnd
func (*MockInstance) GetMetricsDetails ¶
func (_m *MockInstance) GetMetricsDetails(ctx context.Context, metric string, reporter string, destinationWorkload string, destinationWorkloadNamespace string, destinationVersion string, destinationService string, sourceWorkload string, sourceWorkloadNamespace string, pod string, timeStart int64, timeEnd int64) (*pkginstance.Metrics, error)
GetMetricsDetails provides a mock function with given fields: ctx, metric, reporter, destinationWorkload, destinationWorkloadNamespace, destinationVersion, destinationService, sourceWorkload, sourceWorkloadNamespace, pod, timeStart, timeEnd
func (*MockInstance) GetMetricsPod ¶
func (_m *MockInstance) GetMetricsPod(ctx context.Context, metric string, namespace string, pod string, timeStart int64, timeEnd int64) (*pkginstance.Metrics, error)
GetMetricsPod provides a mock function with given fields: ctx, metric, namespace, pod, timeStart, timeEnd
func (*MockInstance) GetName ¶
func (_m *MockInstance) GetName() string
GetName provides a mock function with given fields:
func (*MockInstance) GetNamespaces ¶
func (_m *MockInstance) GetNamespaces(ctx context.Context, timeStart int64, timeEnd int64) ([]string, error)
GetNamespaces provides a mock function with given fields: ctx, timeStart, timeEnd
func (*MockInstance) GetTopology ¶
func (_m *MockInstance) GetTopology(ctx context.Context, namespace string, application string, timeStart int64, timeEnd int64) ([]Edge, []Node, error)
GetTopology provides a mock function with given fields: ctx, namespace, application, timeStart, timeEnd
func (*MockInstance) Tap ¶
func (_m *MockInstance) Tap(ctx context.Context, namespace string, application string, filterUpstreamCluster string, filterMethod string, filterPath string, timeStart int64, timeEnd int64) ([]map[string]interface{}, error)
Tap provides a mock function with given fields: ctx, namespace, application, filterUpstreamCluster, filterMethod, filterPath, timeStart, timeEnd
func (*MockInstance) Top ¶
func (_m *MockInstance) Top(ctx context.Context, namespace string, application string, filterUpstreamCluster string, filterMethod string, filterPath string, sortBy string, sortDirection string, timeStart int64, timeEnd int64) ([][]interface{}, error)
Top provides a mock function with given fields: ctx, namespace, application, filterUpstreamCluster, filterMethod, filterPath, sortBy, sortDirection, timeStart, timeEnd
func (*MockInstance) TopDetails ¶
func (_m *MockInstance) TopDetails(ctx context.Context, namespace string, application string, upstreamCluster string, method string, path string, timeStart int64, timeEnd int64) ([][]interface{}, error)
TopDetails provides a mock function with given fields: ctx, namespace, application, upstreamCluster, method, path, timeStart, timeEnd