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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DataInterface

type DataInterface interface {
	StorePackets(context.Context, []*models.Packet) error
	GetPackets(context.Context, []string, *FindQuery) ([]*models.Packet, error)
	DataKeys(context.Context) ([]string, error)
	GetStats() (*Stats, error)
}

type FindQuery

type FindQuery struct {
	From     time.Time
	To       time.Time
	MaxCount int
}

func QueryFromRequest

func QueryFromRequest(r *http.Request) (*FindQuery, error)

type IndexInterface

type IndexInterface interface {
	IndexPackets(context.Context, []*models.Packet) error
	IndexKeys(context.Context) ([]string, error)
	FindPacketsByAddress(context.Context, net.IP) ([]string, error)
	GetStats() (*Stats, error)
}

type Stats

type Stats map[string]string

type StoreInterface

type StoreInterface interface {
	IndexInterface
	DataInterface
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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