go-spatial / tegola

Tegola is a Mapbox Vector Tile server written in Go
http://tegola.io/
MIT License
1.25k stars 192 forks source link

feat: add Google Cloud Storage cache adapter #891

Closed matheusmatos closed 1 year ago

matheusmatos commented 1 year ago

This PR implements Google Cloud Storage as a new cache type.

To use it, you need to configure cache as the example below:

[cache]
# required
type="gcs"
bucket="your_bucket_name"   # Bucket is the name of the GCS bucket to operate on

# optional
basepath="tegola"           # Basepath is a path prefix added to all cache operations inside of the GCS bucket
max_zoom=8                  # MaxZoom determines the max zoom the cache to persist.

The credentials (service account and project_id) are handled by the GOOGLE_APPLICATION_CREDENTIALS environment variable.

coveralls commented 1 year ago

Pull Request Test Coverage Report for Build b5a95d2ec-PR-891


Totals Coverage Status
Change from base Build 01e9eb9a8: 0.0%
Covered Lines: 5745
Relevant Lines: 12676

💛 - Coveralls
ARolek commented 1 year ago

Merged into master! Thank you for the contribution.

kolisko commented 7 months ago

@matheusmatos Thanks! Is possible to set up TTL for gcs cache in config file?