memory

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2022 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Memory

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

func New

func New(ttl time.Duration) *Memory

New returns a new instance of Memory. The ttl argument specifies how long the message should be kept in storage.

func (*Memory) Add

func (m *Memory) Add(msg *messages.Event) error

Add implements the store.Storage interface.

func (*Memory) Get

func (m *Memory) Get(typ string, idx []byte) ([]*messages.Event, error)

Get implements the store.Storage interface.

Jump to

Keyboard shortcuts

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