sinks

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// sink Possible Statuses
	SinkStatusOnError = "ON_ERROR"
	SinkStatusRunning = "RUNNING"
	SinkStatusWaiting = "WAITING"
)

Possible Statuses

View Source
const KafkaType = "Kafka"

KafkaType type of sink

View Source
const MaxRetry = 20

MaxRetry retry max

View Source
const PulsarType = "Pulsar"

PulsarType type of sink

View Source
const StdoutType = "Stdout"

StdoutType type of sink

Variables

This section is empty.

Functions

This section is empty.

Types

type Kafka

type Kafka struct {
	*Sink
	// contains filtered or unexported fields
}

Kafka representation of kafka sink

func (*Kafka) Start

func (k *Kafka) Start(_ ...interface{}) error

Start kafka sink

type KafkaGSSAPI added in v0.2.0

type KafkaGSSAPI struct {
	ServiceName        string `json:"service_name" mapstructure:"service_name"`
	Realm              string `json:"realm"`
	KerberosConfigPath string `json:"kerberos_config_path" mapstructure:"kerberos_config_path"`
	KeyTabPath         string `json:"key_tab_path" mapstructure:"key_tab_path"`
}

type KafkaMessage added in v0.2.0

type KafkaMessage struct {
	// The Kafka topic for this message.
	Topic string
	// The partitioning key for this message.
	Key string
	// The source offset of message
	Offset *events.Offset
	// The actual serialized message to store in Kafka.
	Value []byte
}

kafkaSinkConfig representation of Kafka Message

type Pulsar added in v0.2.0

type Pulsar struct {
	*Sink
	// contains filtered or unexported fields
}

Pulsar representation of Pulsar sink

func (*Pulsar) GetInputChan added in v0.2.0

func (p *Pulsar) GetInputChan() chan events.LookatchEvent

GetInputChan return the input channel attached to this sink

func (*Pulsar) Start added in v0.2.0

func (p *Pulsar) Start(_ ...interface{}) error

Start connect to pulsar and start producer

type Sink

type Sink struct {
	// contains filtered or unexported fields
}

Sink representation of sink

func (*Sink) GetCommitChan added in v0.2.0

func (s *Sink) GetCommitChan() chan interface{}

GetCommitChan return the commit channel attached to this sink

func (*Sink) GetInputChan added in v0.2.0

func (s *Sink) GetInputChan() chan events.LookatchEvent

GetInputChan return input channel attach to sink

func (*Sink) SendCommit added in v0.2.0

func (s *Sink) SendCommit(payload interface{})

SendCommit send a commit message into the commit channel of this sink

type SinkI

type SinkI interface {
	Start(...interface{}) error
	GetInputChan() chan events.LookatchEvent
	GetCommitChan() chan interface{}
}

SinkI sink interface

func New

func New(name string, sinkType string, conf *viper.Viper, stop chan error) (SinkI, error)

New create new sink

type Stdout

type Stdout struct {
	*Sink
}

Stdout representation of sink

func (*Stdout) Start

func (s *Stdout) Start(i ...interface{}) (err error)

Start stdout sink

Jump to

Keyboard shortcuts

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