ogiproducer

package
v0.0.0-...-6483e35 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ProducerPluginPath = golenv.OverrideIfEnv("PRODUCER_PLUGIN_PATH", "./producer.so")
)
View Source
var (
	ProducerType = golenv.OverrideIfEnv("PRODUCER_TYPE", "echo")
)

Functions

func Produce

func Produce(topic string, message []byte, messageKey string)

Types

type Echo

type Echo struct {
}

func (*Echo) Close

func (e *Echo) Close()

func (*Echo) Produce

func (e *Echo) Produce(topic string, message []byte, messageKey string)

type NewProducerFunc

type NewProducerFunc func() Producer

type Producer

type Producer interface {
	Produce(string, []byte, string)
	Close()
}

func NewEchoProducer

func NewEchoProducer() Producer

func NewProducer

func NewProducer() Producer

func NewProducerPlugin

func NewProducerPlugin() Producer

type ProducerPlugin

type ProducerPlugin struct {
	Name        string
	CloseFunc   plugin.Symbol
	ProduceFunc plugin.Symbol
}

func (*ProducerPlugin) Close

func (plugin *ProducerPlugin) Close()

func (*ProducerPlugin) Produce

func (plugin *ProducerPlugin) Produce(topic string, message []byte, messageKey string)

Jump to

Keyboard shortcuts

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