Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
Controller handles log queue messages. It consumes request log entries and persists them to storage. Implements consumer.Controller interface for integration with the consumer.
The request log is written exclusively by the gateway: other services (e.g. the orchestrator) only publish log entries to the log topic, and this controller is the single consumer that persists them to storage.
func NewController ¶
func NewController( logger *zap.SugaredLogger, scope tally.Scope, store storage.Storage, topicKey consumer.TopicKey, consumerGroup string, ) *Controller
NewController creates a new log controller for the gateway.
func (*Controller) ConsumerGroup ¶
func (c *Controller) ConsumerGroup() string
ConsumerGroup returns the consumer group for offset tracking.
func (*Controller) Name ¶
func (c *Controller) Name() string
Name returns the controller name for logging and metrics.
func (*Controller) Process ¶
Process processes a log delivery from the queue. Deserializes the request log entry and persists it to storage. Returns nil to ack (success), or error to nack (retry).
func (*Controller) TopicKey ¶
func (c *Controller) TopicKey() consumer.TopicKey
TopicKey returns the topic key this controller subscribes to.