Documentation ¶
Index ¶
- Constants
- Variables
- func NewCRC32UpdatingReader(r io.Reader, currentCRC *uint32) io.Reader
- func NewResumableHttpClient(ctx context.Context, opts ...option.ClientOption) (*http.Client, error)
- func NewSemAcquiringReader(r io.Reader, ctx context.Context) io.Reader
- type BackOff
- type CRC32UpdatingReader
- type CopyHandler
- type SemAcquiringReader
Constants ¶
View Source
const (
MTIME_ATTR_NAME = "goog-reserved-file-mtime"
)
Variables ¶
View Source
var (
CRC32CTable = crc32.MakeTable(crc32.Castagnoli)
)
Functions ¶
func NewCRC32UpdatingReader ¶
NewCRC32UpdatingReader returns a CRC32UpdatingReader. 'currentCRC' is the starting crc32 value for the reader, and will be updated as bytes are read.
func NewResumableHttpClient ¶
NewResumableHttpClient creates a new http.Client suitable for resumable copies.
Types ¶
type BackOff ¶
type BackOff struct {
// contains filtered or unexported fields
}
Backoff provides a back-off scheme for retrying events.
type CRC32UpdatingReader ¶
type CRC32UpdatingReader struct {
// contains filtered or unexported fields
}
CRC32UpdatingReader is an io.Reader that wraps another io.Reader and a starting crc32c. This reader updates the crc32c as bytes are read.
type CopyHandler ¶
type CopyHandler struct {
// contains filtered or unexported fields
}
CopyHandler is responsible for handling copy tasks.
func NewCopyHandler ¶
NewCopyHandler creates a CopyHandler with storage.Client and http.Client.
func (*CopyHandler) Do ¶
func (h *CopyHandler) Do(ctx context.Context, taskReqMsg *taskpb.TaskReqMsg, reqStart time.Time) *taskpb.TaskRespMsg
type SemAcquiringReader ¶
type SemAcquiringReader struct {
// contains filtered or unexported fields
}
SemAcquiringReader is an io.Reader that wraps another io.Reader and limits the number of concurrent Read calls globally.
Click to show internal directories.
Click to hide internal directories.