Documentation ¶
Index ¶
- type FinderHandler
- type IngestHandler
- func (h *IngestHandler) DiscoverProvider(data []byte) error
- func (h *IngestHandler) GetProvider(providerID peer.ID) ([]byte, error)
- func (h *IngestHandler) IndexContent(ctx context.Context, data []byte) error
- func (h *IngestHandler) ListProviders() ([]byte, error)
- func (h *IngestHandler) RegisterProvider(ctx context.Context, data []byte) error
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) MakeFindResponse ¶
func (h *FinderHandler) MakeFindResponse(mhashes []multihash.Multihash) (*model.FindResponse, error)
MakeFindResponse reads from indexer core to populate a response from a list of multihashes.
type IngestHandler ¶
type IngestHandler struct {
// contains filtered or unexported fields
}
IngestHandler provides request handling functionality for the ingest server that is common to all protocols
func NewIngestHandler ¶
func NewIngestHandler(indexer indexer.Interface, registry *registry.Registry) *IngestHandler
func (*IngestHandler) DiscoverProvider ¶
func (h *IngestHandler) DiscoverProvider(data []byte) error
func (*IngestHandler) GetProvider ¶
func (h *IngestHandler) GetProvider(providerID peer.ID) ([]byte, error)
func (*IngestHandler) IndexContent ¶
func (h *IngestHandler) IndexContent(ctx context.Context, data []byte) error
IndexContent handles an IngestRequest
Returning error is the same as return v0.NewError(err, http.StatusBadRequest)
func (*IngestHandler) ListProviders ¶
func (h *IngestHandler) ListProviders() ([]byte, error)
func (*IngestHandler) RegisterProvider ¶
func (h *IngestHandler) RegisterProvider(ctx context.Context, data []byte) error
Click to show internal directories.
Click to hide internal directories.