mem

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2020 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 CappedTree

type CappedTree struct {
	*treemap.Map
	// contains filtered or unexported fields
}

func NewCappedTree

func NewCappedTree(cap int, r Remover) *CappedTree

func (*CappedTree) Each

func (t *CappedTree) Each(fn func(key, val float64))

func (*CappedTree) Put

func (t *CappedTree) Put(key, value float64)

type Remover

type Remover int
const (
	RemoveMax Remover = iota
	RemoveMin
)

type Store

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

func New

func New() *Store

func (*Store) OnSnapshot

func (s *Store) OnSnapshot(name string, update *obm.Update) error

func (*Store) OnUpdate

func (s *Store) OnUpdate(name string, update *obm.Update) error

func (*Store) OrderBook

func (s *Store) OrderBook(exchange, symbol string) (*types.OrderBookResponse, error)

Jump to

Keyboard shortcuts

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