mirror of
https://github.com/yusing/godoxy.git
synced 2026-04-25 02:09:01 +02:00
feat(acl): connection level ip/geo blocking
- fixed access log logic - implement acl at connection level - acl logging - ip/cidr blocking - geoblocking with MaxMind database
This commit is contained in:
@@ -12,9 +12,7 @@ import (
|
||||
)
|
||||
|
||||
type supportRotate interface {
|
||||
io.Reader
|
||||
io.Writer
|
||||
io.Seeker
|
||||
io.ReadSeeker
|
||||
io.ReaderAt
|
||||
io.WriterAt
|
||||
Truncate(size int64) error
|
||||
@@ -41,6 +39,14 @@ func (r *RotateResult) Print(logger *zerolog.Logger) {
|
||||
Msg("log rotate result")
|
||||
}
|
||||
|
||||
func (r *RotateResult) Add(other *RotateResult) {
|
||||
r.NumBytesRead += other.NumBytesRead
|
||||
r.NumBytesKeep += other.NumBytesKeep
|
||||
r.NumLinesRead += other.NumLinesRead
|
||||
r.NumLinesKeep += other.NumLinesKeep
|
||||
r.NumLinesInvalid += other.NumLinesInvalid
|
||||
}
|
||||
|
||||
type lineInfo struct {
|
||||
Pos int64 // Position from the start of the file
|
||||
Size int64 // Size of this line
|
||||
|
||||
Reference in New Issue
Block a user