示例#1
0
func NewDumpSink(appId string, bufferSize int, givenLogger *gosteno.Logger) *DumpSink {
	inputChan := make(chan *logmessage.Message)
	dumpSink := &DumpSink{
		appId:         appId,
		logger:        givenLogger,
		inputChan:     inputChan,
		messageBuffer: buffer.NewDumpableRingBuffer(inputChan, bufferSize),
	}
	return dumpSink
}
示例#2
0
func NewDumpSink(appId string, bufferSize int, givenLogger *gosteno.Logger, timeoutChan chan Sink, inactivityDuration time.Duration) *DumpSink {
	inputChan := make(chan *logmessage.Message)
	passThruChan := make(chan *logmessage.Message)
	dumpChan := make(chan chan []*logmessage.Message)

	dumpSink := &DumpSink{
		appId:              appId,
		logger:             givenLogger,
		inputChan:          inputChan,
		passThruChan:       passThruChan,
		messageBuffer:      buffer.NewDumpableRingBuffer(passThruChan, bufferSize),
		dumpChan:           dumpChan,
		timeoutChan:        timeoutChan,
		inactivityDuration: inactivityDuration,
	}
	return dumpSink
}