Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type StackCache ¶
type StackCache struct {
// contains filtered or unexported fields
}
func NewStackCache ¶
func NewStackCache(maxLen int) *StackCache
NewStackCache returns a new StackCache, ready to use
func (*StackCache) Append ¶
func (c *StackCache) Append(entry *tb.Message)
Append adds an entry to the cache, if the cache is already full, then the oldest (first) entry in the cache is evicted before appending.
func (*StackCache) LoggerUpdate ¶
func (c *StackCache) LoggerUpdate(logger *logrus.Entry) *logrus.Entry
Logger computes some values about the StackCache, fills them into the fields then returns a logger
func (*StackCache) Pop ¶
func (c *StackCache) Pop() (*tb.Message, error)
Pop is a wrapper around pop purely for mutex locking
func (*StackCache) Read ¶
func (c *StackCache) Read() []*tb.Message
Read uses a RLock to return the contents of the StackCache
Click to show internal directories.
Click to hide internal directories.