Mirror of https://github.com/roostorg/osprey github.com/roostorg/osprey
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

at de6347c31c28038597016d3db545507f4e9b2cc7 26 lines 910 B view raw
1from typing import Any, Sequence, Type 2 3from osprey.engine.udf.base import UDFBase 4from osprey.worker.adaptor.plugin_manager import hookimpl_osprey 5from osprey.worker.lib.config import Config 6from osprey.worker.lib.storage.labels import LabelsServiceBase 7from osprey.worker.sinks.sink.output_sink import BaseOutputSink, StdoutOutputSink 8from services.labels_service import PostgresLabelsService 9from udfs.ban_user import BanUser 10from udfs.text_contains import TextContains 11 12 13@hookimpl_osprey 14def register_udfs() -> Sequence[Type[UDFBase[Any, Any]]]: 15 return [TextContains, BanUser] 16 17 18@hookimpl_osprey 19def register_output_sinks(config: Config) -> Sequence[BaseOutputSink]: 20 return [StdoutOutputSink(log_sampler=None)] 21 22 23@hookimpl_osprey 24def register_labels_service_or_provider(config: Config) -> LabelsServiceBase: 25 """Register a PostgreSQL-backed labels service.""" 26 return PostgresLabelsService()