Documentation ¶
Overview ¶
Package file Double-write of files
Index ¶
- Constants
- Variables
- func BatchReplay(clients map[string]redis.UniversalClient, fileNames []string)
- func FileListNeedReplay(dir string) []string
- func MkDirs(dir string)
- func Replay(filename string, client redis.UniversalClient) bool
- func ReplayExec(client redis.UniversalClient, interrupted, lineIndex *int64, line []byte)
- type Item
- type NameInfo
- type Operation
Constants ¶
View Source
const ( CacheFilePerm = 0666 Suffix = ".dat" Delimiter = "-" DefaultVersion = "0" FileTimestampGapMillions = 60000 FileTimestampCloseMillions = 70000 FileCloseCheckTimestampGapMillions = 5000 FlushGapMillions = 10000 RelativePattern = "(dc[12])-([0-9]{13})-([0-9]*)\\.dat" MaxLine = 1 << 20 )
Variables ¶
View Source
var Pattern = regexp.MustCompile("(.*/)(.*)?-(.*)?-(.*)?\\.dat")
Functions ¶
func BatchReplay ¶
BatchReplay Run the following command to filter the files to be executed
func FileListNeedReplay ¶
FileListNeedReplay Obtain the list of files to be executed
func ReplayExec ¶
ReplayExec Run the command on the client
Types ¶
type Operation ¶
type Operation struct {
// contains filtered or unexported fields
}
func NewFileOperation ¶
func NewFileOperation() *Operation
func (*Operation) CloseWriter ¶
func (f *Operation) CloseWriter()
CloseWriter Polling disables the write of files that are not operated within a specified period of time
Click to show internal directories.
Click to hide internal directories.