Documentation ¶
Index ¶
- Variables
- type DefaultLogger
- func (d *DefaultLogger) Debug(msg string, args ...any)
- func (d *DefaultLogger) DebugCtx(ctx context.Context, msg string, args ...any)
- func (d *DefaultLogger) Error(msg string, args ...any)
- func (d *DefaultLogger) ErrorCtx(ctx context.Context, msg string, args ...any)
- func (d *DefaultLogger) Info(msg string, args ...any)
- func (d *DefaultLogger) InfoCtx(ctx context.Context, msg string, args ...any)
- func (d *DefaultLogger) Warn(msg string, args ...any)
- func (d *DefaultLogger) WarnCtx(ctx context.Context, msg string, args ...any)
- func (d *DefaultLogger) WithArgsFromCtx(ctx, lctx context.Context) context.Context
- func (d *DefaultLogger) WithDefaultArgs(ctx context.Context, args ...any) context.Context
- type FDQueue
- type Heap
- type Logger
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultArgs int
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) DebugCtx ¶
func (d *DefaultLogger) DebugCtx(ctx context.Context, msg string, args ...any)
func (*DefaultLogger) Error ¶
func (d *DefaultLogger) Error(msg string, args ...any)
func (*DefaultLogger) ErrorCtx ¶
func (d *DefaultLogger) ErrorCtx(ctx context.Context, msg string, args ...any)
func (*DefaultLogger) Info ¶
func (d *DefaultLogger) Info(msg string, args ...any)
func (*DefaultLogger) InfoCtx ¶
func (d *DefaultLogger) InfoCtx(ctx context.Context, msg string, args ...any)
func (*DefaultLogger) Warn ¶
func (d *DefaultLogger) Warn(msg string, args ...any)
func (*DefaultLogger) WarnCtx ¶
func (d *DefaultLogger) WarnCtx(ctx context.Context, msg string, args ...any)
func (*DefaultLogger) WithArgsFromCtx ¶
func (d *DefaultLogger) WithArgsFromCtx(ctx, lctx context.Context) context.Context
func (*DefaultLogger) WithDefaultArgs ¶
type FDQueue ¶
type FDQueue[S ~[]E, E any] struct { // contains filtered or unexported fields }
func NewFDQueue ¶
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).
type Logger ¶
type Logger interface { Debug(msg string, args ...any) Info(msg string, args ...any) Warn(msg string, args ...any) Error(msg string, args ...any) DebugCtx(ctx context.Context, msg string, args ...any) InfoCtx(ctx context.Context, msg string, args ...any) WarnCtx(ctx context.Context, msg string, args ...any) ErrorCtx(ctx context.Context, msg string, args ...any) WithDefaultArgs(ctx context.Context, args ...any) context.Context WithArgsFromCtx(ctx, lctx context.Context) context.Context }
Click to show internal directories.
Click to hide internal directories.