1 Star 0 Fork 0

exlimit/tegola

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README

AzBlobCache

azblob cache is an abstraction on top of Azure Blob Storage which implements the tegola cache interface. To use it, add the following minimum config to your tegola config file:

[cache]
type="azblob"
container_url="https://your-account.blob.core.windows.net/container-name"
az_account_name="your-account-name"
az_shared_key="your-shared-key

Properties

The azblob config supports the following properties:

  • container_url (string): [Required] the name of the Azure container to use.
  • basepath (string): [Optional] a path prefix added to all cache operations inside of the Azure container. helpful so a bucket does not need to be dedicated to only this cache.
  • az_account_name (string): [Optional] the storage account to use. az_shared_key must be specified with this property. If this is not set, Tegola will attempt an anonymous connection (requires a public blob conatiner) and treat the cache as read only.
  • az_shared_key (string): [Optional] the storage account key to use.
  • max_zoom (int): [Optional] the max zoom the cache should cache to. After this zoom, Set() calls will return before doing work.
  • read_only (bool): [Optional] Tegola will not write cache missed tiles into the cache. This setting is implicitly set to true if no account credentials are given.

Testing

Testing is designed to work against a live Azure blob storage account. To run the azblob cache tests, the following environment variables need to be set:

$ export RUN_AZBLOB_TESTS=yes
$ export AZ_CONTAINER_URL='https://your-account.blob.core.windows.net/container-name'
$ export AZ_ACCOUNT_NAME='your-account'
$ export AZ_SHARED_KEY='your-key'

Caveats

Due to the nature of azblob storage, the first 8 bytes of every cached file is a big-endian binary uint denoting the actual length of the tile.

马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/exlimit/tegola.git
git@gitee.com:exlimit/tegola.git
exlimit
tegola
tegola
v0.10.4

搜索帮助