Documentation ¶
Overview ¶
Package examples contains examples that demonstrate the usage of various cn-infra components.
Directories ¶
Path | Synopsis |
---|---|
Example demonstrates creating a Bolt plugin
|
Example demonstrates creating a Bolt plugin |
Example application "cassandra-lib" demonstrates the usage of the cassandra library in a plain go program.
|
Example application "cassandra-lib" demonstrates the usage of the cassandra library in a plain go program. |
Example program "configs-plugin" demonstrates the usage of PluginConfig API.
|
Example program "configs-plugin" demonstrates the usage of PluginConfig API. |
Example application "cryptodata-plugin" demonstrates the usage of the cryptodata API.
|
Example application "cryptodata-plugin" demonstrates the usage of the cryptodata API. |
Example application "cryptodata-proto-plugin" demonstrates the usage of the cryptodata API.
|
Example application "cryptodata-proto-plugin" demonstrates the usage of the cryptodata API. |
Example application "datasync-plugin" demonstrates the usage of the datasync API.
|
Example application "datasync-plugin" demonstrates the usage of the datasync API. |
Package etcdlib contains a collection of examples demonstrating the usage of the etcd library.
|
Package etcdlib contains a collection of examples demonstrating the usage of the etcd library. |
editor
Example program "editor" demonstrates CREATE/UPDATE/DELETE operations with etcd library.
|
Example program "editor" demonstrates CREATE/UPDATE/DELETE operations with etcd library. |
view
Example program "view" shows how to read data from etcd datastore.
|
Example program "view" shows how to read data from etcd datastore. |
watcher
Example program *watcher* shows how to watch for changes in etcd datastore.
|
Example program *watcher* shows how to watch for changes in etcd datastore. |
Example program "flags-lib" demonstrates how to register CLI flags and how to display their runtime values.
|
Example program "flags-lib" demonstrates how to register CLI flags and how to display their runtime values. |
Package grpcplugin contains grpc server & grpc client example.
|
Package grpcplugin contains grpc server & grpc client example. |
grpc-server
Example demonstrates the use of GRPC plugin API.
|
Example demonstrates the use of GRPC plugin API. |
Package kafkalib contains multiple examples with the kafka library.
|
Package kafkalib contains multiple examples with the kafka library. |
asyncproducer
Asyncproducer is a simple command line tool for sending messages to Kafka using an asynchronous Kafka producer.
|
Asyncproducer is a simple command line tool for sending messages to Kafka using an asynchronous Kafka producer. |
consumer
Consumer is a simple command line tool for consuming a Kafka topic and printing the received messages to the stdout.
|
Consumer is a simple command line tool for consuming a Kafka topic and printing the received messages to the stdout. |
mux
Mux is a simple command line tool demonstrating the usage of Kafka multiplexer API.
|
Mux is a simple command line tool demonstrating the usage of Kafka multiplexer API. |
syncproducer
Syncproducer is simple command line tool for sending messages to Kafka using a synchronous Kafka producer.
|
Syncproducer is simple command line tool for sending messages to Kafka using a synchronous Kafka producer. |
utils
Package utils implements various tools used in examples for Kafka library.
|
Package utils implements various tools used in examples for Kafka library. |
Package kafkaplugin contains multiple examples with the kafka plugin.
|
Package kafkaplugin contains multiple examples with the kafka plugin. |
hash-partitioner
Example "hash-partitioner" demonstrates the use of Kafka plugin API with automatic (hash-based) partitioning.
|
Example "hash-partitioner" demonstrates the use of Kafka plugin API with automatic (hash-based) partitioning. |
manual-partitioner
Example "manual-partitioner" demonstrates the use of Kafka plugin API with a focus on manual partitioning.
|
Example "manual-partitioner" demonstrates the use of Kafka plugin API with a focus on manual partitioning. |
post-init-consumer
Example "later-stage" demonstrates the use partition watcher initialized and used after multiplexer Init()
|
Example "later-stage" demonstrates the use partition watcher initialized and used after multiplexer Init() |
Package logslib contains multiple examples showing how to use the logger library with a focus on switching between the log levels.
|
Package logslib contains multiple examples showing how to use the logger library with a focus on switching between the log levels. |
basic
Example "basic" presents the most commonly used APIs of the logger library.
|
Example "basic" presents the most commonly used APIs of the logger library. |
custom
Example "custom" shows how to customize the logger.
|
Example "custom" shows how to customize the logger. |
http
Example "http" demonstrates how to change the log level remotely via REST.
|
Example "http" demonstrates how to change the log level remotely via REST. |
Example "logs-plugin" shows how to use the logger library from a simple plugin.
|
Example "logs-plugin" shows how to use the logger library from a simple plugin. |
Package etcdexample explains how to generate Golang structures from protobuf-formatted data.
|
Package etcdexample explains how to generate Golang structures from protobuf-formatted data. |
process-manager-plugin
|
|
Package redislib contains a collection of examples demonstrating the usage of the redis library.
|
Package redislib contains a collection of examples demonstrating the usage of the redis library. |
airport
A bit more advanced example demonstrating the redis library API.
|
A bit more advanced example demonstrating the redis library API. |
airport/model
Package flight defines protobuf-formatted data as used by the airport example.
|
Package flight defines protobuf-formatted data as used by the airport example. |
simple
A simple example demonstrating the redis library API.
|
A simple example demonstrating the redis library API. |
Example demonstrates creating a Redis plugin
|
Example demonstrates creating a Redis plugin |
Example simple-agent shows how easily a set of CN-infra based plugins can be turned into an application.
|
Example simple-agent shows how easily a set of CN-infra based plugins can be turned into an application. |
Example application "statuscheck-plugin" demonstrates the usage of statusCheck plugin etcd-plugin is monitored by StatusCheck plugin and examplePlugin reads the state.
|
Example application "statuscheck-plugin" demonstrates the usage of statusCheck plugin etcd-plugin is monitored by StatusCheck plugin and examplePlugin reads the state. |
tutorials
|
|
Click to show internal directories.
Click to hide internal directories.