class Obsctl::Server::BestEffortLogBroadcast

Overview

Bounded best-effort fanout for secondary diagnostic log-topic delivery.

Runtime logging is intentionally outside this helper. Callers should write durable diagnostics before offering entries here.

Defined in:

obsctl/server/best_effort_log_broadcast.cr

Constant Summary

DEFAULT_CAPACITY = 4

Constructors

Instance Method Summary

Constructor Detail

def self.new(broadcast : Proc(JSON::Any, Nil), capacity : Int32 = DEFAULT_CAPACITY) #

[View source]

Instance Method Detail

def broadcast(entry : JSON::Any) : Bool #

Offers a diagnostic log-topic entry for asynchronous delivery.

Returns false without spawning work when the outstanding delivery bound has already been reached.


[View source]
def capacity : Int32 #

[View source]
def dropped_count : UInt64 #

Number of diagnostic entries dropped because the helper was at capacity.


[View source]
def outstanding : Int32 #

Number of diagnostic deliveries currently accepted but not finished.


[View source]