Class GrpcBlobStorageClient
- Namespace
- IdeaStatiCa.Plugin.Grpc
- Assembly
- IdeaStatiCa.Plugin.dll
Client for gRPC blob storage communication
public class GrpcBlobStorageClient : IDisposable, IGrpcBlobStorageClient
Inheritance
Implements
Inherited Members
Constructors
GrpcBlobStorageClient(IPluginLogger, int, string, int, int)
Creates gRPC blob storage client
public GrpcBlobStorageClient(IPluginLogger logger, int port, string host = "localhost", int chunkSize = 65536, int maxDataLength = 104857600)
Parameters
logger
IPluginLogger-
Logger
port
int-
Port
host
string-
Host
chunkSize
int-
Size of chunk in bytes
maxDataLength
int-
Maximum message length in bytes for channel
Methods
DeleteAsync(string, string)
Asynchronously calls Delete on specified blob storage for the content id
public Task DeleteAsync(string blobStorageId, string contentId)
Parameters
Returns
Dispose()
Shuts down communication channel with gRPC server
public void Dispose()
ExistAsync(string, string)
Asynchronously calls Exists on specified blob storage for the content id
public Task<bool> ExistAsync(string blobStorageId, string contentId)
Parameters
Returns
GetEntriesAsync(string)
Asynchronously calls GetEntries on specified blob storage
public Task<List<string>> GetEntriesAsync(string blobStorageId)
Parameters
blobStorageId
string-
Blob storage id
Returns
ReadAsync(string, string)
Asynchronously reads data with content id from the specified blob storage
public Task<Stream> ReadAsync(string blobStorageId, string contentId)
Parameters
Returns
WriteAsync(string, string, Stream)
Asynchronously writes data with content id to the specified blob storage
public Task WriteAsync(string blobStorageId, string contentId, Stream content)
Parameters
blobStorageId
string-
Blob storage id
contentId
string-
Id of the data in blob storage
content
Stream-
Source data