Documentation ¶
Index ¶
- Constants
- func GenStatSummaryResponse(resName, resType, resNs string, counts *PodCounts) pb.StatSummaryResponse
- func NewExternalClient(controlPlaneNamespace string, kubeAPI *k8s.KubernetesAPI) (pb.ApiClient, error)
- func NewInternalClient(controlPlaneNamespace string, kubeAPIHost string) (pb.ApiClient, error)
- func NewServer(addr string, prometheusClient promApi.Client, tapClient tapPb.TapClient, ...) *http.Server
- type MockApiClient
- func (c *MockApiClient) ListPods(ctx context.Context, in *pb.ListPodsRequest, opts ...grpc.CallOption) (*pb.ListPodsResponse, error)
- func (c *MockApiClient) SelfCheck(ctx context.Context, in *healthcheckPb.SelfCheckRequest, _ ...grpc.CallOption) (*healthcheckPb.SelfCheckResponse, error)
- func (c *MockApiClient) StatSummary(ctx context.Context, in *pb.StatSummaryRequest, opts ...grpc.CallOption) (*pb.StatSummaryResponse, error)
- func (c *MockApiClient) Tap(ctx context.Context, in *pb.TapRequest, opts ...grpc.CallOption) (pb.Api_TapClient, error)
- func (c *MockApiClient) TapByResource(ctx context.Context, in *pb.TapByResourceRequest, opts ...grpc.CallOption) (pb.Api_TapByResourceClient, error)
- func (c *MockApiClient) Version(ctx context.Context, in *pb.Empty, opts ...grpc.CallOption) (*pb.VersionInfo, error)
- type MockApi_TapByResourceClient
- type MockApi_TapClient
- type MockProm
- func (m *MockProm) LabelValues(ctx context.Context, label string) (model.LabelValues, error)
- func (m *MockProm) Query(ctx context.Context, query string, ts time.Time) (model.Value, error)
- func (m *MockProm) QueryRange(ctx context.Context, query string, r v1.Range) (model.Value, error)
- func (m *MockProm) Series(ctx context.Context, matches []string, startTime time.Time, endTime time.Time) ([]model.LabelSet, error)
- type PodCounts
Constants ¶
View Source
const ( K8sClientSubsystemName = "kubernetes" K8sClientCheckDescription = "control plane can talk to Kubernetes" PromClientSubsystemName = "prometheus" PromClientCheckDescription = "control plane can talk to Prometheus" )
Variables ¶
This section is empty.
Functions ¶
func GenStatSummaryResponse ¶
func GenStatSummaryResponse(resName, resType, resNs string, counts *PodCounts) pb.StatSummaryResponse
func NewExternalClient ¶
func NewInternalClient ¶
Types ¶
type MockApiClient ¶
type MockApiClient struct { ErrorToReturn error VersionInfoToReturn *pb.VersionInfo ListPodsResponseToReturn *pb.ListPodsResponse StatSummaryResponseToReturn *pb.StatSummaryResponse SelfCheckResponseToReturn *healthcheckPb.SelfCheckResponse Api_TapClientToReturn pb.Api_TapClient Api_TapByResourceClientToReturn pb.Api_TapByResourceClient }
func (*MockApiClient) ListPods ¶
func (c *MockApiClient) ListPods(ctx context.Context, in *pb.ListPodsRequest, opts ...grpc.CallOption) (*pb.ListPodsResponse, error)
func (*MockApiClient) SelfCheck ¶
func (c *MockApiClient) SelfCheck(ctx context.Context, in *healthcheckPb.SelfCheckRequest, _ ...grpc.CallOption) (*healthcheckPb.SelfCheckResponse, error)
func (*MockApiClient) StatSummary ¶
func (c *MockApiClient) StatSummary(ctx context.Context, in *pb.StatSummaryRequest, opts ...grpc.CallOption) (*pb.StatSummaryResponse, error)
func (*MockApiClient) Tap ¶
func (c *MockApiClient) Tap(ctx context.Context, in *pb.TapRequest, opts ...grpc.CallOption) (pb.Api_TapClient, error)
func (*MockApiClient) TapByResource ¶
func (c *MockApiClient) TapByResource(ctx context.Context, in *pb.TapByResourceRequest, opts ...grpc.CallOption) (pb.Api_TapByResourceClient, error)
func (*MockApiClient) Version ¶
func (c *MockApiClient) Version(ctx context.Context, in *pb.Empty, opts ...grpc.CallOption) (*pb.VersionInfo, error)
type MockApi_TapByResourceClient ¶
type MockApi_TapByResourceClient struct { TapEventsToReturn []pb.TapEvent ErrorsToReturn []error grpc.ClientStream }
type MockApi_TapClient ¶
type MockApi_TapClient struct { TapEventsToReturn []pb.TapEvent ErrorsToReturn []error grpc.ClientStream }
type MockProm ¶
type MockProm struct { Res model.Value QueriesExecuted []string // expose the queries our Mock Prometheus receives, to test query generation // contains filtered or unexported fields }
func (*MockProm) LabelValues ¶
func (*MockProm) QueryRange ¶
Click to show internal directories.
Click to hide internal directories.