Documentation ¶
Index ¶
- type Code
- type Phase
- type RetrievalEvent
- type RetrievalEventAccepted
- type RetrievalEventConnect
- type RetrievalEventFailure
- func (r RetrievalEventFailure) Code() Code
- func (r RetrievalEventFailure) ErrorMessage() string
- func (r RetrievalEventFailure) PayloadCid() cid.Cid
- func (r RetrievalEventFailure) Phase() Phase
- func (r RetrievalEventFailure) StorageProviderAddr() address.Address
- func (r RetrievalEventFailure) StorageProviderId() peer.ID
- type RetrievalEventFirstByte
- type RetrievalEventProposed
- type RetrievalEventPublisher
- type RetrievalEventQueryAsk
- func (r RetrievalEventQueryAsk) Code() Code
- func (r RetrievalEventQueryAsk) PayloadCid() cid.Cid
- func (r RetrievalEventQueryAsk) Phase() Phase
- func (r RetrievalEventQueryAsk) QueryResponse() retrievalmarket.QueryResponse
- func (r RetrievalEventQueryAsk) StorageProviderAddr() address.Address
- func (r RetrievalEventQueryAsk) StorageProviderId() peer.ID
- type RetrievalEventSuccess
- func (r RetrievalEventSuccess) Code() Code
- func (r RetrievalEventSuccess) Duration() time.Duration
- func (r RetrievalEventSuccess) PayloadCid() cid.Cid
- func (r RetrievalEventSuccess) Phase() Phase
- func (r RetrievalEventSuccess) ReceivedCids() int64
- func (r RetrievalEventSuccess) ReceivedSize() uint64
- func (r RetrievalEventSuccess) StorageProviderAddr() address.Address
- func (r RetrievalEventSuccess) StorageProviderId() peer.ID
- func (r RetrievalEventSuccess) TotalPayment() big.Int
- type RetrievalSubscriber
- type UnsubscribeFn
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RetrievalEvent ¶
type RetrievalEvent interface { // Code returns the type of event this is Code() Code // Phase returns what phase of a retrieval this even occurred on Phase() Phase // PayloadCid returns the CID being requested PayloadCid() cid.Cid // StorageProviderId returns the peer ID of the storage provider if this // retrieval was requested via peer ID StorageProviderId() peer.ID // StorageProviderAddr returns the peer address of the storage provider if // this retrieval was requested via peer address StorageProviderAddr() address.Address }
type RetrievalEventAccepted ¶
type RetrievalEventAccepted struct {
// contains filtered or unexported fields
}
func NewRetrievalEventAccepted ¶
func NewRetrievalEventAccepted(phase Phase, payloadCid cid.Cid, storageProviderId peer.ID, storageProviderAddr address.Address) RetrievalEventAccepted
func (RetrievalEventAccepted) Code ¶
func (r RetrievalEventAccepted) Code() Code
func (RetrievalEventAccepted) PayloadCid ¶
func (r RetrievalEventAccepted) PayloadCid() cid.Cid
func (RetrievalEventAccepted) Phase ¶
func (r RetrievalEventAccepted) Phase() Phase
func (RetrievalEventAccepted) StorageProviderAddr ¶
func (r RetrievalEventAccepted) StorageProviderAddr() address.Address
func (RetrievalEventAccepted) StorageProviderId ¶
func (r RetrievalEventAccepted) StorageProviderId() peer.ID
type RetrievalEventConnect ¶
type RetrievalEventConnect struct {
// contains filtered or unexported fields
}
func NewRetrievalEventConnect ¶
func NewRetrievalEventConnect(phase Phase, payloadCid cid.Cid, storageProviderId peer.ID, storageProviderAddr address.Address) RetrievalEventConnect
func (RetrievalEventConnect) Code ¶
func (r RetrievalEventConnect) Code() Code
func (RetrievalEventConnect) PayloadCid ¶
func (r RetrievalEventConnect) PayloadCid() cid.Cid
func (RetrievalEventConnect) Phase ¶
func (r RetrievalEventConnect) Phase() Phase
func (RetrievalEventConnect) StorageProviderAddr ¶
func (r RetrievalEventConnect) StorageProviderAddr() address.Address
func (RetrievalEventConnect) StorageProviderId ¶
func (r RetrievalEventConnect) StorageProviderId() peer.ID
type RetrievalEventFailure ¶
type RetrievalEventFailure struct {
// contains filtered or unexported fields
}
func NewRetrievalEventFailure ¶
func NewRetrievalEventFailure(phase Phase, payloadCid cid.Cid, storageProviderId peer.ID, storageProviderAddr address.Address, errorMessage string) RetrievalEventFailure
func (RetrievalEventFailure) Code ¶
func (r RetrievalEventFailure) Code() Code
func (RetrievalEventFailure) ErrorMessage ¶
func (r RetrievalEventFailure) ErrorMessage() string
ErrorMessage returns a string form of the error that caused the retrieval failure
func (RetrievalEventFailure) PayloadCid ¶
func (r RetrievalEventFailure) PayloadCid() cid.Cid
func (RetrievalEventFailure) Phase ¶
func (r RetrievalEventFailure) Phase() Phase
func (RetrievalEventFailure) StorageProviderAddr ¶
func (r RetrievalEventFailure) StorageProviderAddr() address.Address
func (RetrievalEventFailure) StorageProviderId ¶
func (r RetrievalEventFailure) StorageProviderId() peer.ID
type RetrievalEventFirstByte ¶
type RetrievalEventFirstByte struct {
// contains filtered or unexported fields
}
func NewRetrievalEventFirstByte ¶
func NewRetrievalEventFirstByte(phase Phase, payloadCid cid.Cid, storageProviderId peer.ID, storageProviderAddr address.Address) RetrievalEventFirstByte
func (RetrievalEventFirstByte) Code ¶
func (r RetrievalEventFirstByte) Code() Code
func (RetrievalEventFirstByte) PayloadCid ¶
func (r RetrievalEventFirstByte) PayloadCid() cid.Cid
func (RetrievalEventFirstByte) Phase ¶
func (r RetrievalEventFirstByte) Phase() Phase
func (RetrievalEventFirstByte) StorageProviderAddr ¶
func (r RetrievalEventFirstByte) StorageProviderAddr() address.Address
func (RetrievalEventFirstByte) StorageProviderId ¶
func (r RetrievalEventFirstByte) StorageProviderId() peer.ID
type RetrievalEventProposed ¶
type RetrievalEventProposed struct {
// contains filtered or unexported fields
}
func NewRetrievalEventProposed ¶
func NewRetrievalEventProposed(phase Phase, payloadCid cid.Cid, storageProviderId peer.ID, storageProviderAddr address.Address) RetrievalEventProposed
func (RetrievalEventProposed) Code ¶
func (r RetrievalEventProposed) Code() Code
func (RetrievalEventProposed) PayloadCid ¶
func (r RetrievalEventProposed) PayloadCid() cid.Cid
func (RetrievalEventProposed) Phase ¶
func (r RetrievalEventProposed) Phase() Phase
func (RetrievalEventProposed) StorageProviderAddr ¶
func (r RetrievalEventProposed) StorageProviderAddr() address.Address
func (RetrievalEventProposed) StorageProviderId ¶
func (r RetrievalEventProposed) StorageProviderId() peer.ID
type RetrievalEventPublisher ¶
type RetrievalEventPublisher struct {
// contains filtered or unexported fields
}
func NewEventPublisher ¶
func NewEventPublisher(ctx context.Context) *RetrievalEventPublisher
func (*RetrievalEventPublisher) Publish ¶
func (ep *RetrievalEventPublisher) Publish(event RetrievalEvent)
func (*RetrievalEventPublisher) Subscribe ¶
func (ep *RetrievalEventPublisher) Subscribe(subscriber RetrievalSubscriber) UnsubscribeFn
func (*RetrievalEventPublisher) SubscriberCount ¶
func (ep *RetrievalEventPublisher) SubscriberCount() int
Returns the number of retrieval event subscribers
type RetrievalEventQueryAsk ¶
type RetrievalEventQueryAsk struct {
// contains filtered or unexported fields
}
func NewRetrievalEventQueryAsk ¶
func NewRetrievalEventQueryAsk(phase Phase, payloadCid cid.Cid, storageProviderId peer.ID, storageProviderAddr address.Address, queryResponse retrievalmarket.QueryResponse) RetrievalEventQueryAsk
func (RetrievalEventQueryAsk) Code ¶
func (r RetrievalEventQueryAsk) Code() Code
func (RetrievalEventQueryAsk) PayloadCid ¶
func (r RetrievalEventQueryAsk) PayloadCid() cid.Cid
func (RetrievalEventQueryAsk) Phase ¶
func (r RetrievalEventQueryAsk) Phase() Phase
func (RetrievalEventQueryAsk) QueryResponse ¶
func (r RetrievalEventQueryAsk) QueryResponse() retrievalmarket.QueryResponse
QueryResponse returns the response from a storage provider to a query-ask
func (RetrievalEventQueryAsk) StorageProviderAddr ¶
func (r RetrievalEventQueryAsk) StorageProviderAddr() address.Address
func (RetrievalEventQueryAsk) StorageProviderId ¶
func (r RetrievalEventQueryAsk) StorageProviderId() peer.ID
type RetrievalEventSuccess ¶
type RetrievalEventSuccess struct {
// contains filtered or unexported fields
}
func (RetrievalEventSuccess) Code ¶
func (r RetrievalEventSuccess) Code() Code
func (RetrievalEventSuccess) Duration ¶
func (r RetrievalEventSuccess) Duration() time.Duration
func (RetrievalEventSuccess) PayloadCid ¶
func (r RetrievalEventSuccess) PayloadCid() cid.Cid
func (RetrievalEventSuccess) Phase ¶
func (r RetrievalEventSuccess) Phase() Phase
func (RetrievalEventSuccess) ReceivedCids ¶
func (r RetrievalEventSuccess) ReceivedCids() int64
ReceivedCids returns the number of (non-unique) CIDs received so far - note that a block can exist in more than one place in the DAG so this may not equal the total number of blocks transferred
func (RetrievalEventSuccess) ReceivedSize ¶
func (r RetrievalEventSuccess) ReceivedSize() uint64
ReceivedSize returns the number of bytes received
func (RetrievalEventSuccess) StorageProviderAddr ¶
func (r RetrievalEventSuccess) StorageProviderAddr() address.Address
func (RetrievalEventSuccess) StorageProviderId ¶
func (r RetrievalEventSuccess) StorageProviderId() peer.ID
func (RetrievalEventSuccess) TotalPayment ¶
func (r RetrievalEventSuccess) TotalPayment() big.Int
type RetrievalSubscriber ¶
type RetrievalSubscriber interface {
OnRetrievalEvent(RetrievalEvent)
}
type UnsubscribeFn ¶
type UnsubscribeFn func()
A return function unsubscribing a subscribed Subscriber via the Subscribe() function
Click to show internal directories.
Click to hide internal directories.