Skip to content

SDK Client Configuration

In this section, we will learn how to integrate FrostFS with your application using the SDK.

Configuring Dependencies

Run the following command to add the SDK to your project:

$ go get git.frostfs.info/TrueCloudLab/frostfs-sdk-go@v1.0.0

To get started, you need to add the SDK dependency to Maven:

<repositories>
    <repository>
        <id>gitea</id>
        <url>https://git.frostfs.info/api/packages/TrueCloudLab/maven</url>
    </repository>
</repositories>
<dependencies>
    <dependency>
        <groupId>info.frostfs.sdk</groupId>
        <artifactId>client</artifactId>
        <version>0.18.0</version>
    </dependency>
</dependencies>
<ItemGroup>
  <Reference Include="FrostFS.SDK.Client">
    <HintPath>..\frostfs-sdk-csharp\src\FrostFS.SDK.Client\bin\Debug\netstandard2.0\FrostFS.SDK.Client.dll</HintPath>
  </Reference>
  <Reference Include="FrostFS.SDK.Protos">
    <HintPath>..\frostfs-sdk-csharp\src\FrostFS.SDK.Client\bin\Debug\netstandard2.0\FrostFS.SDK.Protos.dll</HintPath>
  </Reference>
</ItemGroup>

Client Initialization

1
2
3
4
5
6
ctx := context.Background()
acc, err := util.GetAccount(<your_wallet>, "", "")
die(err)

p, err := util.CreatePool(ctx, acc.PrivateKey(), <your_host>")
die(err)
1
2
ClientSettings clientSettings = new ClientSettings(<your_key>, <your_host>);
FrostFSClient frostFSClient = new FrostFSClient(clientSettings);
1
2
3
4
var clientOptions = Options.Create(new ClientSettings { Key = Key, Host = Host });
Func<string, ChannelBase> grpcChannel = (url) => GrpcChannel.ForAddress(new Uri(url));

var client = FrostFSClient.GetInstance(clientOptions, grpcChannel);