From 6b30f7c9a223cc1d22974085f6df7aa62393cc55 Mon Sep 17 00:00:00 2001 From: Tom Clegg Date: Thu, 12 Jan 2017 18:03:30 -0500 Subject: [PATCH] 10877: Configurable base URL for Azure storage, e.g., StorageBaseURL: core.usgovcloudapi.net --- services/keepstore/azure_blob_volume.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/services/keepstore/azure_blob_volume.go b/services/keepstore/azure_blob_volume.go index 4839e3f682..a28f8b7f73 100644 --- a/services/keepstore/azure_blob_volume.go +++ b/services/keepstore/azure_blob_volume.go @@ -97,6 +97,7 @@ func init() { type AzureBlobVolume struct { StorageAccountName string StorageAccountKeyFile string + StorageBaseURL string // "" means default, "core.windows.net" ContainerName string AzureReplication int ReadOnly bool @@ -136,7 +137,10 @@ func (v *AzureBlobVolume) Start() error { if err != nil { return err } - v.azClient, err = storage.NewBasicClient(v.StorageAccountName, accountKey) + if v.StorageBaseURL == "" { + v.StorageBaseURL = storage.DefaultBaseURL + } + v.azClient, err = storage.NewClient(v.StorageAccountName, accountKey, v.StorageBaseURL, storage.DefaultAPIVersion, true) if err != nil { return fmt.Errorf("creating Azure storage client: %s", err) } -- 2.30.2