示例#1
0
func NewNextReaderSourceMax(reader NextReader, max uint32) Sourcer {

	hcc := stream.NewHardStopChannelCloser()
	o := stream.NewBaseOut(stream.CHAN_SLACK)
	nrs := NextReaderSource{hcc, o, reader, max, sync.Once{}}
	return &nrs
}
示例#2
0
func NewInterfaceReaderSource(reader InterfaceReader) Sourcer {
	nrs := InterfaceReaderSource{stream.NewHardStopChannelCloser(), stream.NewBaseOut(stream.CHAN_SLACK), reader}
	return nrs
}
示例#3
0
文件: zmq.go 项目: sgichohi/go-stream
func NewZmqSource(addr string, highWaterMark int) *ZmqSource {
	zmqsrc := ZmqSource{stream.NewHardStopChannelCloser(), stream.NewBaseOut(stream.CHAN_SLACK), addr, highWaterMark}

	return &zmqsrc
}
示例#4
0
func NewUnixgramSource(sockPath string) *UnixgramSource {
	unixsrc := UnixgramSource{stream.NewHardStopChannelCloser(), stream.NewBaseOut(stream.CHAN_SLACK), sockPath}

	return &unixsrc
}