• This repository has been archived on 13/May/2021
  • Stars
    star
    117
  • Rank 301,828 (Top 6 %)
  • Language
    Go
  • License
    Apache License 2.0
  • Created over 8 years ago
  • Updated almost 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A CLI and Go client for Kafka Schema Registry. This repository is deprecated and no longer maintained.

Schema Registry CLI and client

This repository contains a Command Line Interface (CLI) and a Go client for the REST API of Confluent's Kafka Schema Registry.

Build Status GoDoc Chat

CLI

To install the CLI, assuming a properly setup Go installation, do:

go get -u github.com/landoop/schema-registry/schema-registry-cli

After that, the CLI is found in $GOPATH/bin/schema-registry-cli. Running schema-registry-cli without arguments gives:

A command line interface for the Confluent schema registry

Usage:
  schema-registry-cli [command]

Available Commands:
  add         registers the schema provided through stdin
  compatible  tests compatibility between a schema from stdin and a given subject
  exists      checks if the schema provided through stdin exists for the subject
  get         retrieves a schema specified by id or subject
  get-config  retrieves global or suject specific configuration
  subjects    lists all registered subjects
  versions    lists all available versions

Flags:
  -h, --help         help for schema-registry-cli
  -n, --no-color     dont color output
  -e, --url string   schema registry url, overrides SCHEMA_REGISTRY_URL (default "http://localhost:8081")
  -v, --verbose      be verbose

Use "schema-registry-cli [command] --help" for more information about a command.

The schema registry url can be configured through the SCHEMA_REGISTRY_URL environment variable, and overridden through --url. When none is provided, http://localhost:8081 is used as default.

Client

The client package provides a client to deal with the registry from code. It is used by the CLI internally. Usage looks like:

import "github.com/landoop/schema-registry"

client, _ := schemaregistry.NewClient(schemaregistry.DefaultUrl)
client.Subjects()

Or, to use with a Schema Registry endpoint listening on HTTPS:

import (
    "crypto/tls"
    "crypto/x509"
    "io/ioutil"

    "github.com/landoop/schema-registry"
)

// Create a TLS config to use to connect to Schema Registry. This config will permit TLS connections to an endpoint
// whose TLS cert is signed by the given caFile.
caCert, err := ioutil.ReadFile("/path/to/ca/file")
if err != nil {
    panic(err)
}

caCertPool := x509.NewCertPool()
caCertPool.AppendCertsFromPEM(caCert)

tlsConfig :=  &tls.Config{
    RootCAs:            caCertPool,
    InsecureSkipVerify: true,
}

httpsClientTransport := &http.Transport{
  TLSClientConfig: tlsConfig,
}

httpsClient := &http.Client{
  Transport: httpsClientTransport,
}

// Create the Schema Registry client
client, _ := schemaregistry.NewClient(baseurl, UsingClient(httpsClient))
client.Subjects()

The documentation of the package can be found here: GoDoc

More Repositories

1

fast-data-dev

Kafka Docker for development. Kafka, Zookeeper, Schema Registry, Kafka-Connect, Landoop Tools, 20+ connectors
Shell
2,019
star
2

stream-reactor

A collection of open source Apache 2.0 Kafka Connector maintained by Lenses.io.
Scala
1,005
star
3

kafka-topics-ui

Web Tool for Kafka Topics |
JavaScript
877
star
4

kafka-connect-ui

Web tool for Kafka Connect |
JavaScript
504
star
5

schema-registry-ui

Web tool for Avro Schema Registry |
JavaScript
421
star
6

kafka-cheat-sheet

Curated by Lenses.io
305
star
7

lenses-docker

❤for real-time DataOps - where the application and data fabric blends - Lenses
Shell
154
star
8

kafka-connect-tools

Kafka Connect Tooling
Scala
118
star
9

kafka-connect-query-language

SQL for Kafka Connectors
Java
96
star
10

coyote

Environment, operations and runtime-meta testing tool.
Go
90
star
11

cypress-websocket-testing

Test WebSocket connections with Cypress
TypeScript
83
star
12

tableprinter

Fast and easy-to-use table printer written in Go. Parse and print anywhere go values such as structs, slices, maps or any compatible value type as a table with ease.
Go
77
star
13

kafka-helm-charts

