storage

package
v0.0.0-...-8fe63c4 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2019 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BasicInMemoryDB

type BasicInMemoryDB struct {
	DB map[string]data.Request
}

BasicInMemoryDB just records the information decision: map is not goroutine safe We never read on webclients We have a single goroutine handling the saves More goroutines, sync.Map? Shard? Log and Clean Duplicates? we care about last write wins, is write safe?

func (BasicInMemoryDB) Save

func (s BasicInMemoryDB) Save(key string, req *data.Request) (ok bool)

Save returns if it was able to save or though it was an existing entry Sync

type Storage

type Storage interface {
	Save(key string, req *data.Request) (ok bool)
}

Storage interface for database, in memory, etc etc Sync Save decision from implementation

Jump to

Keyboard shortcuts

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