Documentation
¶
Index ¶
- Variables
- func GetLocalIP() string
- func GetNetworkIP() string
- func LogDebug(msg ...any)
- func LogError(msg ...any)
- func LogFatal(msg ...any)
- func LogOk(msg ...any)
- func ReadTCPResponse(conn net.Conn) ([]byte, error)
- func SetLogLevel(level int)
- func WriteTCPResponse(conn net.Conn, msg []byte) error
- type BinaryDataFileIndexStruct
- type BinaryFile
Constants ¶
This section is empty.
Variables ¶
View Source
var OS string
View Source
var Root string
View Source
var SystemSeparator string
Functions ¶
func ReadTCPResponse ¶ added in v0.0.2
读取TCP连接二进制消息
func SetLogLevel ¶ added in v0.1.5
func SetLogLevel(level int)
Types ¶
type BinaryFile ¶
type BinaryFile struct {
DataDir string
DataFilePath string
DataFile *os.File
IndexFilePath string
IndexFile *os.File
SuperDataNumberFile *os.File
CurrentPosition int64
SupperSaveIndexNumber int64
MaxDataNumberPerFile uint64
WriteChannel chan int64
}
func NewBinaryFile ¶
func NewBinaryFile(dataDir string, maxDataNumberPerFile uint64) *BinaryFile
初始化
func (*BinaryFile) InitFiles ¶
func (bf *BinaryFile) InitFiles(startIndex uint64, action string) error
func (*BinaryFile) PrepareForWrite ¶
func (bf *BinaryFile) PrepareForWrite() error
Click to show internal directories.
Click to hide internal directories.