mock

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Exporter

type Exporter struct {
	ScrapeFunc func() (string, error)
}

func (Exporter) Scrape

func (e Exporter) Scrape() (string, error)

type LagWaiter

type LagWaiter struct {
	WaitFunc func(now, then time.Time, f int, srcId string) (int64, time.Duration)
}

func (LagWaiter) Wait

func (w LagWaiter) Wait(now, then time.Time, f int, srcId string) (int64, time.Duration)

type MetricFactory

type MetricFactory struct {
	MakeFunc func(domain string, args blip.CollectorFactoryArgs) (blip.Collector, error)
}

func (MetricFactory) Make

type MetricsCollector

type MetricsCollector struct {
	PrepareFunc func(ctx context.Context, plan blip.Plan) (func(), error)
	CollectFunc func(ctx context.Context, levelName string) ([]blip.MetricValue, error)
}

func (MetricsCollector) Collect

func (c MetricsCollector) Collect(ctx context.Context, levelName string) ([]blip.MetricValue, error)

func (MetricsCollector) Domain

func (c MetricsCollector) Domain() string

func (MetricsCollector) Help

func (MetricsCollector) Prepare

func (c MetricsCollector) Prepare(ctx context.Context, plan blip.Plan) (func(), error)

type Monitor

type Monitor struct {
	MonitorIdFunc func() string
	DBFunc        func() *sql.DB
}

func (Monitor) DB

func (m Monitor) DB() *sql.DB

func (Monitor) MonitorId

func (m Monitor) MonitorId() string

type RDSClient

type RDSClient struct {
	Out   rds.DescribeDBInstancesOutput
	Error error
}

func (RDSClient) DescribeDBInstances

type RDSClientFactory

type RDSClientFactory struct {
	MakeFunc func(blip.AWS) (blipAWS.RDSClient, error)
}

func (RDSClientFactory) Make

type Sink

type Sink struct {
	SendFunc func(ctx context.Context, m *blip.Metrics) error
}

func (Sink) Name

func (s Sink) Name() string

func (Sink) Send

func (s Sink) Send(ctx context.Context, m *blip.Metrics) error

type Tr added in v1.0.1

type Tr struct {
	TranslateFunc func(domain, metric string) string
}

func (*Tr) Translate added in v1.0.1

func (tr *Tr) Translate(domain, metric string) string

type Transport added in v1.0.1

type Transport struct {
	RoundTripFunc func(*http.Request) (*http.Response, error)
}

A mock of http.Transport.

func (*Transport) RoundTrip added in v1.0.1

func (t *Transport) RoundTrip(req *http.Request) (*http.Response, error)

Jump to

Keyboard shortcuts

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