mirror of
https://github.com/empayre/fleet.git
synced 2024-11-07 01:15:22 +00:00
969d5f25af
Adds Google Cloud PubSub logging for status and results. This also changes the Write interface for logging modules to add a context.Context (only used by pubsub currently).
15 lines
351 B
Go
15 lines
351 B
Go
package kolide
|
|
|
|
import (
|
|
"context"
|
|
"encoding/json"
|
|
)
|
|
|
|
// JSONLogger defines an interface for loggers that can write JSON to various
|
|
// output sources.
|
|
type JSONLogger interface {
|
|
// Write writes the JSON log entries to the appropriate destination,
|
|
// returning any errors that occurred.
|
|
Write(ctx context.Context, logs []json.RawMessage) error
|
|
}
|