Documentation ¶
Overview ¶
*
- 2018-02-12, create by mous
- 内存映射文件 读 写 封装
Index ¶
- func BKRDHash(_src string) uint32
- func Decode(_src []byte, _prex byte, _map *[][2]byte, _dst *[]byte)
- func Encode(_src []byte, _prex byte, _map *[][2]byte, _dst *[]byte)
- func ExtractAddr(_ip_port string) (string, int, bool)
- func GoExecute(f func(), name string)
- func GoRunAdd(_fun func(_arg interface{}), _name string, _arg ...interface{})
- func GoRunTerm()
- func HexToInt(_s string) int
- func IndexOf(_buf *[]byte, _offset, _len int, _key byte) int
- func IsFileExists(_file_name string) bool
- func NewIniLoader() *tIniLoader
- func StrToByte(_s string) byte
- func TestAtack()
- func TestCode()
- func TestDirMonitor()
- func TestRW()
- func TestRunner()
- func TestStack()
- type Atack
- type IIniLoader
- type ILineFileBase
- type ILineFileReader
- type ILineFileWriter
- type IRingIter
- type TBufObj
- func (this *TBufObj) ByteAt(_index int) byte
- func (this *TBufObj) Clear()
- func (this *TBufObj) Data() []byte
- func (this *TBufObj) GetMem(_size int) []byte
- func (this *TBufObj) IndexOf(_who byte, _offset int) int
- func (this *TBufObj) Read(_size int, _dst *[]byte)
- func (this *TBufObj) Size() int
- func (this *TBufObj) Slice() []byte
- func (this *TBufObj) String() string
- func (this *TBufObj) ToHex() string
- func (this *TBufObj) Write(_buf ...byte)
- func (this *TBufObj) WriteBuf(_buf *TBufObj)
- func (this *TBufObj) WriteString(_str string)
- type TBufPool
- type TDirMonitor
- type TFileEventType
- type TQueue
- type TRingList
- type TStack
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Encode ¶
*
- 转义 0x7E <-----> 0x7D 0x02,
- 0x7D <-----> 0x7D 0x01, *
- 头尾不动
- @param _data 数据
- @param _prex 前缀
- @param _maps 映射列表
func GoRunAdd ¶
func GoRunAdd(_fun func(_arg interface{}), _name string, _arg ...interface{})
给外部调用的接口 对内直接调用 调度器的 launch 方法即可
func IsFileExists ¶
func NewIniLoader ¶
func NewIniLoader() *tIniLoader
func TestDirMonitor ¶
func TestDirMonitor()
func TestRunner ¶
func TestRunner()
Types ¶
type IIniLoader ¶
type ILineFileBase ¶
公共定义部分
type ILineFileReader ¶
type ILineFileReader interface { ILineFileBase Pause() Resume() }
数据读取接口
func NewLineFileReader ¶
func NewLineFileReader(fpath string, listener func(string)) ILineFileReader
读部分
type TBufObj ¶
type TBufObj struct {
// contains filtered or unexported fields
}
func (*TBufObj) WriteString ¶
type TBufPool ¶
type TBufPool struct { TStack // contains filtered or unexported fields }
func NewBufPool ¶
type TDirMonitor ¶
type TDirMonitor struct {
// contains filtered or unexported fields
}
func NewDirMonitor ¶
func NewDirMonitor() *TDirMonitor
func (*TDirMonitor) Register ¶
func (this *TDirMonitor) Register(_path string, _file_ext string, _listener tOnFileEvent, _level int, _user_data interface{})
func (*TDirMonitor) SetErrorLogger ¶
func (this *TDirMonitor) SetErrorLogger(_on_err tOnDirMonErrLogger)
func (*TDirMonitor) Start ¶
func (this *TDirMonitor) Start()
func (*TDirMonitor) Stop ¶
func (this *TDirMonitor) Stop()
type TFileEventType ¶
type TFileEventType int
*
- 文件事件类型
const ( FET_EXISTS TFileEventType = iota FET_CREATE FET_MODIFY FET_DELETE )
func (TFileEventType) String ¶
func (this TFileEventType) String() string
type TRingList ¶
type TRingList struct {
// contains filtered or unexported fields
}
func NewRingList ¶
func NewRingList() *TRingList
Click to show internal directories.
Click to hide internal directories.