source

package
v0.0.0-...-195e12e Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2020 License: MIT Imports: 17 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChanSource

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

ChanSource streams data from chan

func NewChanSource

func NewChanSource(in chan interface{}) *ChanSource

NewChanSource returns new ChanSource instance

func (*ChanSource) Out

func (cs *ChanSource) Out() <-chan interface{}

Out returns channel for sending data

func (*ChanSource) Via

func (cs *ChanSource) Via(_flow streams.Flow) streams.Flow

Via streams data through given flow

type ConnType

type ConnType string

ConnType connection type

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

type FileSource

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

FileSource streams data from file system

func NewFileSource

func NewFileSource(fileName string) *FileSource

NewFileSource returns new FileSource instance

func (*FileSource) Out

func (fs *FileSource) Out() <-chan interface{}

Out returns channel for sending data

func (*FileSource) Via

func (fs *FileSource) Via(_flow streams.Flow) streams.Flow

Via streams data through given flow

type MqttSource

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

func NewMqttSource

func NewMqttSource(config *MQTT.ClientOptions, topic string) (*MqttSource, error)

获取新的mqtt源

func (*MqttSource) Out

func (ms *MqttSource) Out() <-chan interface{}

Out returns channel for sending data

func (*MqttSource) Via

func (ms *MqttSource) Via(_flow *flow.Map) streams.Flow

Via streams data through given flow

type NatsSource

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

func NewNatsSource

func NewNatsSource(addr string, topic string) (*NatsSource, error)

func (*NatsSource) Out

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

Out returns channel for sending data

func (*NatsSource) Via

func (ns *NatsSource) Via(_flow *flow.Map) streams.Flow

Via streams data through given flow

type NetSource

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

NetSource network socket connector

func NewNetSource

func NewNetSource(connType ConnType, address string) (*NetSource, error)

NewNetSource creates a new NetSource

func (*NetSource) Out

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

Out returns channel for sending data

func (*NetSource) Via

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

Via streams data through given flow

type NsqSource

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

func NewNsqSource

func NewNsqSource(url string, topic string, channel string) (*NsqSource, error)

func (*NsqSource) HandleMessage

func (rs *NsqSource) HandleMessage(msg *nsq.Message) error

处理消息

func (*NsqSource) Out

func (rs *NsqSource) Out() <-chan interface{}

Out returns channel for sending data

func (*NsqSource) Via

func (rs *NsqSource) Via(_flow streams.Flow) streams.Flow

Via streams data through given flow

type PgSource

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

func NewPgSource

func NewPgSource(connStr string) (*PgSource, error)

func (*PgSource) Out

func (p *PgSource) Out() <-chan interface{}

Out returns channel for sending data

func (*PgSource) Via

func (p *PgSource) Via(_flow *flow.Map) streams.Flow

Via streams data through given flow

type PulsarSource

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

PulsarSource connector

func NewPulsarSource

func NewPulsarSource(clientOptions *pulsar.ClientOptions, consumerOptions *pulsar.ConsumerOptions) (*PulsarSource, error)

NewPulsarSource creates a new PulsarSource

func (*PulsarSource) Out

func (ps *PulsarSource) Out() <-chan interface{}

Out returns channel for sending data

func (*PulsarSource) Via

func (ps *PulsarSource) Via(_flow *flow.Map) streams.Flow

Via streams data through given flow

type RedisSource

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

RedisSource implements Redis Pub/Sub Source

func NewRedisSource

func NewRedisSource(config *redis.Options, channel string) (*RedisSource, error)

NewRedisSource returns new RedisSource instance

func (*RedisSource) Out

func (rs *RedisSource) Out() <-chan interface{}

Out returns channel for sending data

func (*RedisSource) Via

func (rs *RedisSource) Via(_flow streams.Flow) streams.Flow

Via streams data through given flow

Jump to

Keyboard shortcuts

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