position

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 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 Config

type Config struct {
	Filename     string
	SaveInterval time.Duration
}

type JSONFile

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

func NewJSONFile

func NewJSONFile(cfg *Config, logger log.Logger) *JSONFile

func (*JSONFile) Get

func (f *JSONFile) Get(name string) int64

func (*JSONFile) GetAll

func (f *JSONFile) GetAll() map[string]int64

func (*JSONFile) Name

func (f *JSONFile) Name() string

func (*JSONFile) Put

func (f *JSONFile) Put(name string, p int64) error

func (*JSONFile) Remove

func (f *JSONFile) Remove(name string) error

func (*JSONFile) Replace

func (f *JSONFile) Replace(new map[string]int64) error

func (*JSONFile) Stop

func (f *JSONFile) Stop()

type Mem

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

func (*Mem) Get

func (m *Mem) Get(name string) int64

func (*Mem) GetAll

func (m *Mem) GetAll() map[string]int64

func (*Mem) Name

func (m *Mem) Name() string

func (*Mem) Put

func (m *Mem) Put(name string, p int64) error

func (*Mem) Remove

func (m *Mem) Remove(name string) error

func (*Mem) Replace

func (m *Mem) Replace(new map[string]int64) error

func (*Mem) Stop

func (m *Mem) Stop()

type Position

type Position interface {
	Name() string
	GetAll() map[string]int64
	Get(name string) int64
	Put(name string, p int64) error
	Replace(new map[string]int64) error
	Remove(name string) error
	Stop()
}

Jump to

Keyboard shortcuts

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