persistence

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BoltPersistenceLayer

type BoltPersistenceLayer struct {
	Db *bbolt.DB
	// contains filtered or unexported fields
}

func NewBoltPersistenceLayer

func NewBoltPersistenceLayer(config BoltPersistenceLayerConfig) (*BoltPersistenceLayer, error)

func (*BoltPersistenceLayer) LoadFacts

func (persistenceLayer *BoltPersistenceLayer) LoadFacts(ticker sec.Ticker) (*sec.CompanyFacts, error)

func (*BoltPersistenceLayer) SaveFacts

func (persistenceLayer *BoltPersistenceLayer) SaveFacts(ticker sec.Ticker, facts *sec.CompanyFacts) error

type BoltPersistenceLayerConfig added in v0.4.0

type BoltPersistenceLayerConfig struct {
	Path         string
	ExpiresAfter time.Duration
	ReduceSize   bool
}

type PersistedCompanyFacts

type PersistedCompanyFacts struct {
	Timestamp int64
	Facts     sec.CompanyFacts
}

PersistedCompanyFacts A representation of company facts with appended Timestamp

Jump to

Keyboard shortcuts

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