v0.13.1 folder restructure, test script added, format adapter async fix
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
package core
|
||||
|
||||
// Capability represents a plugin feature
|
||||
type Capability string
|
||||
|
||||
const (
|
||||
// Network capabilities
|
||||
CapNetLimit Capability = "netlimit"
|
||||
CapTLS Capability = "tls"
|
||||
CapAuth Capability = "auth"
|
||||
|
||||
// Session capabilities
|
||||
CapSessionAware Capability = "session_aware"
|
||||
CapMultiSession Capability = "multi_session"
|
||||
CapSingleInstance Capability = "single_instance"
|
||||
|
||||
// Stream capabilities
|
||||
CapBidirectional Capability = "bidirectional"
|
||||
CapCompression Capability = "compression"
|
||||
)
|
||||
@@ -0,0 +1,29 @@
|
||||
package core
|
||||
|
||||
import (
|
||||
"time"
|
||||
)
|
||||
|
||||
const (
|
||||
MaxLogEntryBytes = 1024 * 1024
|
||||
|
||||
FileWatcherPollInterval = 100 * time.Millisecond
|
||||
|
||||
SessionDefaultMaxIdleTime = 30 * time.Minute
|
||||
|
||||
SessionCleanupInterval = 5 * time.Minute
|
||||
|
||||
ServiceStatsUpdateInterval = 1 * time.Second
|
||||
|
||||
ShutdownTimeout = 10 * time.Second
|
||||
|
||||
ConfigReloadTimeout = 30 * time.Second
|
||||
|
||||
LoggerShutdownTimeout = 2 * time.Second
|
||||
|
||||
ReloadWatchPollInterval = time.Second
|
||||
|
||||
ReloadWatchDebounce = 500 * time.Millisecond
|
||||
|
||||
ReloadWatchTimeout = 30 * time.Second
|
||||
)
|
||||
@@ -0,0 +1,27 @@
|
||||
package core
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"time"
|
||||
)
|
||||
|
||||
// LogEntry represents a single log record flowing through the pipeline
|
||||
type LogEntry struct {
|
||||
Time time.Time `json:"time"`
|
||||
Node string `json:"node,omitempty"` // origin node identity for chained topologies; first hop stamps, relays preserve
|
||||
Source string `json:"source"`
|
||||
Level string `json:"level,omitempty"`
|
||||
Message string `json:"message"`
|
||||
Fields json.RawMessage `json:"fields,omitempty"`
|
||||
RawSize int64 `json:"-"`
|
||||
}
|
||||
|
||||
// TransportEvent contains the final payload and minimal metadata needed by sinks
|
||||
type TransportEvent struct {
|
||||
Time time.Time
|
||||
// Formatted, serialized log payload
|
||||
Payload []byte
|
||||
// Structured entry for re-serializing sinks (chain links). Zero Time => absent
|
||||
Entry LogEntry
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user