Documentation
¶
Index ¶
Constants ¶
View Source
const ( // required ConfigKeyBucketName = "bucket" // optional ConfigKeyBasepath = "basepath" ConfigKeyMaxZoom = "max_zoom" )
View Source
const CacheType = "gcs"
Variables ¶
View Source
var (
ErrMissingBucket = errors.New("cache_gcs: missing required param 'bucket'")
)
Functions ¶
Types ¶
type GCSCache ¶
type GCSCache struct {
// Bucket is the name of the GCS bucket to operate on
BucketName string
// Basepath is a path prefix added to all cache operations inside of the GCS bucket
// helpful so a bucket does not need to be dedicated to only this cache
Basepath string
// MaxZoom determines the max zoom the cache to persist. Beyond this
// zoom, cache Set() calls will be ignored. This is useful if the cache
// should not be leveraged for higher zooms when data changes often.
MaxZoom uint
// client holds a reference to the storage client. it's expected the client
// has an active session and read, write, delete permissions have been checked
Client *storage.Client
// bucket holds a reference to the bucket handle.
Bucket *storage.BucketHandle
}
Click to show internal directories.
Click to hide internal directories.