Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixup markdown and rename to readme.md #22

Merged
merged 1 commit into from
Dec 11, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 28 additions & 30 deletions kafka/README → kafka/README.md
Original file line number Diff line number Diff line change
@@ -1,52 +1,50 @@
Information for confluent-kafka-go developers
=============================================

# Information for confluent-kafka-go developers

Whenever librdkafka error codes are updated make sure to run generate before building:

$ (cd go_rdkafka_generr && go install) && go generate
$ go build


```
$ (cd go_rdkafka_generr && go install) && go generate
$ go build
```



Testing
=======

## Testing

Some of the tests included in this directory, the benchmark and integration tests in particular,
require an existing Kafka cluster and a testconf.json configuration file to
provide tests with bootstrap brokers, topic name, etc.

The format of testconf.json is a JSON object:
```
{
"Brokers": "<bootstrap-brokers>",
"Topic": "<test-topic-name>"
}
{
"Brokers": "<bootstrap-brokers>",
"Topic": "<test-topic-name>"
}
```

See testconf-example.json for an example and full set of available options.


To run unit-tests:

$ go test

```
$ go test
```

To run benchmark tests:

$ go test -bench .
```
$ go test -bench .
```

For the code coverage:
```
$ go test -coverprofile=coverage.out -bench=.
$ go tool cover -func=coverage.out
```

$ go test -coverprofile=coverage.out -bench=.
$ go tool cover -func=coverage.out

## Build tags (static linking)

Build tags (static linking)
===========================

Different build types are supported through Go build tags (`-tags ..`),
these tags should be specified on the **application** build command.
Expand All @@ -58,14 +56,14 @@ these tags should be specified on the **application** build command.



Generate HTML documentation
===========================
## Generating HTML documentation

To generate one-page HTML documentation run the mk/doc-gen.py script from the
top-level directory. This script requires the beautifulsoup4 Python package.

$ source .../your/virtualenv/bin/activate
$ pip install beautifulsoup4
..
$ mk/doc-gen.py > kafka.html

```
$ source .../your/virtualenv/bin/activate
$ pip install beautifulsoup4
...
$ mk/doc-gen.py > kafka.html
```