submitter

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2024 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 Submitter

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

func NewSubmitter

func NewSubmitter(logger *slog.Logger, client gen.MetricsClient) *Submitter

NewSubmitter creates a new submitter object.

func (*Submitter) Await

func (s *Submitter) Await()

Await signals the goroutine running Run that no more metrics will be sent on the channel. Then it waits for that goroutine to submit them (with retries).

func (*Submitter) Chan

func (s *Submitter) Chan() chan<- *gen.Result

Chan returns a channel on which metrics can be provided to the submitter.

func (*Submitter) Run

func (s *Submitter) Run(ctx context.Context) (err error)

Run accepts metrics on the channel and submits them to the client passed to constructor until Await is called.

Jump to

Keyboard shortcuts

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