diaglog

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 13, 2026 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Overview

Package diaglog implements the sqi-worker diagnostic-log sink. It adapts a sqilog.Sink to publish each of the worker's own slog records as a protocol.DiagLogMsg on the core-NATS subject worker.diag.<workerID>.

All publishing is best-effort: marshal or publish errors are dropped. The sink performs NO slog calls — doing so would re-enter the fan-out handler and loop.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Publisher

type Publisher struct {
	// contains filtered or unexported fields
}

Publisher is a sqilog.Sink that ships worker diagnostic logs over NATS.

func New

func New(nc natsPublisher, workerID string) *Publisher

New returns a Publisher that publishes to worker.diag.<workerID>.

func (*Publisher) Emit

func (p *Publisher) Emit(r sqilog.SinkRecord)

Emit serializes r and publishes it. Errors are intentionally dropped.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL