Skip to content

Commit

Permalink
renamed s3-cache host to endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
arbakker authored and pka committed Jan 11, 2021
1 parent 48c5afa commit c2fb534
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion examples/s3.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ table_name = "ne_110m_admin_0_countries"
[cache.s3]
# run s3 locally and create bucket with (requires MinIO Client (mc) for bucket creation):
# docker run -d --rm -p 9000:9000 -e MINIO_REGION_NAME=my-region -e MINIO_ACCESS_KEY=miniostorage -e MINIO_SECRET_KEY=miniostorage minio/minio server /data && sleep 5 && mc config host add local-docker http://localhost:9000 miniostorage miniostorage && mc mb local-docker/trex
host = "http://localhost:9000"
endpoint = "http://localhost:9000"
bucket = "trex"
access_key = "miniostorage"
secret_key = "miniostorage"
Expand Down
2 changes: 1 addition & 1 deletion t-rex-core/src/cache/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ impl<'a> Config<'a, ApplicationCfg> for Tilecache {
Tilecache::Filecache(fc)
} else if let Some(s3_cache_cfg) = cache.s3.as_ref() {
let s3c = S3Cache::new(
&s3_cache_cfg.host.clone(),
&s3_cache_cfg.endpoint.clone(),
&s3_cache_cfg.bucket.clone(),
&s3_cache_cfg.access_key.clone(),
&s3_cache_cfg.secret_key.clone(),
Expand Down
2 changes: 1 addition & 1 deletion t-rex-core/src/core/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ pub struct CacheFileCfg {

#[derive(Deserialize, Clone, Debug)]
pub struct S3CacheFileCfg {
pub host: String,
pub endpoint: String,
pub bucket: String,
pub access_key: String,
pub secret_key: String,
Expand Down
2 changes: 1 addition & 1 deletion t-rex-core/src/core/config_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ fn test_template() {
[cache.file]
base = "/tmp/mvtcache"
[cache.s3]
host = "s3.delivery.pdok.nl"
endpoint = "https://s3.example.com"
region = "westeurope"
bucket = "bucket"
access_key = "access-key"
Expand Down

0 comments on commit c2fb534

Please sign in to comment.