Documentation
¶
Index ¶
- Variables
- type CollectorMock
- func (collector *CollectorMock) DeleteThrottlingDelay(_, _, _ string) bool
- func (collector *CollectorMock) IncrementHTTPRequestCount(_, _, _, _, _ string, _ int)
- func (collector *CollectorMock) IncrementHTTPRequestsTotalCount(_ string)
- func (collector *CollectorMock) IncrementLogMessageCount(_, _, _ string)
- func (collector *CollectorMock) IncrementThrottlingDelay(_, _, _ string, _ float64)
- func (collector *CollectorMock) ObserveHTTPRequestTime(_, _, _, _, _ string, _ float64)
- func (collector *CollectorMock) ObserveHTTPUpstreamResponseTimeTotal(_, _, _, _, _ string, _ float64)
- func (collector *CollectorMock) Retrieve() error
- type LineReaderMock
- func (reader *LineReaderMock) Close() error
- func (reader *LineReaderMock) EntryRead() ([]byte, bool, error)
- func (reader *LineReaderMock) GetAcquireFlag() bool
- func (reader *LineReaderMock) GetCursor() *readers.Cursor
- func (reader *LineReaderMock) GetPrefixFlag() bool
- func (reader *LineReaderMock) SetAcquireFlag(flag bool)
- func (reader *LineReaderMock) SetCursor(cursor *readers.Cursor)
- func (reader *LineReaderMock) SetPrefixFlag(flag bool)
- func (reader *LineReaderMock) SetReturnErrorFlag(flag bool)
- type ReaderJournaldMock
- type SLIMock
- type WorkerFollowerMock
- type WorkerJournaldMock
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrorClosed = errors.New("not acquired")
Functions ¶
This section is empty.
Types ¶
type CollectorMock ¶
type CollectorMock struct{}
CollectorMock for metrics manipulating object
func NewCollectorMock ¶
func NewCollectorMock() *CollectorMock
func (*CollectorMock) DeleteThrottlingDelay ¶
func (collector *CollectorMock) DeleteThrottlingDelay(_, _, _ string) bool
func (*CollectorMock) IncrementHTTPRequestCount ¶
func (collector *CollectorMock) IncrementHTTPRequestCount(_, _, _, _, _ string, _ int)
func (*CollectorMock) IncrementHTTPRequestsTotalCount ¶
func (collector *CollectorMock) IncrementHTTPRequestsTotalCount(_ string)
func (*CollectorMock) IncrementLogMessageCount ¶
func (collector *CollectorMock) IncrementLogMessageCount(_, _, _ string)
func (*CollectorMock) IncrementThrottlingDelay ¶
func (collector *CollectorMock) IncrementThrottlingDelay(_, _, _ string, _ float64)
func (*CollectorMock) ObserveHTTPRequestTime ¶
func (collector *CollectorMock) ObserveHTTPRequestTime(_, _, _, _, _ string, _ float64)
func (*CollectorMock) ObserveHTTPUpstreamResponseTimeTotal ¶
func (collector *CollectorMock) ObserveHTTPUpstreamResponseTimeTotal(_, _, _, _, _ string, _ float64)
func (*CollectorMock) Retrieve ¶
func (collector *CollectorMock) Retrieve() error
type LineReaderMock ¶
type LineReaderMock struct { Entries [][]byte // contains filtered or unexported fields }
LineReaderMock is mock for readers with byte ReaderJournald interface
func NewLineReaderMock ¶
func NewLineReaderMock(entries ...[]byte) *LineReaderMock
func (*LineReaderMock) Close ¶
func (reader *LineReaderMock) Close() error
func (*LineReaderMock) GetAcquireFlag ¶
func (reader *LineReaderMock) GetAcquireFlag() bool
func (*LineReaderMock) GetCursor ¶
func (reader *LineReaderMock) GetCursor() *readers.Cursor
GetCursor should be used to get current reader in-memory cursor
func (*LineReaderMock) GetPrefixFlag ¶
func (reader *LineReaderMock) GetPrefixFlag() bool
func (*LineReaderMock) SetAcquireFlag ¶
func (reader *LineReaderMock) SetAcquireFlag(flag bool)
func (*LineReaderMock) SetCursor ¶
func (reader *LineReaderMock) SetCursor(cursor *readers.Cursor)
func (*LineReaderMock) SetPrefixFlag ¶
func (reader *LineReaderMock) SetPrefixFlag(flag bool)
func (*LineReaderMock) SetReturnErrorFlag ¶
func (reader *LineReaderMock) SetReturnErrorFlag(flag bool)
type ReaderJournaldMock ¶
type ReaderJournaldMock struct { Entries []common.EntryMap // contains filtered or unexported fields }
ReaderJournaldMock mocks specific sdjournal based reader with EntryMap reader interface
func NewReaderJournaldMock ¶
func NewReaderJournaldMock(entries ...common.EntryMap) *ReaderJournaldMock
func (*ReaderJournaldMock) Close ¶
func (reader *ReaderJournaldMock) Close() error
func (*ReaderJournaldMock) EntryRead ¶
func (reader *ReaderJournaldMock) EntryRead() (common.EntryMap, error)
func (*ReaderJournaldMock) GetAcquireFlag ¶
func (reader *ReaderJournaldMock) GetAcquireFlag() bool
func (*ReaderJournaldMock) GetCursor ¶
func (reader *ReaderJournaldMock) GetCursor() string
type SLIMock ¶
type SLIMock struct {
// contains filtered or unexported fields
}
SLIMock is stub for testing purposes
type WorkerFollowerMock ¶
type WorkerFollowerMock struct {
// contains filtered or unexported fields
}
func (*WorkerFollowerMock) GetActiveFlag ¶
func (w *WorkerFollowerMock) GetActiveFlag() bool
func (*WorkerFollowerMock) SetEOFShutdownFlag ¶
func (w *WorkerFollowerMock) SetEOFShutdownFlag()
func (*WorkerFollowerMock) Start ¶
func (w *WorkerFollowerMock) Start(ctx context.Context)
func (*WorkerFollowerMock) Stop ¶
func (w *WorkerFollowerMock) Stop()
type WorkerJournaldMock ¶
type WorkerJournaldMock struct { }
func (*WorkerJournaldMock) Start ¶
func (w *WorkerJournaldMock) Start(ctx context.Context)
Click to show internal directories.
Click to hide internal directories.