|
|
@ -212,7 +212,7 @@ func (g *Azure) NewGatewayLayer(creds auth.Credentials) (minio.ObjectLayer, erro |
|
|
|
client := azblob.NewServiceURL(*endpointURL, pipeline) |
|
|
|
client := azblob.NewServiceURL(*endpointURL, pipeline) |
|
|
|
|
|
|
|
|
|
|
|
return &azureObjects{ |
|
|
|
return &azureObjects{ |
|
|
|
endpoint: endpointURL.String(), |
|
|
|
endpoint: endpointURL, |
|
|
|
httpClient: httpClient, |
|
|
|
httpClient: httpClient, |
|
|
|
client: client, |
|
|
|
client: client, |
|
|
|
metrics: metrics, |
|
|
|
metrics: metrics, |
|
|
@ -424,7 +424,7 @@ func azurePropertiesToS3Meta(meta azblob.Metadata, props azblob.BlobHTTPHeaders, |
|
|
|
// azureObjects - Implements Object layer for Azure blob storage.
|
|
|
|
// azureObjects - Implements Object layer for Azure blob storage.
|
|
|
|
type azureObjects struct { |
|
|
|
type azureObjects struct { |
|
|
|
minio.GatewayUnsupported |
|
|
|
minio.GatewayUnsupported |
|
|
|
endpoint string |
|
|
|
endpoint *url.URL |
|
|
|
httpClient *http.Client |
|
|
|
httpClient *http.Client |
|
|
|
metrics *minio.Metrics |
|
|
|
metrics *minio.Metrics |
|
|
|
client azblob.ServiceURL // Azure sdk client
|
|
|
|
client azblob.ServiceURL // Azure sdk client
|
|
|
@ -553,7 +553,11 @@ func (a *azureObjects) Shutdown(ctx context.Context) error { |
|
|
|
// StorageInfo - Not relevant to Azure backend.
|
|
|
|
// StorageInfo - Not relevant to Azure backend.
|
|
|
|
func (a *azureObjects) StorageInfo(ctx context.Context, _ bool) (si minio.StorageInfo, _ []error) { |
|
|
|
func (a *azureObjects) StorageInfo(ctx context.Context, _ bool) (si minio.StorageInfo, _ []error) { |
|
|
|
si.Backend.Type = minio.BackendGateway |
|
|
|
si.Backend.Type = minio.BackendGateway |
|
|
|
si.Backend.GatewayOnline = minio.IsBackendOnline(ctx, a.httpClient, a.endpoint) |
|
|
|
host := a.endpoint.Host |
|
|
|
|
|
|
|
if a.endpoint.Port() == "" { |
|
|
|
|
|
|
|
host = a.endpoint.Host + ":" + a.endpoint.Scheme |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
si.Backend.GatewayOnline = minio.IsBackendOnline(ctx, host) |
|
|
|
return si, nil |
|
|
|
return si, nil |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|