handler

package
v0.0.0-...-403c8b4 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2022 License: Apache-2.0, MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FinderHandler

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

FinderHandler provides request handling functionality for the finder server that is common to all protocols.

func NewFinderHandler

func NewFinderHandler(indexer indexer.Interface, registry *registry.Registry) *FinderHandler

func (*FinderHandler) Find

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

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

func (*FinderHandler) GetProvider

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

func (*FinderHandler) GetStats

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

func (*FinderHandler) ListProviders

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

Jump to

Keyboard shortcuts

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