store

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: May 3, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type File

type File struct {
	Dir string
}

File is database implementation which stores data to a file. Real world app would use real database instead, which supports atomic write with some kind of optimistic locking (version-check, compare and swap etc.) to always have data in consistent state.

func (File) LoadTrain

func (d File) LoadTrain(_ context.Context, key string) (*train.Train, error)

func (File) SaveTrain

func (d File) SaveTrain(_ context.Context, key string, t *train.Train) error

Jump to

Keyboard shortcuts

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