cli

package
v0.0.0-...-4623b9b Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2020 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Overview

kafka-firehose-nozzle is Cloud Foundry nozzle which forwards logs from the loggeregagor firehose to Apache kafka (http://kafka.apache.org/).

Usage:

kafak-firehose-nozzle [options]

Available options:

-config PATH       Path to configuraiton file
-username NAME     username to grant access token to connect firehose
-password PASS     password to grant access token to connect firehose
-worker NUM        Number of producer worker. Default is number of CPU core
-subscription ID   Subscription ID for firehose. Default is 'kafka-firehose-nozzle'
-debug             Output event to stdout instead of producing message to kafka
-log-level LEVEL   Log level. Default level is INFO (DEBUG|INFO|ERROR)

Index

Constants

View Source
const (
	ExitCodeOK    int = 0
	ExitCodeError int = 1 + iota
)

Exit codes are int values that represent an exit code for a particular error.

View Source
const (
	Consume stats.StatsType = iota
	ConsumeFail
	Publish
	PublishFail
	SlowConsumerAlert
	SubInputBuffer
)
View Source
const (
	// DefaultCfgPath is default config file path
	DefaultCfgPath = "example/kafka-firehose-nozzle.toml"

	// DefaultStatsInterval is default interval of displaying
	// stats info to console
	DefaultStatsInterval = 10 * time.Second

	// DefaultUsername to grant access token for firehose
	DefaultUsername = "admin"

	// DefaultUAATimeout is default timeout for requesting
	// auth token to UAA server.
	DefaultUAATimeout = 20 * time.Second

	// DefaultSubscriptionID is default subscription ID for
	// loggregagor firehose.
	DefaultSubscriptionID = "debug-kafka-firehose-nozzle"

	// DefaultIdleTimeout is the default timeout for receiving a single message
	// from the firehose
	DefaultIdleTimeout = 60 * time.Second
)
View Source
const (
	EnvPassword = "UAA_PASSWORD"
)
View Source
const Name string = "osb-autoscaler-kafka-nozzle"

Name is command name

View Source
const Version string = "0.1.2-dev"

Version is command version

Variables

This section is empty.

Functions

This section is empty.

Types

type CLI

type CLI struct {
	// outStream and errStream are the stdout and stderr
	// to write message from the CLI.
	OutStream, ErrStream io.Writer
}

CLI is the command line object

func (*CLI) Run

func (cli *CLI) Run(args []string) int

Run invokes the CLI with the given arguments.

Jump to

Keyboard shortcuts

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