Vibe generated documentation
Build LinkLog Development Image / development-image (push) Successful in 38s
Build LinkLog Development Image / development-image (push) Successful in 38s
This commit is contained in:
@@ -2,18 +2,24 @@
|
||||
## SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
class BasePlugin:
|
||||
"""Define the interface shared by LinkLog event plugins."""
|
||||
|
||||
name = 'base'
|
||||
version = '1.0.0'
|
||||
enabled = True
|
||||
|
||||
def initialize(self, config=None):
|
||||
"""Apply plugin configuration and report whether initialization succeeded."""
|
||||
return True
|
||||
|
||||
def validate_config(self, config):
|
||||
"""Validate configuration and return a ``(valid, message)`` pair."""
|
||||
return True, 'ok'
|
||||
|
||||
def handle_event(self, event):
|
||||
"""Handle a LinkLog event; subclasses must provide the implementation."""
|
||||
raise NotImplementedError
|
||||
|
||||
def health_check(self):
|
||||
"""Return the plugin name and basic health status."""
|
||||
return {'name': self.name, 'status': 'ok'}
|
||||
|
||||
Reference in New Issue
Block a user