Azure SDK for Go – 为什么会有多个 KeyVault 和 Blob 存储客户端?

huangapple go评论100阅读模式
英文:

Azure SDK for Go - why are there multiple KeyVault and blob storage clients?

问题

在Azure SDK for Go中,有两种KeyVault客户端的实现:

https://github.com/Azure/azure-sdk-for-go/tree/main/sdk/keyvault/azsecrets

https://github.com/Azure/azure-sdk-for-go/tree/main/services/keyvault/v7.1/keyvault.

我该如何在它们之间做出选择?

同样地,对于Blob存储,有多个客户端可供选择:

https://github.com/Azure/azure-sdk-for-go/tree/main/services/storage/datalake

https://github.com/Azure/azure-sdk-for-go/tree/main/services/datalake

https://github.com/Azure/azure-sdk-for-go/tree/main/sdk/storage/azblob

同样地,我该如何在这些选项之间做出选择?

这些实现之间有什么区别?

英文:

In Azure SDK for Go, there are two implementations of KeyVault client,

https://github.com/Azure/azure-sdk-for-go/tree/main/sdk/keyvault/azsecrets

and
https://github.com/Azure/azure-sdk-for-go/tree/main/services/keyvault/v7.1/keyvault.

How do I decide between these ?

Similarly, for blob storage, there are multiple clients,

https://github.com/Azure/azure-sdk-for-go/tree/main/services/storage/datalake

https://github.com/Azure/azure-sdk-for-go/tree/main/services/datalake

https://github.com/Azure/azure-sdk-for-go/tree/main/sdk/storage/azblob,

again, how do I decide among these options ?

What are the differences among these implementations ?

答案1

得分: 2

不同之处在于目的。有一些包用于管理资源,有一些包用于与资源进行交互。

例如,Azure Blob 的管理库允许您创建和管理存储账户(管理平面)。客户端库允许您下载和上传 Blob(数据平面)。

请参阅文档

英文:

The different lies in the purpose. There are packages to manage resources and there are packages to interact with the resources.

For example, the management library for azure blob allows you to create and manage storage accounts (management plane). The client library allows you to download and upload blobs (data plane)

See also the docs

答案2

得分: -1

在Azure SDK for Go中,有两个KeyVault客户端的实现,分别是https://github.com/Azure/azure-sdk-for-go/tree/main/sdk/keyvault和https://github.com/Azure/azure-sdk-for-go/tree/main/services/keyvault。

你不需要选择其中之一,因为它们都不是你可以使用的Go包。

最好阅读Go文档而不是源代码库,可以从这里开始:https://pkg.go.dev/github.com/Azure/azure-sdk-for-go

关于你提供的链接之间的实际区别,请参考Peter Bons的回答。

英文:

> In Azure SDK for Go, there are two implementations of KeyVault client,
> https://github.com/Azure/azure-sdk-for-go/tree/main/sdk/keyvault
> and
> https://github.com/Azure/azure-sdk-for-go/tree/main/services/keyvault.
>
> How do I decide between these ?

You do not have to as neither of them is a Go package you could use Azure SDK for Go – 为什么会有多个 KeyVault 和 Blob 存储客户端?

Its best to read the Go documentation and not the source repo, start here: https://pkg.go.dev/github.com/Azure/azure-sdk-for-go

(For the actual difference between the links you gave: see Peter Bons' answer.)

huangapple
  • 本文由 发表于 2022年4月21日 18:57:02
  • 转载请务必保留本文链接:https://go.coder-hub.com/71953295.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定