examples/

directory
v1.1.11 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 1, 2023 License: BSD-3-Clause

README

Goka Examples

The examples in this directory will demonstrate different patterns and features of goka.

Setup

All examples are runnable out of the box. All you need to do is start Kafka and Zookeeper locally. Just run

make start
# or
make restart # if it was started already and you need fresh instances.

This will start the docker containers and configure kafka to auto-create the topics.

Simple Example

This is a very simple toy application that demonstrates how to

  • use an Emitter
  • use a Processor
  • run a View to print the group table's values

Example

Clicks

Similar to the first example, Emitter, Processor and View are demonstrated here. In Addition it shows how to

  • access the View using a web endpoint
  • use a Codecs

Example

More complex examples

The following examples show the combination of multiple processors, views, etc.

Messaging Example

By generating a random folder for storage, this example can be executed in parallel multiple times to get a feeling for the rebalancing that's happening under the hood.

[Example]https://github.com/lovoo/goka/tree/master/examples/5-multiple/)

Monitoring

Shows how to use the monitoring- and query-interface of goka.

Example

Testing

Shows how to (unit-)test programs using goka.

Example

DeferCommit

Demonstrates the rather new context function to defer (postpone) the commit of a callback.

Example

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL