store

package
v0.0.26 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2024 License: MIT Imports: 5 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package store contains everything storage related for MVDS.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrMessageNotFound = errors.New("message not found")
)

Functions

func NewPersistentMessageStore added in v0.0.26

func NewPersistentMessageStore(db *sql.DB) *persistentMessageStore

Types

type DummyStore

type DummyStore struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func NewDummyStore

func NewDummyStore() *DummyStore

func (*DummyStore) Add

func (ds *DummyStore) Add(message *protobuf.Message) error

func (*DummyStore) Get

func (ds *DummyStore) Get(id state.MessageID) (*protobuf.Message, error)

func (*DummyStore) Has

func (ds *DummyStore) Has(id state.MessageID) (bool, error)

type MessageStore

type MessageStore interface {
	Has(id state.MessageID) (bool, error)
	Get(id state.MessageID) (*protobuf.Message, error)
	Add(message *protobuf.Message) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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