Documentation
¶
Index ¶
- Constants
- type Exporter
- type LogDispatcher
- func (ld *LogDispatcher) Audit(actor, action, message string)
- func (ld *LogDispatcher) Close()
- func (ld *LogDispatcher) Debug(message string)
- func (ld *LogDispatcher) Emit(item LogItem)
- func (ld *LogDispatcher) Error(message string)
- func (ld *LogDispatcher) Info(message string)
- func (ld *LogDispatcher) RegisterExporter(e Exporter)
- func (ld *LogDispatcher) Subscribe(topic string, fn Subscriber)
- type LogItem
- type Subscriber
Constants ¶
View Source
const TopicAll = "all"
TopicAll receives every log event.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LogDispatcher ¶
type LogDispatcher struct {
// contains filtered or unexported fields
}
LogDispatcher manages the async pub/sub pipeline and cryptographic compilation engine.
func NewLogDispatcher ¶
func NewLogDispatcher(serviceName string, bufferSize int, sdf *secure_data_format.SecureDataEngine) (*LogDispatcher, error)
NewLogDispatcher initializes the pub/sub logging system backed by the SDF compiler core.
func (*LogDispatcher) Audit ¶
func (ld *LogDispatcher) Audit(actor, action, message string)
func (*LogDispatcher) Close ¶
func (ld *LogDispatcher) Close()
func (*LogDispatcher) Debug ¶
func (ld *LogDispatcher) Debug(message string)
func (*LogDispatcher) Emit ¶ added in v1.0.3
func (ld *LogDispatcher) Emit(item LogItem)
Emit records a fully specified log item. Service is preserved when set, otherwise the dispatcher's default service name is used.
func (*LogDispatcher) Error ¶
func (ld *LogDispatcher) Error(message string)
func (*LogDispatcher) Info ¶
func (ld *LogDispatcher) Info(message string)
func (*LogDispatcher) RegisterExporter ¶
func (ld *LogDispatcher) RegisterExporter(e Exporter)
RegisterExporter adds a new destination (e.g., SIEM, RPC) to the dispatcher.
func (*LogDispatcher) Subscribe ¶ added in v1.0.3
func (ld *LogDispatcher) Subscribe(topic string, fn Subscriber)
type LogItem ¶
type LogItem struct {
Timestamp int64 `json:"timestamp"`
Level string `json:"level"`
Message string `json:"message"`
Service string `json:"service"`
Actor string `json:"actor,omitempty"`
Action string `json:"action,omitempty"`
Token string `json:"token,omitempty"` // Cryptographic SDF signature token envelope
}
LogItem represents a cryptographically wrapped structured log entry.
type Subscriber ¶ added in v1.0.3
type Subscriber func(LogItem)
Subscriber receives published log items for a topic.
Click to show internal directories.
Click to hide internal directories.