blackbox

package
v2.1.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2019 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

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 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

Jump to

Keyboard shortcuts

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