Minio implementation of Orleans Grain Storage Provider
Minio is a open source cloud storage.
Install Orleans.Persistence.Minio
NuGet package in the project containing your SiloHost
definition with the following command line:
PM> Install-Package Orleans.Persistence.Minio
Import the extensions:
using Orleans.Persistence.Minio
Register the Orleans.Persistence.Minio
grain storage on the ISiloHostBuilder
:
ISiloHostBuilder builder = new SiloHostBuilder()
.AddMinioGrainStorage("minio", options =>
{
options.AccessKey = "minio_access_key";
options.SecretKey = "minio_secret_key";
options.Endpoint = "localhost:9000";
options.Container = "grain-storage";
}
);
The MinioGrainStorageOptions
is used to specify the following:
AccessKey
: Minio access keySecretKey
: Minio secret keyEndpoint
: Minio endpointContainer
: The container under which the grain storage will be stored
Then use the storage on grains:
[StorageProvider(ProviderName = "minio")]
public class MySuperGrain : Grain<MySuperGrainState>, IMySuperGrain
{ ... }
MIT