Documentation
¶
Index ¶
- Constants
- Variables
- func GoTime() int64
- func RvGet() int64
- func RvGet2() int64
- func RvGetPart() int64
- type Error
- func ErrorCE(code int, err error) *Error
- func ErrorCS(code int, err string) *Error
- func ErrorCSE(code int, err string, internalError error) *Error
- func ErrorE(err error) *Error
- func ErrorNew(msg string, internalError error) *Error
- func ErrorNew2(msg string, internalError error, internal2Error error) *Error
- func ErrorS(err string) *Error
- type ErrorProvider
- type G
- type PMutex
- func (m *PMutex) Lock() (i int64)
- func (m *PMutex) LockD(d time.Duration) (i int64, ok bool)
- func (m *PMutex) Promote(i int64) bool
- func (m *PMutex) PromoteD(d time.Duration, i int64) bool
- func (m *PMutex) RLock() (i int64)
- func (m *PMutex) RLockD(d time.Duration) (i int64, ok bool)
- func (m *PMutex) RTryLock(ctx context.Context) (i int64, ok bool)
- func (m *PMutex) Reduce(i int64) bool
- func (m *PMutex) Status(i int64) int
- func (m *PMutex) TryLock(ctx context.Context) (i int64, ok bool)
- func (m *PMutex) TryPromote(ctx context.Context, i int64) bool
- func (m *PMutex) TryUnlock(i int64)
- func (m *PMutex) Unlock(i int64)
- type RWCMutex
- func (m *RWCMutex) Lock()
- func (m *RWCMutex) LockD(d time.Duration) bool
- func (m *RWCMutex) RLock()
- func (m *RWCMutex) RLockD(d time.Duration) bool
- func (m *RWCMutex) RTryLock(ctx context.Context) bool
- func (m *RWCMutex) RUnlock()
- func (m *RWCMutex) TryLock(ctx context.Context) bool
- func (m *RWCMutex) Unlock()
Constants ¶
View Source
const ( Free int = iota ReadLock Lock )
Lock statuses
View Source
const ErrorCommonCode int = 50000
ErrorCommonCode - no code error
Variables ¶
View Source
var InnerErrorPrefix string = " "
Functions ¶
Types ¶
type Error ¶
type Error struct {
Code int `json:"code,omitempty"`
Msg string `json:"msg,omitempty"`
InternalErrorText string `json:"iet,omitempty"`
InternalError *Error `json:"ie,omitempty"`
}
Error type with internal
type ErrorProvider ¶
type ErrorProvider interface {
Debugf(format string, args ...interface{})
Infof(format string, args ...interface{})
Warningf(format string, args ...interface{})
Errorf(format string, args ...interface{})
Fatalf(format string, args ...interface{})
Panicf(format string, args ...interface{})
Debug(args ...interface{})
Info(args ...interface{})
Warning(args ...interface{})
Error(args ...interface{})
Fatal(args ...interface{})
Panic(args ...interface{})
Debugln(args ...interface{})
Infoln(args ...interface{})
Warningln(args ...interface{})
Errorln(args ...interface{})
Fatalln(args ...interface{})
Panicln(args ...interface{})
}
ErrorProvider interface for error provider mostly for background processes
type PMutex ¶
type PMutex struct {
// contains filtered or unexported fields
}
PMutex - mutex with identity of lock read write mutex with context and change Priority
func (*PMutex) TryPromote ¶
TryPromote - promotes read lock mutex to lock with context
type RWCMutex ¶
type RWCMutex struct {
// contains filtered or unexported fields
}
RWCMutex - Read Write Context Mutex
Source Files
¶
Click to show internal directories.
Click to hide internal directories.