aboutsummaryrefslogtreecommitdiff
path: root/weed/util/log_buffer/log_buffer.go
diff options
context:
space:
mode:
authorchrislu <chris.lu@gmail.com>2024-03-16 10:51:47 -0700
committerchrislu <chris.lu@gmail.com>2024-03-16 10:51:47 -0700
commit529fa8c4c86170b8a2b581bf4e84471e45cc858d (patch)
treec6fd25a44ee3d2d6063457b377373e345378b340 /weed/util/log_buffer/log_buffer.go
parent059df3957ddaa37fbfc0e84b2fd63811fec46bee (diff)
downloadseaweedfs-529fa8c4c86170b8a2b581bf4e84471e45cc858d.tar.xz
seaweedfs-529fa8c4c86170b8a2b581bf4e84471e45cc858d.zip
go fmt
Diffstat (limited to 'weed/util/log_buffer/log_buffer.go')
-rw-r--r--weed/util/log_buffer/log_buffer.go30
1 files changed, 15 insertions, 15 deletions
diff --git a/weed/util/log_buffer/log_buffer.go b/weed/util/log_buffer/log_buffer.go
index 02d2a6579..64abc67ff 100644
--- a/weed/util/log_buffer/log_buffer.go
+++ b/weed/util/log_buffer/log_buffer.go
@@ -27,24 +27,24 @@ type LogFlushFuncType func(logBuffer *LogBuffer, startTime, stopTime time.Time,
type LogReadFromDiskFuncType func(startPosition MessagePosition, stopTsNs int64, eachLogEntryFn EachLogEntryFuncType) (lastReadPosition MessagePosition, isDone bool, err error)
type LogBuffer struct {
- LastFlushTsNs int64
- name string
- prevBuffers *SealedBuffers
- buf []byte
- batchIndex int64
- idx []int
- pos int
- startTime time.Time
+ LastFlushTsNs int64
+ name string
+ prevBuffers *SealedBuffers
+ buf []byte
+ batchIndex int64
+ idx []int
+ pos int
+ startTime time.Time
stopTime time.Time
lastFlushDataTime time.Time
sizeBuf []byte
- flushInterval time.Duration
- flushFn LogFlushFuncType
- ReadFromDiskFn LogReadFromDiskFuncType
- notifyFn func()
- isStopping *atomic.Bool
- flushChan chan *dataToFlush
- lastTsNs int64
+ flushInterval time.Duration
+ flushFn LogFlushFuncType
+ ReadFromDiskFn LogReadFromDiskFuncType
+ notifyFn func()
+ isStopping *atomic.Bool
+ flushChan chan *dataToFlush
+ lastTsNs int64
sync.RWMutex
}