preloader

package
Version: v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2019 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	AccountsCached = prometheus.NewGauge(prometheus.GaugeOpts{
		Namespace: "plutos",
		Subsystem: "preloader",
		Name:      "accounts_cached",
		Help:      "number of accounts in memory at the moment",
	})
)
View Source
var ErrLoading = errors.New("account is fetching from bigchain. retry again")

Functions

This section is empty.

Types

type Preloader

type Preloader struct {
	sync.Mutex

	MaxTransactions int
	// contains filtered or unexported fields
}

Preloader preloads account last transactions when account is used for the first time of after reset

func New

func New(chain pt.Chain, settingsChain pt.SettingsChain, bigchain pt.BigChain) *Preloader

func (*Preloader) Preload

func (p *Preloader) Preload(ctx context.Context, accID pt.AccID) error

func (*Preloader) Reset

func (p *Preloader) Reset(ctx context.Context, accID pt.AccID)

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL