Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BundleOutcome ¶
type BundleOutcome struct { Outcome Outcome ChunkOffset uint64 Chunks uint64 // Bundle carries a deferred bundle which the client is not ready to process yet Bundle *fetchGroup }
BundleOutcome is used to track successful decryption and handling of bundles. It is ok to fail to send a failed outcome if the context is cancelled; it is not ok to fail to sent an Ok outcome - read ahead and completion tracking is based around successful outcome notifications.
type Client ¶
type Client interface { GetObject(ctx context.Context, name string, output chan *OutputChunk) Close(ctx context.Context) error }
Client provides a simple interface to retrieve files from the network.
type DownloadResult ¶
type DownloadResult struct {
// contains filtered or unexported fields
}
type Outcome ¶
type Outcome int
Outcome is used to signal what the outcome of the client handling of a bundle was.
const ( // Completed indicates the bundle has been handled by the client Completed Outcome = iota // Deferred indicates the bundle cannot be handled yet (e.g. the client has requested a retry // and is waiting for the retried bundle to arrive) Deferred // Retry indicates that the bundle was corrupt in some fashion and should be retried (this covers // all manner of faults - bad cache connections, bad data from a cache, bad // tickets etc). Retry )
type OutputChunk ¶
OutputChunk contains either some ready to use bytes or an error.
Click to show internal directories.
Click to hide internal directories.