Documentation ¶
Index ¶
- type BackpressureBuffer
- func (p BackpressureBuffer) Close() error
- func (p BackpressureBuffer) Flush() error
- func (p BackpressureBuffer) GetAvgWriteDuration() time.Duration
- func (p BackpressureBuffer) IsLowLatencySupported() bool
- func (p BackpressureBuffer) LogLevelWrite(level insolar.LogLevel, b []byte) (n int, err error)
- func (p BackpressureBuffer) LowLatencyWrite(level insolar.LogLevel, b []byte) (n int, err error)
- func (p BackpressureBuffer) SetAvgWriteDuration(d time.Duration)
- func (p *BackpressureBuffer) StartWorker(ctx context.Context) *BackpressureBuffer
- func (p BackpressureBuffer) Write(b []byte) (n int, err error)
- type BackpressureBufferFlags
- type FatalDirectWriter
- func (p *FatalDirectWriter) Close() error
- func (p *FatalDirectWriter) Flush() error
- func (p *FatalDirectWriter) IsLowLatencySupported() bool
- func (p *FatalDirectWriter) LogLevelWrite(level insolar.LogLevel, b []byte) (n int, err error)
- func (p *FatalDirectWriter) LowLatencyWrite(level insolar.LogLevel, b []byte) (int, error)
- func (p *FatalDirectWriter) Write(b []byte) (n int, err error)
- type MissedEventFunc
- type ProxyLoggerOutput
- func (p *ProxyLoggerOutput) Close() error
- func (p *ProxyLoggerOutput) Flush() error
- func (p *ProxyLoggerOutput) GetTarget() insolar.LoggerOutput
- func (p *ProxyLoggerOutput) IsLowLatencySupported() bool
- func (p *ProxyLoggerOutput) LogLevelWrite(level insolar.LogLevel, b []byte) (int, error)
- func (p *ProxyLoggerOutput) LowLatencyWrite(level insolar.LogLevel, b []byte) (int, error)
- func (p *ProxyLoggerOutput) SetTarget(t insolar.LoggerOutput)
- func (p *ProxyLoggerOutput) Write(b []byte) (n int, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BackpressureBuffer ¶
type BackpressureBuffer struct {
// contains filtered or unexported fields
}
Provides weak-reference behavior to enable auto-stop of workers
func NewBackpressureBuffer ¶
func NewBackpressureBuffer(output *logoutput.Adapter, bufSize int, maxParWrites uint8, flags BackpressureBufferFlags, missFn MissedEventFunc, ) *BackpressureBuffer
func NewBackpressureBufferWithBypass ¶
func NewBackpressureBufferWithBypass(output *logoutput.Adapter, bufSize int, maxParWrites uint8, flags BackpressureBufferFlags, missFn MissedEventFunc, ) *BackpressureBuffer
func (BackpressureBuffer) Flush ¶
func (p BackpressureBuffer) Flush() error
NB! Flush() may NOT be able to clean up whole buffer when there are too many pending writers
func (BackpressureBuffer) GetAvgWriteDuration ¶
func (BackpressureBuffer) IsLowLatencySupported ¶
func (p BackpressureBuffer) IsLowLatencySupported() bool
func (BackpressureBuffer) LogLevelWrite ¶
func (BackpressureBuffer) LowLatencyWrite ¶
func (BackpressureBuffer) SetAvgWriteDuration ¶
func (*BackpressureBuffer) StartWorker ¶
func (p *BackpressureBuffer) StartWorker(ctx context.Context) *BackpressureBuffer
The buffer requires a worker to scrap the buffer. Multiple workers are ok, but aren't necessary. Start of the worker will also attach a finalizer to the buffer.
type BackpressureBufferFlags ¶
type BackpressureBufferFlags uint8
const ( // Buffer content will not be flushed on fatal, instead a "missing X" message will be added. BufferDropOnFatal BackpressureBufferFlags = 1 << iota // Buffer may apply additional delay to writes done into a queue to equalize timings. // This mode requires either BufferTrackWriteDuration flag or use of SetAvgWriteDuration() externally. // This flag has no effect when bufferBypassForRegular is set. BufferWriteDelayFairness // With this flag the buffer will update GetAvgWriteDuration with every regular write. BufferTrackWriteDuration // When a worker is started, but all links to BackpressureBuffer were lost, then the worker will be stopped. // And with this flag present, the buffer (and its underlying output) will also be closed. BufferCloseOnStop // USE WITH CAUTION! This flag enables to use argument of Write([]byte) outside of the call. // This is AGAINST existing conventions and MUST ONLY be used when a writer's code is proprietary and never reuses the argument. BufferReuse )
type FatalDirectWriter ¶
type FatalDirectWriter struct {
// contains filtered or unexported fields
}
func NewFatalDirectWriter ¶
func NewFatalDirectWriter(output *logoutput.Adapter) *FatalDirectWriter
func (*FatalDirectWriter) Close ¶
func (p *FatalDirectWriter) Close() error
func (*FatalDirectWriter) Flush ¶
func (p *FatalDirectWriter) Flush() error
func (*FatalDirectWriter) IsLowLatencySupported ¶
func (p *FatalDirectWriter) IsLowLatencySupported() bool
func (*FatalDirectWriter) LogLevelWrite ¶
func (*FatalDirectWriter) LowLatencyWrite ¶
type ProxyLoggerOutput ¶
type ProxyLoggerOutput struct {
// contains filtered or unexported fields
}
func (*ProxyLoggerOutput) Close ¶
func (p *ProxyLoggerOutput) Close() error
func (*ProxyLoggerOutput) Flush ¶
func (p *ProxyLoggerOutput) Flush() error
func (*ProxyLoggerOutput) GetTarget ¶
func (p *ProxyLoggerOutput) GetTarget() insolar.LoggerOutput
func (*ProxyLoggerOutput) IsLowLatencySupported ¶
func (p *ProxyLoggerOutput) IsLowLatencySupported() bool
func (*ProxyLoggerOutput) LogLevelWrite ¶
func (*ProxyLoggerOutput) LowLatencyWrite ¶
func (*ProxyLoggerOutput) SetTarget ¶
func (p *ProxyLoggerOutput) SetTarget(t insolar.LoggerOutput)
Click to show internal directories.
Click to hide internal directories.