예제 #1
0
func NewClient(addr string, hwm int) *Client {
	buf := util.NewSequentialBufferChanImpl(hwm + 1)
	return &Client{stream.NewHardStopChannelCloser(), stream.NewBaseIn(stream.CHAN_SLACK), addr, hwm, buf, 0, false, nil}
}
예제 #2
0
func NewWriterSinkLengthDelim(writer io.Writer) Sinker {
	ws := WriterSink{stream.NewHardStopChannelCloser(), stream.NewBaseIn(stream.CHAN_SLACK), lengthDelimValueWriter{}, writer}
	return ws
}
예제 #3
0
func NewWriterSinkAddNl(writer io.Writer) Sinker {
	ws := WriterSink{stream.NewHardStopChannelCloser(), stream.NewBaseIn(stream.CHAN_SLACK), addNlValueWriter{}, writer}
	return ws
}
예제 #4
0
func NewMultiPartWriterSink(writer io.Writer) *MultiPartWriterSink {
	ws := &MultiPartWriterSink{stream.NewHardStopChannelCloser(), stream.NewBaseIn(stream.CHAN_SLACK), lengthDelimMultiPartValueWriter{}, writer, nil}
	return ws
}
예제 #5
0
func NewInterfaceWriterSink(writer InterfaceWriter) Sinker {
	iws := InterfaceWriterSink{stream.NewHardStopChannelCloser(), stream.NewBaseIn(stream.CHAN_SLACK), writer}
	return iws
}
예제 #6
0
func NewZmqSink(addr string, highWaterMark int) sink.Sinker {
	return ZmqSink{stream.NewHardStopChannelCloser(), stream.NewBaseIn(stream.CHAN_SLACK), addr, highWaterMark}
}