In-deprecation. For Lenses please check lensesio/lenses-helm-charts. Soon Stream Reactor will also get its own Helm repository.
Smarty
70
star
14

secret-provider

Open Source Secret Provider plugin for the Kafka Connect framework
Scala
45
star
15

lenses-go

Lenses.io CLI (command-line interface)
Go
35
star
16

kafka-autocomplete

Bash completion for Kafka command line utilities.
Shell
34
star
17

kafka-connect-kcql-smt

Kafka-Connect SMT (Single Message Transformations) with SQL syntax (Using Apache Calcite for the SQL parsing)
Scala
32
star
18

kafka-connectors-tests

Test suite for Kafka Connect connectors based on Landoop's Coyote and docker.
Dockerfile
32
star
19

fast-avro-write

Writing an Avro file is not as fast as you might want it. This is a library to write considerably faster to an avro file.
Scala
32
star
20

avro-sql

Use SQL to transform your avro schema/records
Scala
28
star
21

kafka-testing

Repository for advanced unit-testing with embedded kafka services
Scala
25
star
22

fast-data-connect-cluster

Create Kafka-Connect clusters with docker . You put the Kafka, we put the Connect.
Shell
25
star
23

json-sql

Scala
22
star
24

kafka-connect-common

Common components used across the datamountaineer kafka connect connectors
Scala
21
star
25

lenses-jdbc

Lenses.io JDBC driver for Apache Kafka
Kotlin
20
star
26

stream-reactor-dockers

Docker images for Stream Reactor
Shell
19
star
27

lenses-python

Python library for Lenses.io / Kafka platform engineers
Python
18
star
28

lenses-helm-charts

Helm Charts for Lenses.io
HTML
18
star
29

hadoop-bash-completion

Bash completion for hadoop. Includes commands, switches and directory/filename completion.
Shell
17
star
30

lenses-topology-example

An example of streaming microservices with Apache Kafka and Data Flow Topology integration with Lenses Ⓡ DataOps Platform. You can see it in action here: https://www.youtube.com/watch?v=V15mrcA1Wxg
Java
15
star
31

datagen

A small project to allow publishing data to Apache Kafka, Apache Pulsar or any other target system
Scala
14
star
32

landoop-avro4s-ui

User interface for avro4s
HTML
14
star
33

redux-lenses-streaming-example

JavaScript
11
star
34

kafka-testkit

TestKit - Embedded Kafka, Zookeeper, Schema Registry
Java
10
star
35

docker-images

Public docker images we use for our infrastructure.
Go
10
star
36

ftp-kafka-converters

Blog on Kafka Connect [ FTP -> KAFKA ]
Scala
9
star
37

kafka-connect-transformers

Scala
8
star
38

ais-avro-mqtt-connect-tutorial

A small tutorial on Avro, MQTT and Kafka using docker and go.
Go
7
star
39

lenses-jdbc-spark

Apache Spark with Kafka via JDBC !!!
Java
6
star
40

kafka-avro-generator

Scala
6
star
41

lenses-ldap-plugin-template

Java
6
star
42

kafka-celonis-ems-connector

Contains the documentation for the Kafka Execution Management System connector.
5
star
43

lenses-serde

Java
5
star
44

bite

The Cobra's bite
Go
5
star
45

lenses-alerts-plugin

Defines interface for pluggable lenses alert services integration, along with some officially supported implementations.
Scala
4
star
46

avro4s-ui

Avro <=> Scala through a web ui => http://landoop.com/labs
Scala
4
star
47

ansible

Sample roles from Landoop DevOps team.
Shell
4
star
48

lenses-cloud-templates

Available templates to deploy Lenses in different cloud providers
Python
3
star
49

avro-kcql

Scala
3
star
50

connect-mock

This is a dummy application that mocks the Kafka Connect API.
Kotlin
3
star
51

kafka-connect-smt

A Lenses.io Kafka Connect Single Message Transform(SMT) collection
Java
3
star
52

kafka-ui-lib

JavaScript
2
star
53

lenses-udf-example

Lenses.io - User Defined Functions for Lenses SQL
Java
2
star
54

lenses-serde-protobuf-example

Java
2
star
55

json-kcql

Provides support for json projections using the sql like syntax of KCQL
Scala
1
star
56

sql-core

Scala
1
star
57

lenses-security-http-sample

A sample project using the HTTP request to handle the authentication
Java
1
star