Documentation ¶
Index ¶
- Constants
- func BuildGrpcEgressClient(grpcAddr string, opts ...grpc.DialOption) *logcache_client.Client
- func BuildHttpEgressClient(httpAddr, uaaAddr, uaaClientId, uaaClientSecret string, skipTLSVerify bool) *logcache_client.Client
- func EmitMeasuredMetrics(sourceId string, ...)
- func MagicMetricNames() []string
- func NewGrpcEgressClientBuilder(grpcAddr string, opts ...grpc.DialOption) func() QueryableClient
- func NewHttpEgressClientBuilder(httpAddr, uaaAddr, uaaClientId, uaaClientSecret string, skipTLSVerify bool) func() QueryableClient
- func NewIngressClientBuilder(grpcAddr string, opts ...grpc.DialOption) func() (logcache_v1.IngressClient, func() error)
- func StartEmittingTestMetrics(sourceId string, emissionInterval time.Duration, ...)
- type QueryableClient
- type ReliabilityCalculator
Constants ¶
View Source
const (
MAGIC_METRIC_NAME = "blackbox_test_metric"
)
Variables ¶
This section is empty.
Functions ¶
func BuildGrpcEgressClient ¶
func BuildGrpcEgressClient(grpcAddr string, opts ...grpc.DialOption) *logcache_client.Client
func BuildHttpEgressClient ¶
func BuildHttpEgressClient(httpAddr, uaaAddr, uaaClientId, uaaClientSecret string, skipTLSVerify bool) *logcache_client.Client
func EmitMeasuredMetrics ¶
func EmitMeasuredMetrics(sourceId string, ingressClientBuilder func() (logcache_v1.IngressClient, func() error), metrics map[string]float64)
func MagicMetricNames ¶
func MagicMetricNames() []string
func NewGrpcEgressClientBuilder ¶
func NewGrpcEgressClientBuilder(grpcAddr string, opts ...grpc.DialOption) func() QueryableClient
func NewHttpEgressClientBuilder ¶
func NewHttpEgressClientBuilder(httpAddr, uaaAddr, uaaClientId, uaaClientSecret string, skipTLSVerify bool) func() QueryableClient
func NewIngressClientBuilder ¶
func NewIngressClientBuilder(grpcAddr string, opts ...grpc.DialOption) func() (logcache_v1.IngressClient, func() error)
func StartEmittingTestMetrics ¶
func StartEmittingTestMetrics(sourceId string, emissionInterval time.Duration, newIngressClient func() (logcache_v1.IngressClient, func() error))
Types ¶
type QueryableClient ¶
type QueryableClient interface {
PromQL(context.Context, string, ...logcache_client.PromQLOption) (*logcache_v1.PromQL_InstantQueryResult, error)
}
type ReliabilityCalculator ¶
type ReliabilityCalculator struct { SampleInterval time.Duration WindowInterval time.Duration WindowLag time.Duration EmissionInterval time.Duration SourceId string InfoLogger *log.Logger ErrorLogger *log.Logger }
func (ReliabilityCalculator) Calculate ¶
func (rc ReliabilityCalculator) Calculate(clientBuilder func() QueryableClient) (float64, error)
func (ReliabilityCalculator) CountMetricPoints ¶
func (rc ReliabilityCalculator) CountMetricPoints(metricName string, client QueryableClient) (uint64, error)
func (ReliabilityCalculator) ExpectedSamples ¶
func (rc ReliabilityCalculator) ExpectedSamples() float64
Click to show internal directories.
Click to hide internal directories.