Documentation ¶
Index ¶
- type ChanSink
- type ChanSource
- type ConnType
- type FileSink
- type FileSource
- type GroupHandler
- type IgnoreSink
- type KafkaSink
- type KafkaSource
- type Message
- type NatsSink
- type NatsSource
- type NetSink
- type NetSource
- type PulsarSink
- type PulsarSource
- type RedisSink
- type RedisSource
- type StdoutSink
- type WebSocketSink
- type WebSocketSource
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChanSink ¶
type ChanSink struct {
Out chan interface{}
}
ChanSink sends data to the output channel
func NewChanSink ¶
func NewChanSink(out chan interface{}) *ChanSink
NewChanSink returns a new ChanSink instance
type ChanSource ¶
type ChanSource struct {
// contains filtered or unexported fields
}
ChanSource streams data from the input channel
func NewChanSource ¶
func NewChanSource(in chan interface{}) *ChanSource
NewChanSource returns a new ChanSource instance
func (*ChanSource) Out ¶
func (cs *ChanSource) Out() <-chan interface{}
Out returns an output channel for sending data
func (*ChanSource) Via ¶
func (cs *ChanSource) Via(_flow streams.Flow) streams.Flow
Via streams data through the given flow
type FileSink ¶
type FileSink struct {
// contains filtered or unexported fields
}
A FileSink writes items to a file
func NewFileSink ¶
NewFileSink returns a new FileSink instance
type FileSource ¶
type FileSource struct {
// contains filtered or unexported fields
}
FileSource streams data from the file
func NewFileSource ¶
func NewFileSource(fileName string) *FileSource
NewFileSource returns a new FileSource instance
func (*FileSource) Out ¶
func (fs *FileSource) Out() <-chan interface{}
Out returns an output channel for sending data
func (*FileSource) Via ¶
func (fs *FileSource) Via(_flow streams.Flow) streams.Flow
Via streams data through the given flow
type GroupHandler ¶
type GroupHandler struct {
// contains filtered or unexported fields
}
GroupHandler represents a Sarama consumer group handler
func (*GroupHandler) Cleanup ¶
func (handler *GroupHandler) Cleanup(sarama.ConsumerGroupSession) error
Cleanup is run at the end of a session, once all ConsumeClaim goroutines have exited
func (*GroupHandler) ConsumeClaim ¶
func (handler *GroupHandler) ConsumeClaim(session sarama.ConsumerGroupSession, claim sarama.ConsumerGroupClaim) error
ConsumeClaim must start a consumer loop of ConsumerGroupClaim's Messages().
func (*GroupHandler) Setup ¶
func (handler *GroupHandler) Setup(sarama.ConsumerGroupSession) error
Setup is run at the beginning of a new session, before ConsumeClaim
type IgnoreSink ¶
type IgnoreSink struct {
// contains filtered or unexported fields
}
IgnoreSink sends items to /dev/null
func NewIgnoreSink ¶
func NewIgnoreSink() *IgnoreSink
NewIgnoreSink returns a new IgnoreSink instance
func (*IgnoreSink) In ¶
func (ignore *IgnoreSink) In() chan<- interface{}
In returns an input channel for receiving data
type KafkaSink ¶
type KafkaSink struct {
// contains filtered or unexported fields
}
KafkaSink connector
func NewKafkaSink ¶
NewKafkaSink returns a new KafkaSink instance
type KafkaSource ¶
type KafkaSource struct {
// contains filtered or unexported fields
}
KafkaSource connector
func NewKafkaSource ¶
func NewKafkaSource(ctx context.Context, addrs []string, groupID string, config *sarama.Config, topics ...string) *KafkaSource
NewKafkaSource returns a new KafkaSource instance
func (*KafkaSource) Out ¶
func (ks *KafkaSource) Out() <-chan interface{}
Out returns an output channel for sending data
func (*KafkaSource) Via ¶
func (ks *KafkaSource) Via(_flow streams.Flow) streams.Flow
Via streams data through the given flow
type Message ¶
type Message struct { // The message types are defined in RFC 6455, section 11.8. MsgType int Payload []byte }
Message represents a message from peer
type NatsSink ¶
type NatsSink struct {
// contains filtered or unexported fields
}
NatsSink connector
func NewNatsSink ¶
NewNatsSink returns a new NatsSink instance
type NatsSource ¶
type NatsSource struct {
// contains filtered or unexported fields
}
NatsSource connector
func NewNatsSource ¶
func NewNatsSource(ctx context.Context, conn stan.Conn, subscriptionType stan.SubscriptionOption, topics ...string) *NatsSource
NewNatsSource returns a new NatsSource instance
func (*NatsSource) Out ¶
func (ns *NatsSource) Out() <-chan interface{}
Out returns the output channel for the data
func (*NatsSource) Via ¶
func (ns *NatsSource) Via(_flow streams.Flow) streams.Flow
Via streams data through a given flow
type NetSink ¶
type NetSink struct {
// contains filtered or unexported fields
}
NetSink downstreams input events to a network soket
func NewNetSink ¶
NewNetSink returns a new NetSink instance
type NetSource ¶
type NetSource struct {
// contains filtered or unexported fields
}
NetSource network socket connector
func NewNetSource ¶
NewNetSource returns a new NetSource instance
type PulsarSink ¶
type PulsarSink struct {
// contains filtered or unexported fields
}
PulsarSink connector
func NewPulsarSink ¶
func NewPulsarSink(ctx context.Context, clientOptions *pulsar.ClientOptions, producerOptions *pulsar.ProducerOptions) (*PulsarSink, error)
NewPulsarSink returns a new PulsarSink instance
func (*PulsarSink) In ¶
func (ps *PulsarSink) In() chan<- interface{}
In returns an input channel for receiving data
type PulsarSource ¶
type PulsarSource struct {
// contains filtered or unexported fields
}
PulsarSource connector
func NewPulsarSource ¶
func NewPulsarSource(ctx context.Context, clientOptions *pulsar.ClientOptions, consumerOptions *pulsar.ConsumerOptions) (*PulsarSource, error)
NewPulsarSource returns a new PulsarSource instance
func (*PulsarSource) Out ¶
func (ps *PulsarSource) Out() <-chan interface{}
Out returns an output channel for sending data
func (*PulsarSource) Via ¶
func (ps *PulsarSource) Via(_flow streams.Flow) streams.Flow
Via streams data through the given flow
type RedisSink ¶
type RedisSink struct {
// contains filtered or unexported fields
}
RedisSink is a Redis Pub/Sub Sink
func NewRedisSink ¶
NewRedisSink returns a new RedisSink instance
type RedisSource ¶
type RedisSource struct {
// contains filtered or unexported fields
}
RedisSource is a Redis Pub/Sub Source
func NewRedisSource ¶
func NewRedisSource(ctx context.Context, config *redis.Options, channel string) (*RedisSource, error)
NewRedisSource returns a new RedisSource instance
func (*RedisSource) Out ¶
func (rs *RedisSource) Out() <-chan interface{}
Out returns an output channel for sending data
func (*RedisSource) Via ¶
func (rs *RedisSource) Via(_flow streams.Flow) streams.Flow
Via streams data through the given flow
type StdoutSink ¶
type StdoutSink struct {
// contains filtered or unexported fields
}
StdoutSink sends items to stdout
func NewStdoutSink ¶
func NewStdoutSink() *StdoutSink
NewStdoutSink returns a new StdoutSink instance
func (*StdoutSink) In ¶
func (stdout *StdoutSink) In() chan<- interface{}
In returns an input channel for receiving data
type WebSocketSink ¶
type WebSocketSink struct {
// contains filtered or unexported fields
}
WebSocketSink connector
func NewWebSocketSink ¶
func NewWebSocketSink(ctx context.Context, url string) (*WebSocketSink, error)
NewWebSocketSink returns a new WebSocketSink instance
func NewWebSocketSinkWithConn ¶
NewKafkaSink returns a new KafkaSink instance
func NewWebSocketSinkWithDialer ¶
func NewWebSocketSinkWithDialer(ctx context.Context, url string, dialer *websocket.Dialer) (*WebSocketSink, error)
NewWebSocketSinkWithDialer returns a new WebSocketSink instance
func (*WebSocketSink) In ¶
func (wsock *WebSocketSink) In() chan<- interface{}
In returns an input channel for receiving data
type WebSocketSource ¶
type WebSocketSource struct {
// contains filtered or unexported fields
}
WebSocketSource connector
func NewWebSocketSource ¶
func NewWebSocketSource(ctx context.Context, url string, errsChan chan *flow.Error) (*WebSocketSource, error)
NewWebSocketSource returns a new WebSocketSource instance
func NewWebSocketSourceWithDialer ¶
func NewWebSocketSourceWithDialer(ctx context.Context, url string, dialer *websocket.Dialer, errsChan chan *flow.Error) (*WebSocketSource, error)
NewWebSocketSourceWithDialer returns a new WebSocketSource instance
func (*WebSocketSource) Out ¶
func (wsock *WebSocketSource) Out() <-chan interface{}
Out returns an output channel for sending data
func (*WebSocketSource) Via ¶
func (wsock *WebSocketSource) Via(_flow streams.Flow) streams.Flow
Via streams data through the given flow