Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BlockResult ¶
type BlockResult struct { Err error Extensions []graphsync.ExtensionData }
BlockResult is the result of processing block hooks
type ErrPaused ¶
type ErrPaused struct{}
ErrPaused indicates a request should stop processing, but only cause it's paused
type IncomingRequestHooks ¶
type IncomingRequestHooks struct {
// contains filtered or unexported fields
}
IncomingRequestHooks is a set of incoming request hooks that can be processed
func NewRequestHooks ¶
func NewRequestHooks(persistenceOptions PersistenceOptions) *IncomingRequestHooks
NewRequestHooks returns a new list of incoming request hooks
func (*IncomingRequestHooks) ProcessRequestHooks ¶
func (irh *IncomingRequestHooks) ProcessRequestHooks(p peer.ID, request graphsync.RequestData, reqCtx context.Context) RequestResult
ProcessRequestHooks runs request hooks against an incoming request
func (*IncomingRequestHooks) Register ¶
func (irh *IncomingRequestHooks) Register(hook graphsync.OnIncomingRequestHook) graphsync.UnregisterHookFunc
Register registers an extension to process new incoming requests
type OutgoingBlockHooks ¶
type OutgoingBlockHooks struct {
// contains filtered or unexported fields
}
OutgoingBlockHooks is a set of outgoing block hooks that can be processed
func NewBlockHooks ¶
func NewBlockHooks() *OutgoingBlockHooks
NewBlockHooks returns a new list of outgoing block hooks
func (*OutgoingBlockHooks) ProcessBlockHooks ¶
func (obh *OutgoingBlockHooks) ProcessBlockHooks(p peer.ID, request graphsync.RequestData, blockData graphsync.BlockData) BlockResult
ProcessBlockHooks runs block hooks against a request and block data
func (*OutgoingBlockHooks) Register ¶
func (obh *OutgoingBlockHooks) Register(hook graphsync.OnOutgoingBlockHook) graphsync.UnregisterHookFunc
Register registers an hook to process outgoing blocks in a response
type PersistenceOptions ¶
PersistenceOptions is an interface for getting loaders by name
type RequestResult ¶
type RequestResult struct { IsValidated bool IsPaused bool CustomLinkSystem ipld.LinkSystem CustomChooser traversal.LinkTargetNodePrototypeChooser Err error Extensions []graphsync.ExtensionData Ctx context.Context MaxLinks uint64 }
RequestResult is the outcome of running requesthooks
type RequestUpdatedHooks ¶
type RequestUpdatedHooks struct {
// contains filtered or unexported fields
}
RequestUpdatedHooks manages and runs hooks for request updates
func NewUpdateHooks ¶
func NewUpdateHooks() *RequestUpdatedHooks
NewUpdateHooks returns a new list of request updated hooks
func (*RequestUpdatedHooks) ProcessUpdateHooks ¶
func (ruh *RequestUpdatedHooks) ProcessUpdateHooks(p peer.ID, request graphsync.RequestData, update graphsync.RequestData) UpdateResult
ProcessUpdateHooks runs request hooks against an incoming request
func (*RequestUpdatedHooks) Register ¶
func (ruh *RequestUpdatedHooks) Register(hook graphsync.OnRequestUpdatedHook) graphsync.UnregisterHookFunc
Register registers an hook to process updates to requests
type UpdateResult ¶
UpdateResult is the result of running update hooks