extension

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2021 License: MIT Imports: 19 Imported by: 0

Documentation

Index

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

func (*ChanSink) In

func (ch *ChanSink) In() chan<- interface{}

In returns an input channel for receiving data

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 ConnType

type ConnType string

ConnType connection type

const (
	// TCP connection type
	TCP ConnType = "tcp"
	// UDP connection type
	UDP ConnType = "udp"
)

type FileSink

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

A FileSink writes items to a file

func NewFileSink

func NewFileSink(fileName string) *FileSink

NewFileSink returns a new FileSink instance

func (*FileSink) In

func (fs *FileSink) In() chan<- interface{}

In returns an input channel for receiving data

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

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

func NewKafkaSink(addrs []string, config *sarama.Config, topic string) *KafkaSink

NewKafkaSink returns a new KafkaSink instance

func (*KafkaSink) In

func (ks *KafkaSink) In() chan<- interface{}

In returns an input channel for receiving data

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

func NewNatsSink(conn stan.Conn, topic string) *NatsSink

NewNatsSink returns a new NatsSink instance

func (*NatsSink) In

func (ns *NatsSink) In() chan<- interface{}

In returns an input channel for receiving data

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

func NewNetSink(connType ConnType, address string) (*NetSink, error)

NewNetSink returns a new NetSink instance

func (*NetSink) In

func (ns *NetSink) In() chan<- interface{}

In returns an input channel for receiving data

type NetSource

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

NetSource network socket connector

func NewNetSource

func NewNetSource(ctx context.Context, connType ConnType, address string) (*NetSource, error)

NewNetSource returns a new NetSource instance

func (*NetSource) Out

func (ns *NetSource) Out() <-chan interface{}

Out returns an output channel for sending data

func (*NetSource) Via

func (ns *NetSource) Via(_flow streams.Flow) streams.Flow

Via streams data through the given flow

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

func NewRedisSink(config *redis.Options, channel string) *RedisSink

NewRedisSink returns a new RedisSink instance

func (*RedisSink) In

func (rs *RedisSink) In() chan<- interface{}

In returns an input channel for receiving data

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

func NewWebSocketSinkWithConn(ctx context.Context, conn *websocket.Conn) (*WebSocketSink, error)

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

Jump to

Keyboard shortcuts

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