About
Single interface for objects storage services. Currently supported:
- Selectel
- File system. Used mostly in dev
Features
- Native support for JDK11. Native httpclient and JDK11 features
- Lightweight. Depends only on minimal-json and slf4j-api
- Retry requests
Usage
- Add maven dependency:
<dependency>
<groupId>ru.r2cloud</groupId>
<artifactId>ossClient</artifactId>
<version>2.0</version>
</dependency>
- Instantiate OssClient:
SelectelOssClient client = new SelectelOssClient();
client.authUrl = "https://api.selcdn.ru/auth/v1.0";
client.containerName = "container";
client.retries = 3;
client.retryTimeoutMillis = 10000;
client.timeout = 10000;
client.user = "user";
client.key = "password";
client.start();
- Upload:
client.submit(file, "/v1/subfolder/file.jpg");
Implementation notes
- Not all Openstack swift methods supported