metrics

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitDefaultMetricsPusher

func InitDefaultMetricsPusher(pushgatewayURL, pushgatewayKey, serviceName string, pushInterval time.Duration) (
	worker.Worker, error,
)

func NewMetricsPusherWorker

func NewMetricsPusherWorker(options *worker.Options, pusher Pusher) worker.Worker

Types

type Pusher

type Pusher interface {
	Push(ctx context.Context) error
	Close() error
}

func NewPusher

func NewPusher(pushgatewayURL, jobName string) Pusher

func NewPusherWithCustomClient

func NewPusherWithCustomClient(pushgatewayURL, jobName string, client client.HTTPClient) Pusher

type PusherClient

type PusherClient struct {
	// contains filtered or unexported fields
}

func NewPusherClient

func NewPusherClient(pushURL, key string, errorHandler client.HTTPErrorHandler) *PusherClient

func (*PusherClient) Do

func (c *PusherClient) Do(req *http.Request) (*http.Response, error)

Jump to

Keyboard shortcuts

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