rates

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 9, 2024 License: ISC Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	HTTPClient *http.Client
	Log        slog.Logger

	OnionEnable bool
}

type Rates

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

func New

func New(cfg Config) *Rates

func (*Rates) Get

func (r *Rates) Get() (float64, float64)

Get returns the last fetched USD/DCR and USD/BTC prices.

func (*Rates) Run

func (r *Rates) Run(ctx context.Context)

func (*Rates) Set

func (r *Rates) Set(dcrPrice, btcPrice float64)

Set manually sets the USD/DCR and USD/BTC prices.

Jump to

Keyboard shortcuts

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