Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var AutoOffsetReset = struct { Earliest AutoOffsetResetOption Latest AutoOffsetResetOption Largest AutoOffsetResetOption Smallest AutoOffsetResetOption }{ Earliest: "earliest", Latest: "latest", Largest: "largest", Smallest: "smallest", }
AutoOffsetReset commit the message you brought from Kafka using Zookeeper to persist the last 'offset' which it read.
var IsolationLevel = struct { ReadUncommitted IsolationLevelOption ReadCommitted IsolationLevelOption }{ ReadUncommitted: "read_uncommitted", ReadCommitted: "read_committed", }
IsolationLevel the kafka isolation level for transactions.
var SecurityProtocol = struct { Plaintext SecurityProtocolOption SSL SecurityProtocolOption SASLPlaintext SecurityProtocolOption SASLSSL SecurityProtocolOption }{ Plaintext: "plaintext", SSL: "ssl", SASLPlaintext: "sasl_plaintext", SASLSSL: "sasl_ssl", }
SecurityProtocol the security protocols for kafka.
Functions ¶
func ValueToBytes ¶
func ValueToBytes(e interface{}) []byte
ValueToBytes convert event to byte array
func ValueToString ¶
func ValueToString(e interface{}) string
ValueToString convert event to string.
Types ¶
type AutoOffsetResetOption ¶
type AutoOffsetResetOption string
AutoOffsetResetOption wether to commit the message you brought from Kafka using Zookeeper to persist the last 'offset' which it read.
type Config ¶
type Config struct { Acks int AutoOffsetReset AutoOffsetResetOption BootstrapServers []string ClientID string GroupID string IsolationLevel IsolationLevelOption MessageMaxBytes uint32 SecurityProtocol SecurityProtocolOption SslCertificateLocation string SslCaLocation string SslKeyLocation string SslValidate bool }
Config the configuration for your kafka consumer.
type Consumer ¶
type Consumer struct { Config *Config Topics []string Infos rxgo.Observable Events rxgo.Observable // contains filtered or unexported fields }
Consumer holds the observables and channels in one struct.
func NewConsumer ¶
NewConsumer creates a Consumer via config and topics.
type ErrorEvent ¶
type ErrorEvent struct {
Error error
}
ErrorEvent will be exported when producer crashes
func (ErrorEvent) String ¶
func (ee ErrorEvent) String() string
type IsolationLevelOption ¶
type IsolationLevelOption string
IsolationLevelOption what isolation level to use.
type Producer ¶
type Producer struct { Config *Config Topic string Key []byte Events rxgo.Observable // contains filtered or unexported fields }
Producer holds the observables and channels in one struct.
type SecurityProtocolOption ¶
type SecurityProtocolOption string
SecurityProtocolOption what security protocol to use.