Documentation
¶
Overview ¶
Package serveradapter provides adapter types that bridge the server's activity, alert, and event subsystems to the interfaces consumed by the scanning and manualops packages.
Index ¶
- type ActivityAdapter
- func (a *ActivityAdapter) End(id string)
- func (a *ActivityAdapter) Fail(id string)
- func (a *ActivityAdapter) IsCancelled(id string) bool
- func (a *ActivityAdapter) Progress(id string, current, total int, msg string)
- func (a *ActivityAdapter) SetQueued(id string, queued bool)
- func (a *ActivityAdapter) Start(action, detail string, source activity.ActivitySource) string
- type AlertAdapter
- type ManualEventAdapter
- type ScanEventAdapter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActivityAdapter ¶
ActivityAdapter bridges activity.Log to scanning.ActivityTracker and manualops.ActivityTracker (superset of methods).
func (*ActivityAdapter) End ¶
func (a *ActivityAdapter) End(id string)
func (*ActivityAdapter) Fail ¶
func (a *ActivityAdapter) Fail(id string)
func (*ActivityAdapter) IsCancelled ¶
func (a *ActivityAdapter) IsCancelled(id string) bool
func (*ActivityAdapter) Progress ¶
func (a *ActivityAdapter) Progress(id string, current, total int, msg string)
func (*ActivityAdapter) SetQueued ¶
func (a *ActivityAdapter) SetQueued(id string, queued bool)
func (*ActivityAdapter) Start ¶
func (a *ActivityAdapter) Start(action, detail string, source activity.ActivitySource) string
type AlertAdapter ¶
AlertAdapter bridges activity.AlertLog to scanning.AlertRecorder and activity.WarnRecorder (superset of methods).
func (*AlertAdapter) Record ¶
func (a *AlertAdapter) Record(category, msg string)
func (*AlertAdapter) RecordInfo ¶
func (a *AlertAdapter) RecordInfo(msg string)
func (*AlertAdapter) RecordStoreWriteError ¶ added in v0.1.54
func (a *AlertAdapter) RecordStoreWriteError(err error)
RecordStoreWriteError checks whether the error indicates a disk-full or unrecoverable I/O condition and raises a persistent alert so operators are notified before the system crash-loops. Non-disk-full write errors are logged at ERROR level with a distinctive message for Loki/Alertmanager matching.
func (*AlertAdapter) RecordWarn ¶
func (a *AlertAdapter) RecordWarn(source, msg string)
type ManualEventAdapter ¶
ManualEventAdapter bridges events.EventBus to manualops.EventPublisher.
func (*ManualEventAdapter) PublishCoverageUpdate ¶
func (a *ManualEventAdapter) PublishCoverageUpdate(mediaType api.MediaType, mediaID, language, source, path string)
func (*ManualEventAdapter) PublishNotify ¶
func (a *ManualEventAdapter) PublishNotify(level events.NotifyLevel, text string)
type ScanEventAdapter ¶
ScanEventAdapter bridges events.EventBus to scanning.EventPublisher.
func (*ScanEventAdapter) PublishCoverageUpdate ¶
func (a *ScanEventAdapter) PublishCoverageUpdate(mediaType api.MediaType, mediaID string)
func (*ScanEventAdapter) PublishScanDone ¶
func (a *ScanEventAdapter) PublishScanDone(action, detail string, source activity.ActivitySource, ok bool)
func (*ScanEventAdapter) PublishScanStart ¶
func (a *ScanEventAdapter) PublishScanStart(action, detail string, source activity.ActivitySource)