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 BlockSentListeners ¶ added in v0.3.0
type BlockSentListeners struct {
// contains filtered or unexported fields
}
BlockSentListeners is a set of listeners for when requestors cancel
func NewBlockSentListeners ¶ added in v0.3.0
func NewBlockSentListeners() *BlockSentListeners
NewBlockSentListeners returns a new list of listeners for when requestors cancel
func (*BlockSentListeners) NotifyBlockSentListeners ¶ added in v0.3.0
func (bsl *BlockSentListeners) NotifyBlockSentListeners(p peer.ID, request graphsync.RequestData, block graphsync.BlockData)
NotifyBlockSentListeners notifies all listeners that a requestor cancelled a response
func (*BlockSentListeners) Register ¶ added in v0.3.0
func (bsl *BlockSentListeners) Register(listener graphsync.OnBlockSentListener) graphsync.UnregisterHookFunc
Register registers an listener for completed responses
type CompletedResponseListeners ¶
type CompletedResponseListeners struct {
// contains filtered or unexported fields
}
CompletedResponseListeners is a set of listeners for completed responses
func NewCompletedResponseListeners ¶
func NewCompletedResponseListeners() *CompletedResponseListeners
NewCompletedResponseListeners returns a new list of completed response listeners
func (*CompletedResponseListeners) NotifyCompletedListeners ¶
func (crl *CompletedResponseListeners) NotifyCompletedListeners(p peer.ID, request graphsync.RequestData, status graphsync.ResponseStatusCode)
NotifyCompletedListeners runs notifies all completed listeners that a response has completed
func (*CompletedResponseListeners) Register ¶
func (crl *CompletedResponseListeners) Register(listener graphsync.OnResponseCompletedListener) graphsync.UnregisterHookFunc
Register registers an listener for completed responses
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) 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 NetworkErrorListeners ¶ added in v0.3.0
type NetworkErrorListeners struct {
// contains filtered or unexported fields
}
NetworkErrorListeners is a set of listeners for when requestors cancel
func NewNetworkErrorListeners ¶ added in v0.3.0
func NewNetworkErrorListeners() *NetworkErrorListeners
NewNetworkErrorListeners returns a new list of listeners for when requestors cancel
func (*NetworkErrorListeners) NotifyNetworkErrorListeners ¶ added in v0.3.0
func (nel *NetworkErrorListeners) NotifyNetworkErrorListeners(p peer.ID, request graphsync.RequestData, err error)
NotifyNetworkErrorListeners notifies all listeners that a requestor cancelled a response
func (*NetworkErrorListeners) Register ¶ added in v0.3.0
func (nel *NetworkErrorListeners) Register(listener graphsync.OnNetworkErrorListener) graphsync.UnregisterHookFunc
Register registers an listener for completed responses
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 CustomLoader ipld.Loader CustomChooser traversal.LinkTargetNodePrototypeChooser Err error Extensions []graphsync.ExtensionData }
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 RequestorCancelledListeners ¶
type RequestorCancelledListeners struct {
// contains filtered or unexported fields
}
RequestorCancelledListeners is a set of listeners for when requestors cancel
func NewRequestorCancelledListeners ¶
func NewRequestorCancelledListeners() *RequestorCancelledListeners
NewRequestorCancelledListeners returns a new list of listeners for when requestors cancel
func (*RequestorCancelledListeners) NotifyCancelledListeners ¶
func (rcl *RequestorCancelledListeners) NotifyCancelledListeners(p peer.ID, request graphsync.RequestData)
NotifyCancelledListeners notifies all listeners that a requestor cancelled a response
func (*RequestorCancelledListeners) Register ¶
func (rcl *RequestorCancelledListeners) Register(listener graphsync.OnRequestorCancelledListener) graphsync.UnregisterHookFunc
Register registers an listener for completed responses
type UpdateResult ¶
UpdateResult is the result of running update hooks