index

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2021 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Elastic is an Index backed by ES instance
	Elastic = "elastic"
	// Local is an Index backed by local FS instance
	Local = "local"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Index

type Index interface {
	IndexResource(resource Resource) error
	IndexResources(resources []Resource) error
}

Index is the interface used to abstract communication with the persistence unit

func NewIndex added in v0.10.0

func NewIndex(driver string, dest string) (Index, error)

NewIndex create a new index using given driver, destination

type Resource added in v0.11.0

type Resource struct {
	URL     string
	Time    time.Time
	Body    string
	Headers map[string]string
}

Resource represent a resource that should be indexed

Jump to

Keyboard shortcuts

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