bill

package
v0.0.0-...-cb3ca1d Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2019 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrAlreadyRunning = errors.New("already running")
	ErrMonitorClosed  = errors.New("monitor closed")
)

Errors.

Functions

This section is empty.

Types

type Config

type Config struct {
	CollectPeriod  uint // In milliseconds.
	RequestTLS     bool
	RequestTimeout uint // In milliseconds, must be less than CollectPeriod.
}

Config is a billing monitor configuration.

func NewConfig

func NewConfig() *Config

NewConfig creates a new billing monitor configuration.

type Monitor

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

Monitor is a client billing monitor.

func NewMonitor

func NewMonitor(conf *Config, logger *util.Logger, db *reform.DB,
	pr *proc.Processor, pscAddr string, pw data.PWDGetter) *Monitor

NewMonitor creates a new client billing monitor.

func (*Monitor) Close

func (m *Monitor) Close()

Close causes currently running Run() function to exit.

func (*Monitor) Run

func (m *Monitor) Run() error

Run processes billing for active client channels. This function does not return until an error occurs or Close() is called.

Jump to

Keyboard shortcuts

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