Something went wrong. Try again.
Mirrored from GitHub github.com/roostorg/osprey
Something went wrong. Try again.
910 B · 26 lines
Python
at commit ff3fbced
123456789101112131415161718192021222324252627from typing import Any, Sequence, 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()