Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CacheItemReader ¶
type CacheItemReader struct {
// contains filtered or unexported fields
}
func (*CacheItemReader) Close ¶
func (r *CacheItemReader) Close() error
func (*CacheItemReader) Filename ¶
func (r *CacheItemReader) Filename() string
type StorageCache ¶
type StorageCache struct {
// contains filtered or unexported fields
}
StorageCache caches blob store files on the local disk so that clients can seek inside them. It would be possible to build this functionality without a cache, but then I couldn't just use http.ServeContent, and would instead need to implement all of the range request headers, etc. See this issue for a discussion and example code that gets around this: https://github.com/googleapis/google-cloud-go/issues/1124 The above solution is not ideal, because every Read() needs to re-open the blob. As far as I know, http.ServeContent is going to read in chunks of like 4k, so that would be terribly inefficient for 16MB file.
func NewStorageCache ¶
func (*StorageCache) Open ¶
func (s *StorageCache) Open(filename string) (*CacheItemReader, error)
Click to show internal directories.
Click to hide internal directories.