hooks

package
v0.17.0 Latest Latest
Warning

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

Go to latest
Published: May 16, 2024 License: Apache-2.0, MIT Imports: 4 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ErrPaused

type ErrPaused struct{}

ErrPaused indicates a request should stop processing, but only cause it's paused

func (ErrPaused) Error

func (e ErrPaused) Error() string

type IncomingBlockHooks

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

IncomingBlockHooks is a set of incoming block hooks that can be processed

func NewBlockHooks

func NewBlockHooks() *IncomingBlockHooks

NewBlockHooks returns a new list of incoming request hooks

func (*IncomingBlockHooks) ProcessBlockHooks

func (ibh *IncomingBlockHooks) ProcessBlockHooks(p peer.ID, response graphsync.ResponseData, block graphsync.BlockData) UpdateResult

ProcessBlockHooks runs response hooks against an incoming response

func (*IncomingBlockHooks) Register

func (ibh *IncomingBlockHooks) Register(hook graphsync.OnIncomingBlockHook) graphsync.UnregisterHookFunc

Register registers an extension to process incoming responses

type IncomingResponseHooks

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

IncomingResponseHooks is a set of incoming response hooks that can be processed

func NewResponseHooks

func NewResponseHooks() *IncomingResponseHooks

NewResponseHooks returns a new list of incoming request hooks

func (*IncomingResponseHooks) ProcessResponseHooks

func (irh *IncomingResponseHooks) ProcessResponseHooks(p peer.ID, response graphsync.ResponseData) UpdateResult

ProcessResponseHooks runs response hooks against an incoming response

func (*IncomingResponseHooks) Register

func (irh *IncomingResponseHooks) Register(hook graphsync.OnIncomingResponseHook) graphsync.UnregisterHookFunc

Register registers an extension to process incoming responses

type OutgoingRequestHooks

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

OutgoingRequestHooks is a set of incoming request hooks that can be processed

func NewRequestHooks

func NewRequestHooks() *OutgoingRequestHooks

NewRequestHooks returns a new list of incoming request hooks

func (*OutgoingRequestHooks) ProcessRequestHooks

func (orh *OutgoingRequestHooks) ProcessRequestHooks(p peer.ID, request graphsync.RequestData) RequestResult

ProcessRequestHooks runs request hooks against an outgoing request

func (*OutgoingRequestHooks) Register

func (orh *OutgoingRequestHooks) Register(hook graphsync.OnOutgoingRequestHook) graphsync.UnregisterHookFunc

Register registers an extension to process outgoing requests

type RequestResult

type RequestResult struct {
	PersistenceOption string
	CustomChooser     traversal.LinkTargetNodePrototypeChooser
	MaxLinks          uint64
}

RequestResult is the outcome of running requesthooks

type UpdateResult

type UpdateResult struct {
	Err        error
	Extensions []graphsync.ExtensionData
}

UpdateResult is the outcome of running response hooks

Jump to

Keyboard shortcuts

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