Git Product home page Git Product logo

ciris-aiven-kafka's Introduction

Ciris Aiven Kafka

Aiven Kafka support for Ciris.

Getting Started

To get started with sbt, simply add the following lines to your build.sbt file.

resolvers += "Artifactory" at "https://kaluza.jfrog.io/artifactory/maven/"

libraryDependencies += "com.ovoenergy" %% "ciris-aiven-kafka" % "3.0.0"

The library is published for Scala 3.2.x, 2.13.x, and 2.12.x.

Usage

import ciris.aiven.kafka._ and use aivenKafkaSetup to set up the key and trust stores. Supplied credential strings are expected to be in PKCS 12 format.

import cats.effect.{ExitCode, IO, IOApp}
import cats.implicits._
import ciris._
import ciris.aiven.kafka._

object Main extends IOApp {
  def run(args: List[String]): IO[ExitCode] =
      aivenKafkaSetup(
        clientPrivateKey = env("CLIENT_PRIVATE_KEY"),
        clientCertificate = env("CLIENT_CERTIFICATE"),
        serviceCertificate = env("SERVICE_CERTIFICATE")
      ).load[IO]
    .as(ExitCode.Success)
}

If the configuration loading was successful, aivenKafkaSetup will return an AivenKafkaSetup with the key and trust store locations, and their passwords. Temporary files and passwords are used and the files are set to be deleted automatically on exit. The key store is of type PKCS12 and the trust store is of type JKS.

AivenKafkaSetup provides properties: Map[String, String] with suitable consumer properties.

ciris-aiven-kafka's People

Contributors

jensraaby avatar keirlawson avatar lucaviolanti avatar scala-steward avatar vlovgr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ciris-aiven-kafka's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.