mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
Empty classes for reporting
This commit is contained in:
parent
ff5d855389
commit
f3afd74dc5
2 changed files with 20 additions and 0 deletions
13
src/spectator/reporters/broadcast_reporter.cr
Normal file
13
src/spectator/reporters/broadcast_reporter.cr
Normal file
|
@ -0,0 +1,13 @@
|
|||
require "./reporter"
|
||||
|
||||
module Spectator::Reporters
|
||||
# Reports events to multiple other reporters.
|
||||
# Events received by this reporter will be sent to others.
|
||||
class BroadcastReporter < Reporter
|
||||
# Creates the broadcast reporter.
|
||||
# Takes a collection of reporters to pass events along to.
|
||||
def initialize(reporters : Enumerable(Reporter))
|
||||
@reporters = reporters.to_a
|
||||
end
|
||||
end
|
||||
end
|
7
src/spectator/reporters/reporter.cr
Normal file
7
src/spectator/reporters/reporter.cr
Normal file
|
@ -0,0 +1,7 @@
|
|||
module Spectator::Reporters
|
||||
# Base class and interface used to notify systems of events.
|
||||
# This is typically used for producing output from test results,
|
||||
# but can also be used to send data to external systems.
|
||||
abstract class Reporter
|
||||
end
|
||||
end
|
Loading…
Reference in a new issue