v0.3.10 config auto-save added, dependency update, limiter packages refactored

This commit is contained in:
2025-09-01 16:16:52 -04:00
parent 3c74a6336e
commit fce6ee5c65
32 changed files with 309 additions and 181 deletions

View File

@ -10,15 +10,15 @@ import (
"sync/atomic"
"time"
"logwisp/src/internal/core"
"logwisp/src/internal/format"
"logwisp/src/internal/source"
"github.com/lixenwraith/log"
)
// TCPClientSink forwards log entries to a remote TCP endpoint
type TCPClientSink struct {
input chan source.LogEntry
input chan core.LogEntry
config TCPClientConfig
conn net.Conn
connMu sync.RWMutex
@ -104,7 +104,7 @@ func NewTCPClientSink(options map[string]any, logger *log.Logger, formatter form
}
t := &TCPClientSink{
input: make(chan source.LogEntry, cfg.BufferSize),
input: make(chan core.LogEntry, cfg.BufferSize),
config: cfg,
done: make(chan struct{}),
startTime: time.Now(),
@ -117,7 +117,7 @@ func NewTCPClientSink(options map[string]any, logger *log.Logger, formatter form
return t, nil
}
func (t *TCPClientSink) Input() chan<- source.LogEntry {
func (t *TCPClientSink) Input() chan<- core.LogEntry {
return t.input
}
@ -345,7 +345,7 @@ func (t *TCPClientSink) processLoop(ctx context.Context) {
}
}
func (t *TCPClientSink) sendEntry(entry source.LogEntry) error {
func (t *TCPClientSink) sendEntry(entry core.LogEntry) error {
// Get current connection
t.connMu.RLock()
conn := t.conn