storage

package
v0.0.0-...-0140430 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TIME_LAYOUT = "2006-01-02T15:04:05.999999999"
)

Variables

This section is empty.

Functions

func NewStorage

func NewStorage(outDir, fileName string) (*storage, error)

Types

type Execution

type Execution struct {
	ID       int
	Side     string
	Price    float64
	Size     float64
	ExecDate time.Time
}

type MergeWriter

type MergeWriter struct{}

func NewMergeWriter

func NewMergeWriter() *MergeWriter

func (*MergeWriter) Start

func (w *MergeWriter) Start(ctx context.Context, ch chan *Execution, outputFilePath string) error

type Storage

type Storage interface {
	Standby(ctx context.Context)
	Append(executions []*Execution) error
	GetOldestExecution() *Execution
	Reverse() error
}

Jump to

Keyboard shortcuts

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