cli

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KafkaDefaultConnectTimeout = "10s"
	KafkaDefaultGroupId        = "plumber"
)
View Source
const (
	MQTTDefaultConnectTimeout = "5s"
	MQTTDefaultClientId       = "plumber"
)

Variables

This section is empty.

Functions

func HandleGCPPubSubFlags

func HandleGCPPubSubFlags(readCmd, writeCmd *kingpin.CmdClause, opts *Options)

func HandleKafkaFlags

func HandleKafkaFlags(readCmd, writeCmd *kingpin.CmdClause, opts *Options)

func HandleMQTTFlags added in v0.2.0

func HandleMQTTFlags(readCmd, writeCmd *kingpin.CmdClause, opts *Options)

func HandleRabbitFlags

func HandleRabbitFlags(readCmd, writeCmd *kingpin.CmdClause, opts *Options)

Types

type GCPPubSubOptions

type GCPPubSubOptions struct {
	// Shared
	ProjectId string

	// Read
	ReadSubscriptionId      string
	ReadProtobufDir         string
	ReadProtobufRootMessage string
	ReadOutputType          string
	ReadAck                 bool
	ReadFollow              bool
	ReadLineNumbers         bool
	ReadConvert             string

	// Write
	WriteTopicId             string
	WriteInputData           string
	WriteInputFile           string
	WriteInputType           string
	WriteOutputType          string
	WriteProtobufDir         string
	WriteProtobufRootMessage string
}

type KafkaOptions

type KafkaOptions struct {
	// Shared
	Address     string
	Topic       string
	Timeout     time.Duration
	InsecureTLS bool
	LineNumbers bool

	// Read
	ReadGroupId             string
	ReadFollow              bool
	ReadOutputType          string
	ReadProtobufDir         string
	ReadProtobufRootMessage string
	ReadConvert             string

	// Write
	WriteKey                 string
	WriteInputData           string
	WriteInputFile           string
	WriteInputType           string
	WriteOutputType          string
	WriteProtobufDir         string
	WriteProtobufRootMessage string
}

type MQTTOptions added in v0.2.0

type MQTTOptions struct {
	// Shared
	Address     string
	Topic       string
	Timeout     time.Duration
	ClientId    string
	LineNumbers bool
	QoSLevel    int

	// TLS-related pieces
	TLSCAFile         string
	TLSClientCertFile string
	TLSClientKeyFile  string
	InsecureTLS       bool

	// Read
	ReadFollow              bool
	ReadOutputType          string
	ReadProtobufDir         string
	ReadProtobufRootMessage string
	ReadConvert             string
	ReadTimeout             time.Duration

	// Write
	WriteTimeout             time.Duration
	WriteInputData           string
	WriteInputFile           string
	WriteInputType           string
	WriteOutputType          string
	WriteProtobufDir         string
	WriteProtobufRootMessage string
}

type Options

type Options struct {
	// Global
	Debug  bool
	Quiet  bool
	Action string

	Kafka     *KafkaOptions
	Rabbit    *RabbitOptions
	GCPPubSub *GCPPubSubOptions
	MQTT      *MQTTOptions
}

func Handle

func Handle() (string, *Options, error)

type RabbitOptions

type RabbitOptions struct {
	// Shared
	Address    string
	Exchange   string
	RoutingKey string

	// Read
	ReadQueue               string
	ReadQueueDurable        bool
	ReadQueueAutoDelete     bool
	ReadQueueExclusive      bool
	ReadLineNumbers         bool
	ReadFollow              bool
	ReadProtobufDir         string
	ReadProtobufRootMessage string
	ReadOutputType          string
	ReadConvert             string

	// Write
	WriteInputData           string
	WriteInputFile           string
	WriteInputType           string
	WriteOutputType          string
	WriteProtobufDir         string
	WriteProtobufRootMessage string
}

Jump to

Keyboard shortcuts

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