Documentation ¶
Index ¶
- type Blobstore
- func (blobstore *Blobstore) Copy(src, dest string) error
- func (blobstore *Blobstore) Delete(path string) error
- func (blobstore *Blobstore) DeleteDir(prefix string) error
- func (blobstore *Blobstore) Exists(path string) (bool, error)
- func (blobstore *Blobstore) Get(path string) (body io.ReadCloser, err error)
- func (blobstore *Blobstore) GetOrRedirect(path string) (body io.ReadCloser, redirectLocation string, err error)
- func (blobstore *Blobstore) Put(path string, src io.ReadSeeker) error
- func (blobstore *Blobstore) Sign(resource string, method string, expirationTime time.Time) (signedURL string)
- type NetworkErrorRetryingSender
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Blobstore ¶
type Blobstore struct {
// contains filtered or unexported fields
}
func NewBlobstore ¶
func NewBlobstore(config config.AzureBlobstoreConfig, metricsService bitsgo.MetricsService) *Blobstore
func NewBlobstoreWithDetails ¶
func NewBlobstoreWithDetails(config config.AzureBlobstoreConfig, putBlockSize int64, maxListResults uint, metricsService bitsgo.MetricsService) *Blobstore
func (*Blobstore) Get ¶
func (blobstore *Blobstore) Get(path string) (body io.ReadCloser, err error)
func (*Blobstore) GetOrRedirect ¶
type NetworkErrorRetryingSender ¶
type NetworkErrorRetryingSender struct{}
NetworkErrorRetryingSender is a replacement for the storage.DefaultSender. storage.DefaultSender does not retry on network errors which is rarely what we want in a production system.
func (*NetworkErrorRetryingSender) Send ¶
func (sender *NetworkErrorRetryingSender) Send(c *storage.Client, req *http.Request) (*http.Response, error)
Send is mostly emulating storage.DefaultSender.Send, so most code was copied. But we use the backoff library for convenience and retry on errors returned from HTTPClient.Do.
Click to show internal directories.
Click to hide internal directories.