tally

package
v0.28.0 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2024 License: Apache-2.0 Imports: 20 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Connector

type Connector interface {
	QueueSubscribe(ctx context.Context, name string, subject string, group string, output chan inter.ConnectorMessage) error
	Nats() *nats.Conn
}

Connector is a connection to the middleware

type Option

type Option func(*options)

Option configures Options

func Component

func Component(c string) Option

Component sets the component to tally

func Connection

func Connection(c Connector) Option

Connection is the middleware to receive events on

func Debug

func Debug() Option

Debug enable debug logging

func Election added in v0.27.0

func Election(name string) Option

Election enables leader election between tally instances

func Logger

func Logger(l *logrus.Entry) Option

Logger is the logger to use

func StatsPrefix

func StatsPrefix(p string) Option

StatsPrefix is the space to create stat entries in

type Recorder

type Recorder struct {
	sync.Mutex
	// contains filtered or unexported fields
}

Recorder listens for alive events and records the versions and expose the results to Prometheus

func New

func New(opts ...Option) (recorder *Recorder, err error)

New creates a new Recorder

func (*Recorder) Run

func (r *Recorder) Run(ctx context.Context) (err error)

Run starts listening for events and record statistics about it in prometheus

Jump to

Keyboard shortcuts

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