handler

package
v0.6.8 Latest Latest
Warning

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

Go to latest
Published: May 12, 2023 License: Apache-2.0, MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FindHandler

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

FindHandler provides request handling functionality for the find server that is common to all protocols.

func NewFindHandler

func NewFindHandler(indexer indexer.Interface, registry *registry.Registry, indexCounts *counter.IndexCounts) *FindHandler

func (*FindHandler) Close

func (h *FindHandler) Close()

func (*FindHandler) Find

func (h *FindHandler) Find(mhashes []multihash.Multihash) (*model.FindResponse, error)

Find reads from indexer core to populate a response from a list of multihashes.

func (*FindHandler) GetProvider

func (h *FindHandler) GetProvider(providerID peer.ID) ([]byte, error)

func (*FindHandler) GetStats

func (h *FindHandler) GetStats() ([]byte, error)

func (*FindHandler) ListProviders

func (h *FindHandler) ListProviders() ([]byte, error)

func (*FindHandler) RefreshStats

func (h *FindHandler) RefreshStats()

Jump to

Keyboard shortcuts

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