Skip to content

dernasherbrezon/ossClient

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

57 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

About Build Status Quality Gate Status

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

  1. Add maven dependency:
<dependency>
	<groupId>ru.r2cloud</groupId>
	<artifactId>ossClient</artifactId>
	<version>2.0</version>
</dependency>
  1. 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();
  1. Upload:
client.submit(file, "/v1/subfolder/file.jpg");

Implementation notes

  • Not all Openstack swift methods supported