Skip to content

Latest commit

 

History

History
36 lines (27 loc) · 688 Bytes

README.md

File metadata and controls

36 lines (27 loc) · 688 Bytes

HCP REST backend

Dependency

compile "com.avast.clients.storage:storage-client-hcp_2.13:x.x.x"

Usage

Configuration:

namespace = "files"
tenant = "org"
repository = "hcp-repository-host.com"

Client init, example for monix.eval.Task:

import com.avast.clients.storage.hcp.HcpRestStorageBackend
import com.typesafe.config.Config
import monix.eval.Task
import monix.execution.Scheduler

implicit val scheduler: Scheduler = ???
val config: Config = ???

def initClient: Task[HcpRestStorageBackend[Task]] = {
  HcpRestStorageBackend.fromConfig[Task](config) match {
    case Right(cl) => cl
    case Left(err) => Task.raiseError(err)
  }
}