nuts

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: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	NutsDefaultOptions = NutsStoreOptions{
		TimeFormat:  "2006:01:02",
		CurrentTime: time.Now,
	}
)

Functions

This section is empty.

Types

type NutsStore

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

func New

func New(o *NutsStoreOptions) (*NutsStore, error)

func (*NutsStore) Close

func (n *NutsStore) Close()

func (*NutsStore) DataKeys

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

func (*NutsStore) FindPacketsByAddress

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

func (*NutsStore) GetPackets

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

func (*NutsStore) GetStats

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

func (*NutsStore) IndexKeys

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

func (*NutsStore) IndexPackets

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

func (*NutsStore) StorePackets

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

type NutsStoreOptions

type NutsStoreOptions struct {
	Path        string
	Encoder     index_encoder.Interface
	TimeFormat  string
	CurrentTime func() time.Time
	TTL         time.Duration
}

Jump to

Keyboard shortcuts

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