ratewatcher

package
v0.0.0-...-1649e63 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Adapter

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

func NewCronJobAdapter

func NewCronJobAdapter(c Converter, t time.Duration) *Adapter

func (*Adapter) Do

func (a *Adapter) Do() error

type Client

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

func NewClient

func NewClient(nats *nats.Conn, converter RateSource, log *slog.Logger) *Client

func (*Client) Convert

func (c *Client) Convert(ctx context.Context) error

type Converter

type Converter interface {
	Convert(ctx context.Context) error
}

type RateSource

type RateSource interface {
	Convert(ctx context.Context) (float32, error)
}

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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