Documentation ¶
Index ¶
- Constants
- Variables
- func AbsForInt32(n int) int
- func AbsForInt64(n int64) int64
- func CombineBytes(bs ...[]byte) []byte
- func Daemon()
- func GeneratePID(pidFile string)
- func GetGoroutineId() int
- func LogError(format string, v ...interface{})
- func LogInfo(format string, v ...interface{})
- func LogInit(level int, prefix string) error
- func LogPanic(ierr interface{})
- func LogRaw(s string)
- func LogVerbose(format string, v ...interface{})
- func LogWarn(format string, v ...interface{})
- func MaskBytes(raw []byte, mask byte, bitSize byte) []byte
- func ReadAsciiCode(raw []byte) byte
- func ReadPIDs(pidFile string) (error, []int)
- func RemovePID(pidFile string)
- func TestMask(n int, mask int) bool
- func UnMaskBytes(raw []byte, bitSize byte) (byte, []byte)
- func WaitExitSignal() os.Signal
- type Buffer
- type ChannelQueue
- type CloveId
- type CloveMap
- type IdGenerator
- type KeyValue
- type MachineID
- type StandardBuffer
- type SyncBuffer
Constants ¶
View Source
const ( LogLevelVerbose = iota LogLevelInfo LogLevelWarn LogLevelError )
Variables ¶
View Source
var LogLevelTags = []string{"V", "I", "W", "E"}
Functions ¶
func AbsForInt32 ¶
func AbsForInt64 ¶
func CombineBytes ¶
func GeneratePID ¶
func GeneratePID(pidFile string)
func LogVerbose ¶
func LogVerbose(format string, v ...interface{})
func ReadAsciiCode ¶
func WaitExitSignal ¶
Waiting for a signal for the process to exit or interrupt
Types ¶
type ChannelQueue ¶
type ChannelQueue chan interface{}
func (ChannelQueue) Close ¶
func (c ChannelQueue) Close()
type CloveId ¶
type CloveId struct {
// contains filtered or unexported fields
}
func (CloveId) DataWithByteOrder ¶
type CloveMap ¶
type CloveMap interface { Set(key, value interface{}) Get(key interface{}) interface{} Pop(key interface{}) interface{} Clear() HasKey(key interface{}) bool Count() int Keys() []interface{} Values() []interface{} Items() []KeyValue IterItems() <-chan KeyValue }
Extended map interface
type IdGenerator ¶
type IdGenerator struct {
// contains filtered or unexported fields
}
func GetIdGenerator ¶
func GetIdGenerator() *IdGenerator
func (*IdGenerator) NextId ¶
func (idGen *IdGenerator) NextId() <-chan CloveId
func (*IdGenerator) NextIdWithSeed ¶
func (idGen *IdGenerator) NextIdWithSeed(seed uint) <-chan CloveId
type KeyValue ¶
type KeyValue struct { Key interface{} Value interface{} }
Dictionary key-value pair object
type MachineID ¶
type MachineID struct {
// contains filtered or unexported fields
}
func GetMachineID ¶
func GetMachineID() *MachineID
func (MachineID) GetHashString ¶
type StandardBuffer ¶
type StandardBuffer struct {
// contains filtered or unexported fields
}
func (*StandardBuffer) Len ¶
func (b *StandardBuffer) Len() int
func (*StandardBuffer) Reset ¶
func (b *StandardBuffer) Reset()
type SyncBuffer ¶
type SyncBuffer struct {
// contains filtered or unexported fields
}
func (*SyncBuffer) Len ¶
func (b *SyncBuffer) Len() int
func (*SyncBuffer) Reset ¶
func (b *SyncBuffer) Reset()
Click to show internal directories.
Click to hide internal directories.