Documentation ¶
Overview ¶
Package tools @Author bcy2007 2023/7/12 16:40
Package tools @Author bcy2007 2023/7/14 14:54
Package tools @Author bcy2007 2023/7/13 15:49
Package tools @Author bcy2007 2023/7/12 16:38
Package tools @Author bcy2007 2023/7/12 16:36
Index ¶
- Variables
- func CheckFileExist(fileName string) bool
- func CreateDir(path string) error
- func GetFileTmpName(preString string, rand int) string
- func GetRandomString(n int) string
- func IsDir(path string) bool
- func IsFile(path string) bool
- func ReadFile(path string) ([]byte, error)
- func RemoveFile(path string) error
- func WriteFile(fileName string, strTest []byte) error
- type Counter
- type RingBuffer
- func (ringBuffer *RingBuffer) Capacity() int
- func (ringBuffer *RingBuffer) IsEmpty() bool
- func (ringBuffer *RingBuffer) Len() (count int)
- func (ringBuffer *RingBuffer) Peek() (data T)
- func (ringBuffer *RingBuffer) Pop() (data T)
- func (ringBuffer *RingBuffer) Read() (data T, err error)
- func (ringBuffer *RingBuffer) Reset()
- func (ringBuffer *RingBuffer) Write(value T)
- type StringCountFilter
- type T
- type UChan
- type UrlNode
- type UrlTree
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrIsEmpty = errors.New("ring buffer is empty")
Functions ¶
func GetRandomString ¶
Types ¶
type Counter ¶
func NewCounter ¶
type RingBuffer ¶
type RingBuffer struct {
// contains filtered or unexported fields
}
RingBuffer
@Description: https://github.com/zngw/zchan
func NewRingBuffer ¶
func NewRingBuffer(cellSize int) (buf *RingBuffer, err error)
func (*RingBuffer) Capacity ¶
func (ringBuffer *RingBuffer) Capacity() int
func (*RingBuffer) IsEmpty ¶
func (ringBuffer *RingBuffer) IsEmpty() bool
func (*RingBuffer) Len ¶
func (ringBuffer *RingBuffer) Len() (count int)
func (*RingBuffer) Peek ¶
func (ringBuffer *RingBuffer) Peek() (data T)
func (*RingBuffer) Pop ¶
func (ringBuffer *RingBuffer) Pop() (data T)
func (*RingBuffer) Read ¶
func (ringBuffer *RingBuffer) Read() (data T, err error)
func (*RingBuffer) Reset ¶
func (ringBuffer *RingBuffer) Reset()
func (*RingBuffer) Write ¶
func (ringBuffer *RingBuffer) Write(value T)
type StringCountFilter ¶
func NewCountFilter ¶
func NewCountFilter() *StringCountFilter
func NewStringCountFilter ¶
func NewStringCountFilter(config *filter.Config, container *cuckoo.Filter) *StringCountFilter
func (*StringCountFilter) Count ¶
func (s *StringCountFilter) Count() int64
func (*StringCountFilter) Exist ¶
func (s *StringCountFilter) Exist(str string) bool
func (*StringCountFilter) Insert ¶
func (s *StringCountFilter) Insert(str string) bool
type UrlTree ¶
func CreateTree ¶
Click to show internal directories.
Click to hide internal directories.