Something went wrong. Try again.
Mirrored from GitHub github.com/roostorg/osprey
Something went wrong. Try again.
937 B · 27 lines
Python
at commit ce4e6960
12345678910111213141516171819202122232425262728from collections.abc import Sequencefrom typing import Any, Type
from osprey.engine.udf.base import UDFBasefrom osprey.worker.adaptor.plugin_manager import hookimpl_ospreyfrom osprey.worker.lib.config import Configfrom osprey.worker.lib.storage.labels import LabelsServiceBasefrom osprey.worker.sinks.sink.output_sink import BaseOutputSink, StdoutOutputSinkfrom services.labels_service import PostgresLabelsServicefrom udfs.ban_user import BanUserfrom udfs.text_contains import TextContains
@hookimpl_ospreydef register_udfs() -> Sequence[Type[UDFBase[Any, Any]]]: return [TextContains, BanUser]
@hookimpl_ospreydef register_output_sinks(config: Config) -> Sequence[BaseOutputSink]: return [StdoutOutputSink(log_sampler=None)]
@hookimpl_ospreydef register_labels_service_or_provider(config: Config) -> LabelsServiceBase: """Register a PostgreSQL-backed labels service.""" return PostgresLabelsService()