Categorygithub.com/arbor/go-kafkaesque
modulepackage
0.0.0-20190724071259-e3786f5baa68
Repository: https://github.com/arbor/go-kafkaesque.git
Documentation: pkg.go.dev

# README

go-kafakesque

Go Documentation Build status

A Go binding for Kafka Admin Service Since I couldn't manage to find one, hence, write a new one. One of the intention of having this package is to allow me to easily write a Terraform provider.

Usage:

Import package

go get github.com/arbor/go-kafkaesque

For package dependency management, we use dep:

go get -u github.com/golang/dep/cmd/dep

If new package is required, pls run below command after go get. For more information about dep, please visit this URL https://github.com/golang/dep.

dep ensure

Run test:

make test

To maintain codebase quality with static checks and analysis:

make run

Examples:

package main

import (
	"fmt"

	gokafkaesqueue "github.com/arbor/go-kafkaesque"
)

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

# Functions

NewClient returns Singularity HTTP endpoint.
NewConfig returns an empty ServerConfigBuilder.
NewTopic accepts a string topic name and returns a TopicBuilder interface.

# Structs

AllTopics is a list of topic names.
Client contains Singularity endpoint for http requests.
Config contains a Kafka topic retention config in ms.
Response returns a response of OK.
Topic includes Kafka topic config, partitions, replication factor and name.

# Interfaces

ServerConfigBuilder sets port, host, http retry count config to be passed to create a NewClient.
TopicBuilder is an interface that builds a Kafka Topic Config.