Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrClosed = errors.New("[chotki] feed/drain queue is closed")
Functions ¶
This section is empty.
Types ¶
type DefaultLogger ¶
type DefaultLogger struct {
// contains filtered or unexported fields
}
func NewDefaultLogger ¶
func NewDefaultLogger(level slog.Level) *DefaultLogger
func (*DefaultLogger) Debug ¶
func (d *DefaultLogger) Debug(msg string, args ...any)
func (*DefaultLogger) Error ¶
func (d *DefaultLogger) Error(msg string, args ...any)
func (*DefaultLogger) Info ¶
func (d *DefaultLogger) Info(msg string, args ...any)
func (*DefaultLogger) Warn ¶
func (d *DefaultLogger) Warn(msg string, args ...any)
type Heap ¶
type Heap[T constraints.Ordered] struct { // contains filtered or unexported fields }
func (Heap[T]) Fix ¶
Fix re-establishes the heap ordering after the element at index i has changed its value. Changing the value of the element at index i and then calling Fix is equivalent to, but less expensive than, calling Remove(h, i) followed by a Push of the new value. The complexity is O(log n) where n = h.Len().
func (*Heap[T]) Pop ¶
func (h *Heap[T]) Pop() (min T)
Pop removes and returns the minimum element (according to Less) from the heap. The complexity is O(log n) where n = h.Len(). Pop is equivalent to Remove(h, 0).
Click to show internal directories.
Click to hide internal directories.