indexer

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: May 12, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrorInternal = func(err error) string {
		_, fn, fl, ok := runtime.Caller(1)

		if !ok {

		} else {
			log.Printf("ErrorInternal[%s:%d] %v\n", fn, fl, err.Error())
		}

		return "internal server error"
	}
)

Functions

This section is empty.

Types

type ClientHandler

type ClientHandler func(w http.ResponseWriter, r *http.Request) error

type IndexFunc

type IndexFunc func(indexerDB tmdb.Batch, block *tm.Block, blockId *tm.BlockID, evc *mantlemint.EventCollector) error

func CreateIndexer

func CreateIndexer(idf IndexFunc) IndexFunc

type Indexer

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

func NewIndexer

func NewIndexer(dbName, path string) (*Indexer, error)

func (*Indexer) RegisterIndexerService

func (idx *Indexer) RegisterIndexerService(tag string, indexerFunc IndexFunc)

func (*Indexer) RegisterRESTRoute

func (idx *Indexer) RegisterRESTRoute(router *mux.Router, registerer RESTRouteRegisterer)

func (*Indexer) Run

func (idx *Indexer) Run(block *tm.Block, blockId *tm.BlockID, evc *mantlemint.EventCollector) error

type RESTRouteRegisterer

type RESTRouteRegisterer func(router *mux.Router, indexerDB tmdb.DB)

func CreateRESTRoute

func CreateRESTRoute(registerer RESTRouteRegisterer) RESTRouteRegisterer

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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