Skip to content

qoollo/bob-client-net

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

.NET client library for Bob

NuGet build test

Bob is a distributed BLOB storage: https://github.com/qoollo/bob

Usage example for single node client

using (var client = new BobNodeClient<ulong>("Address = 10.5.5.131:20000; OperationTimeout = 00:02:00"))
{
    client.Open();

    client.Put(1, new byte[] { 1, 2, 3 });
    var result = client.Get(1);

    client.Close();
}

Usage example for cluster

using (var client = new BobClusterBuilder<ulong>()
    .WithAdditionalNode("Address = 10.5.5.131; OperationTimeout = 00:02:00")
    .WithAdditionalNode("Address = 10.5.5.132; OperationTimeout = 00:02:00")
    .WithSequentialNodeSelectionPolicy()
    .Build())
{
    client.Open();

    client.Put(1, new byte[] { 1, 2, 3 });
    var result = client.Get(1);

    client.Close();
}