Documentation
¶
Overview ¶
Package factory wires concrete dependencies for the go-version-watcher binary.
Index ¶
- func CreateKafkaCompleteSender(syncProducer libkafka.SyncProducer, topicPrefix base.TopicPrefix, ...) task.CompleteCommandSender
- func CreateKafkaNotificationSender(ctx context.Context, syncProducer libkafka.SyncProducer, ...) notification.NotificationPublishCommandSender
- func CreateKafkaSender(syncProducer libkafka.SyncProducer, topicPrefix base.TopicPrefix, ...) task.CreateCommandSender
- func CreateWatcher(httpClient *http.Client, sender task.CreateCommandSender, ...) pkg.Watcher
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateKafkaCompleteSender ¶ added in v0.11.0
func CreateKafkaCompleteSender( syncProducer libkafka.SyncProducer, topicPrefix base.TopicPrefix, defaultVault string, ) task.CompleteCommandSender
CreateKafkaCompleteSender constructs a typed complete-task command sender backed by the same Kafka sync producer used for task creation. defaultVault is the Obsidian vault slug substituted into each command's TargetVault when unset (empty = controller default, openclaw).
This is how a one-shot Job closes its own check task: the executor passes the task's identifier as TASK_ID, and a succeeded Job that leaves its task open is suppressed then parked at human_review instead of reaching a terminal state.
func CreateKafkaNotificationSender ¶ added in v0.8.0
func CreateKafkaNotificationSender( ctx context.Context, syncProducer libkafka.SyncProducer, topicPrefix base.TopicPrefix, ) notification.NotificationPublishCommandSender
CreateKafkaNotificationSender constructs a typed notification-publish command sender backed by the same Kafka sync producer used for task commands. The CDB sender derives the topic ({branch}-core-notification-v1-request) from core.NotificationV1SchemaID + topicPrefix. ctx feeds the request-ID channel so downstream cancellation propagates.
func CreateKafkaSender ¶
func CreateKafkaSender( syncProducer libkafka.SyncProducer, topicPrefix base.TopicPrefix, defaultVault string, ) task.CreateCommandSender
CreateKafkaSender constructs a typed create-task command sender backed by a Kafka sync producer. defaultVault is the Obsidian vault slug substituted into each command's TargetVault when unset (empty = controller default, openclaw).
func CreateWatcher ¶
func CreateWatcher( httpClient *http.Client, sender task.CreateCommandSender, notificationSender notification.NotificationPublishCommandSender, cursorPath string, metrics pkg.Metrics, cfg pkg.TaskConfig, seedVersion string, ) pkg.Watcher
CreateWatcher wires all dependencies and returns a ready-to-use Watcher.
Pure composition — no I/O. The Kafka sync producer and the task sender are constructed by the caller (so it controls connection lifecycle + cleanup).
Types ¶
This section is empty.