badger_store

package
v1.7.7 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2021 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultOptions = Options{
		CachedIndexKeysInterval: 15 * time.Minute,
	}
)

Functions

This section is empty.

Types

type BadgerStore

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

func New

func New(o *Options) (*BadgerStore, error)

func (*BadgerStore) Close

func (b *BadgerStore) Close()

func (*BadgerStore) DataKeys

func (n *BadgerStore) DataKeys(ctx context.Context) (ret []string, err error)

func (*BadgerStore) FindPacketsByAddress

func (n *BadgerStore) FindPacketsByAddress(ctx context.Context, ip net.IP) (ret []string, err error)

func (*BadgerStore) GetPackets

func (n *BadgerStore) GetPackets(ctx context.Context, ids []string, q *store.FindQuery) (pkts []*models.Packet, err error)

func (*BadgerStore) GetStats

func (b *BadgerStore) GetStats() (*store.Stats, error)

func (*BadgerStore) IndexKeys

func (n *BadgerStore) IndexKeys(ctx context.Context) (ret []string, err error)

func (*BadgerStore) IndexPackets

func (n *BadgerStore) IndexPackets(ctx context.Context, pkts []*models.Packet) (err error)

type Options

type Options struct {
	Path                    string
	Encoder                 index_encoder.Interface
	CachedIndexKeysInterval time.Duration
	TTL                     time.Duration
}

Jump to

Keyboard shortcuts

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