Documentation
¶
Index ¶
- Constants
- Variables
- func Broadcast(message []byte) (err error)
- func BroadcastWithTimeout(message []byte, timeout time.Duration) (err error)
- func Decode(p []byte, x *Message) error
- func Encode(ctx *Ctx) []byte
- func RegisterBroadcaster(bc Broadcaster)
- func ReleaseCtx(ctx CtxInterface)
- func SetDefaultMarshaller(m Marshaller)
- type AssertInterface
- type Broadcaster
- type BroadcasterConfig
- type BytesContainer
- type Clock
- type Ctx
- func (c *Ctx) AcquireThread() ThreadInterface
- func (c *Ctx) AcquireThreadID(id uint32) ThreadInterface
- func (c *Ctx) Assert(msg string) RecordInterface
- func (c *Ctx) AssertIf(cond bool, msg string) RecordInterface
- func (c *Ctx) Debug(msg string) RecordInterface
- func (c *Ctx) DebugAssert(msg string) RecordInterface
- func (c *Ctx) DebugAssertIf(cond bool, msg string) RecordInterface
- func (c *Ctx) DebugIf(cond bool, msg string) RecordInterface
- func (c *Ctx) Error(msg string) RecordInterface
- func (c *Ctx) ErrorAssert(msg string) RecordInterface
- func (c *Ctx) ErrorAssertIf(cond bool, msg string) RecordInterface
- func (c *Ctx) ErrorIf(cond bool, msg string) RecordInterface
- func (c *Ctx) Fatal(msg string) RecordInterface
- func (c *Ctx) FatalAssert(msg string) RecordInterface
- func (c *Ctx) FatalAssertIf(cond bool, msg string) RecordInterface
- func (c *Ctx) FatalIf(cond bool, msg string) RecordInterface
- func (c *Ctx) Flush() (err error)
- func (c *Ctx) GetID() string
- func (c *Ctx) Info(msg string) RecordInterface
- func (c *Ctx) InfoAssert(msg string) RecordInterface
- func (c *Ctx) InfoAssertIf(cond bool, msg string) RecordInterface
- func (c *Ctx) InfoIf(cond bool, msg string) RecordInterface
- func (c *Ctx) IsDummy() bool
- func (c *Ctx) ReleaseThread(thread ThreadInterface) CtxInterface
- func (c *Ctx) Reset() *Ctx
- func (c *Ctx) SetBroadcastTimeout(timeout time.Duration) CtxInterface
- func (c *Ctx) SetClock(cl Clock) CtxInterface
- func (c *Ctx) SetFlag(flag Flag, value bool) CtxInterface
- func (c *Ctx) SetID(id string) CtxInterface
- func (c *Ctx) SetLogger(l Logger) CtxInterface
- func (c *Ctx) SetMarshaller(m Marshaller) CtxInterface
- func (c *Ctx) SetService(svc string) CtxInterface
- func (c *Ctx) SetServiceWithStage(svc, stage string) CtxInterface
- func (c *Ctx) SetStage(stage string) CtxInterface
- func (c *Ctx) Trace(mask Level, msg string) RecordInterface
- func (c *Ctx) TraceIf(cond bool, mask Level, msg string) RecordInterface
- func (c *Ctx) Warn(msg string) RecordInterface
- func (c *Ctx) WarnAssert(msg string) RecordInterface
- func (c *Ctx) WarnAssertIf(cond bool, msg string) RecordInterface
- func (c *Ctx) WarnIf(cond bool, msg string) RecordInterface
- func (c *Ctx) Watch(mask Level) CtxInterface
- type CtxInterface
- type CtxPool
- type DummyAssert
- func (t DummyAssert) DebugAssert(string) RecordInterface
- func (t DummyAssert) DebugAssertIf(bool, string) RecordInterface
- func (t DummyAssert) ErrorAssert(string) RecordInterface
- func (t DummyAssert) ErrorAssertIf(bool, string) RecordInterface
- func (t DummyAssert) FatalAssert(string) RecordInterface
- func (t DummyAssert) FatalAssertIf(bool, string) RecordInterface
- func (t DummyAssert) InfoAssert(string) RecordInterface
- func (t DummyAssert) InfoAssertIf(bool, string) RecordInterface
- func (t DummyAssert) WarnAssert(string) RecordInterface
- func (t DummyAssert) WarnAssertIf(bool, string) RecordInterface
- type DummyBroadcast
- type DummyClock
- type DummyCtx
- func (d DummyCtx) AcquireThread() ThreadInterface
- func (d DummyCtx) AcquireThreadID(uint32) ThreadInterface
- func (d DummyCtx) Assert(string) RecordInterface
- func (d DummyCtx) AssertIf(bool, string) RecordInterface
- func (d DummyCtx) Debug(string) RecordInterface
- func (d DummyCtx) DebugIf(bool, string) RecordInterface
- func (d DummyCtx) Error(string) RecordInterface
- func (d DummyCtx) ErrorIf(bool, string) RecordInterface
- func (d DummyCtx) Fatal(string) RecordInterface
- func (d DummyCtx) FatalIf(bool, string) RecordInterface
- func (d DummyCtx) Flush() error
- func (d DummyCtx) GetID() string
- func (d DummyCtx) Info(string) RecordInterface
- func (d DummyCtx) InfoIf(bool, string) RecordInterface
- func (d DummyCtx) IsDummy() bool
- func (d DummyCtx) ReleaseThread(ThreadInterface) CtxInterface
- func (d DummyCtx) SetBroadcastTimeout(time.Duration) CtxInterface
- func (d DummyCtx) SetClock(Clock) CtxInterface
- func (d DummyCtx) SetFlag(Flag, bool) CtxInterface
- func (d DummyCtx) SetID(string) CtxInterface
- func (d DummyCtx) SetLogger(Logger) CtxInterface
- func (d DummyCtx) SetMarshaller(Marshaller) CtxInterface
- func (d DummyCtx) SetService(string) CtxInterface
- func (d DummyCtx) SetServiceWithStage(string, string) CtxInterface
- func (d DummyCtx) SetStage(string) CtxInterface
- func (d DummyCtx) Trace(Level, string) RecordInterface
- func (d DummyCtx) TraceIf(bool, Level, string) RecordInterface
- func (d DummyCtx) Warn(string) RecordInterface
- func (d DummyCtx) WarnIf(bool, string) RecordInterface
- func (d DummyCtx) Watch(Level) CtxInterface
- type DummyListener
- type DummyRecord
- func (r DummyRecord) Comment(string) RecordInterface
- func (r DummyRecord) CommentIf(bool, string) RecordInterface
- func (r DummyRecord) Err(error) RecordInterface
- func (r DummyRecord) ErrIf(bool, error) RecordInterface
- func (r DummyRecord) Flush() error
- func (r DummyRecord) Slug(string) RecordInterface
- func (r DummyRecord) Var(string, interface{}) RecordInterface
- func (r DummyRecord) VarIf(bool, string, interface{}) RecordInterface
- func (r DummyRecord) With(Option, interface{}) RecordInterface
- type DummyThread
- func (t DummyThread) AcquireThread() ThreadInterface
- func (t DummyThread) AcquireThreadID(uint32) ThreadInterface
- func (t DummyThread) Assert(string) RecordInterface
- func (t DummyThread) AssertIf(bool, string) RecordInterface
- func (t DummyThread) Debug(string) RecordInterface
- func (t DummyThread) DebugIf(bool, string) RecordInterface
- func (t DummyThread) Error(string) RecordInterface
- func (t DummyThread) ErrorIf(bool, string) RecordInterface
- func (t DummyThread) Fatal(string) RecordInterface
- func (t DummyThread) FatalIf(bool, string) RecordInterface
- func (t DummyThread) Flush() error
- func (t DummyThread) GetID() uint32
- func (t DummyThread) Info(string) RecordInterface
- func (t DummyThread) InfoIf(bool, string) RecordInterface
- func (t DummyThread) ReleaseThread(ThreadInterface) ThreadInterface
- func (t DummyThread) SetID(uint32) ThreadInterface
- func (t DummyThread) Trace(Level, string) RecordInterface
- func (t DummyThread) TraceIf(bool, Level, string) RecordInterface
- func (t DummyThread) Warn(string) RecordInterface
- func (t DummyThread) WarnIf(bool, string) RecordInterface
- type EntryType
- type Flag
- type Level
- type Listener
- type ListenerConfig
- type Logger
- type Marshaller
- type Message
- type MessageRow
- type Notifier
- type NotifierConfig
- type Option
- type ProtoContainer
- type Record
- func (r Record) Comment(msg string) RecordInterface
- func (r Record) CommentIf(cond bool, msg string) RecordInterface
- func (r Record) Err(err error) RecordInterface
- func (r *Record) ErrIf(cond bool, err error) RecordInterface
- func (h Record) Flush() (err error)
- func (r Record) Slug(slug string) RecordInterface
- func (r Record) Var(name string, val interface{}) RecordInterface
- func (r *Record) VarIf(cond bool, name string, val interface{}) RecordInterface
- func (r Record) With(name Option, value interface{}) RecordInterface
- type RecordInterface
- type Thread
- func (t Thread) AcquireThread() ThreadInterface
- func (t Thread) AcquireThreadID(id uint32) ThreadInterface
- func (t Thread) Assert(msg string) RecordInterface
- func (t Thread) AssertIf(cond bool, msg string) RecordInterface
- func (t Thread) Debug(msg string) RecordInterface
- func (t Thread) DebugAssert(msg string) RecordInterface
- func (t Thread) DebugAssertIf(cond bool, msg string) RecordInterface
- func (t Thread) DebugIf(cond bool, msg string) RecordInterface
- func (t Thread) Error(msg string) RecordInterface
- func (t Thread) ErrorAssert(msg string) RecordInterface
- func (t Thread) ErrorAssertIf(cond bool, msg string) RecordInterface
- func (t Thread) ErrorIf(cond bool, msg string) RecordInterface
- func (t Thread) Fatal(msg string) RecordInterface
- func (t Thread) FatalAssert(msg string) RecordInterface
- func (t Thread) FatalAssertIf(cond bool, msg string) RecordInterface
- func (t Thread) FatalIf(cond bool, msg string) RecordInterface
- func (h Thread) Flush() (err error)
- func (t Thread) GetID() uint32
- func (t Thread) Info(msg string) RecordInterface
- func (t Thread) InfoAssert(msg string) RecordInterface
- func (t Thread) InfoAssertIf(cond bool, msg string) RecordInterface
- func (t Thread) InfoIf(cond bool, msg string) RecordInterface
- func (t Thread) ReleaseThread(thread ThreadInterface) ThreadInterface
- func (t *Thread) SetID(id uint32) ThreadInterface
- func (t Thread) Trace(mask Level, msg string) RecordInterface
- func (t Thread) TraceIf(cond bool, mask Level, msg string) RecordInterface
- func (t Thread) Warn(msg string) RecordInterface
- func (t Thread) WarnAssert(msg string) RecordInterface
- func (t Thread) WarnAssertIf(cond bool, msg string) RecordInterface
- func (t Thread) WarnIf(cond bool, msg string) RecordInterface
- type ThreadInterface
Constants ¶
View Source
const ( LevelDebug Level = 1 << iota LevelInfo LevelWarn LevelError LevelFatal LevelAssert LevelComment LevelAll = LevelDebug | LevelInfo | LevelWarn | LevelError | LevelFatal | LevelAssert | LevelComment FlagOverwrite Flag = 0 Version uint16 = 1 )
Variables ¶
View Source
var ( ErrPacketTooShort = errors.New("packet too short") ErrHomelessThread = errors.New("homeless thread, use context.AcquireThread() or thread.AcquireThread() to make") )
Functions ¶
func BroadcastWithTimeout ¶
func RegisterBroadcaster ¶
func RegisterBroadcaster(bc Broadcaster)
func ReleaseCtx ¶
func ReleaseCtx(ctx CtxInterface)
func SetDefaultMarshaller ¶
func SetDefaultMarshaller(m Marshaller)
Types ¶
type AssertInterface ¶
type AssertInterface interface {
DebugAssert(msg string) RecordInterface
InfoAssert(msg string) RecordInterface
WarnAssert(msg string) RecordInterface
ErrorAssert(msg string) RecordInterface
FatalAssert(msg string) RecordInterface
DebugAssertIf(cond bool, msg string) RecordInterface
InfoAssertIf(cond bool, msg string) RecordInterface
WarnAssertIf(cond bool, msg string) RecordInterface
ErrorAssertIf(cond bool, msg string) RecordInterface
FatalAssertIf(cond bool, msg string) RecordInterface
}
type Broadcaster ¶
type Broadcaster interface {
SetConfig(config *BroadcasterConfig)
GetConfig() *BroadcasterConfig
Broadcast(context.Context, []byte) (int, error)
}
type BroadcasterConfig ¶
type BytesContainer ¶
type BytesContainer interface {
Bytes() []byte
}
type Ctx ¶
type Ctx struct {
// contains filtered or unexported fields
}
func (*Ctx) AcquireThread ¶
func (c *Ctx) AcquireThread() ThreadInterface
func (*Ctx) AcquireThreadID ¶
func (c *Ctx) AcquireThreadID(id uint32) ThreadInterface
func (*Ctx) Assert ¶
func (c *Ctx) Assert(msg string) RecordInterface
func (*Ctx) Debug ¶
func (c *Ctx) Debug(msg string) RecordInterface
func (*Ctx) DebugAssert ¶
func (c *Ctx) DebugAssert(msg string) RecordInterface
func (*Ctx) DebugAssertIf ¶
func (c *Ctx) DebugAssertIf(cond bool, msg string) RecordInterface
func (*Ctx) Error ¶
func (c *Ctx) Error(msg string) RecordInterface
func (*Ctx) ErrorAssert ¶
func (c *Ctx) ErrorAssert(msg string) RecordInterface
func (*Ctx) ErrorAssertIf ¶
func (c *Ctx) ErrorAssertIf(cond bool, msg string) RecordInterface
func (*Ctx) Fatal ¶
func (c *Ctx) Fatal(msg string) RecordInterface
func (*Ctx) FatalAssert ¶
func (c *Ctx) FatalAssert(msg string) RecordInterface
func (*Ctx) FatalAssertIf ¶
func (c *Ctx) FatalAssertIf(cond bool, msg string) RecordInterface
func (*Ctx) Info ¶
func (c *Ctx) Info(msg string) RecordInterface
func (*Ctx) InfoAssert ¶
func (c *Ctx) InfoAssert(msg string) RecordInterface
func (*Ctx) InfoAssertIf ¶
func (c *Ctx) InfoAssertIf(cond bool, msg string) RecordInterface
func (*Ctx) ReleaseThread ¶
func (c *Ctx) ReleaseThread(thread ThreadInterface) CtxInterface
func (*Ctx) SetBroadcastTimeout ¶
func (c *Ctx) SetBroadcastTimeout(timeout time.Duration) CtxInterface
func (*Ctx) SetClock ¶
func (c *Ctx) SetClock(cl Clock) CtxInterface
func (*Ctx) SetID ¶
func (c *Ctx) SetID(id string) CtxInterface
func (*Ctx) SetLogger ¶
func (c *Ctx) SetLogger(l Logger) CtxInterface
func (*Ctx) SetMarshaller ¶
func (c *Ctx) SetMarshaller(m Marshaller) CtxInterface
func (*Ctx) SetService ¶
func (c *Ctx) SetService(svc string) CtxInterface
func (*Ctx) SetServiceWithStage ¶
func (c *Ctx) SetServiceWithStage(svc, stage string) CtxInterface
func (*Ctx) SetStage ¶
func (c *Ctx) SetStage(stage string) CtxInterface
func (*Ctx) Warn ¶
func (c *Ctx) Warn(msg string) RecordInterface
func (*Ctx) WarnAssert ¶
func (c *Ctx) WarnAssert(msg string) RecordInterface
func (*Ctx) WarnAssertIf ¶
func (c *Ctx) WarnAssertIf(cond bool, msg string) RecordInterface
func (*Ctx) Watch ¶
func (c *Ctx) Watch(mask Level) CtxInterface
type CtxInterface ¶
type CtxInterface interface {
AssertInterface
SetID(string) CtxInterface
GetID() string
SetService(string) CtxInterface
SetServiceWithStage(string, string) CtxInterface
SetStage(string) CtxInterface
SetFlag(Flag, bool) CtxInterface
Watch(Level) CtxInterface
SetBroadcastTimeout(time.Duration) CtxInterface
SetClock(Clock) CtxInterface
SetMarshaller(Marshaller) CtxInterface
SetLogger(Logger) CtxInterface
Debug(string) RecordInterface
Info(string) RecordInterface
Warn(string) RecordInterface
Error(string) RecordInterface
Fatal(string) RecordInterface
Assert(string) RecordInterface
Trace(Level, string) RecordInterface
DebugIf(bool, string) RecordInterface
InfoIf(bool, string) RecordInterface
WarnIf(bool, string) RecordInterface
ErrorIf(bool, string) RecordInterface
FatalIf(bool, string) RecordInterface
AssertIf(bool, string) RecordInterface
TraceIf(bool, Level, string) RecordInterface
AcquireThread() ThreadInterface
AcquireThreadID(uint32) ThreadInterface
ReleaseThread(ThreadInterface) CtxInterface
IsDummy() bool
Flush() error
}
func AcquireCtx ¶
func AcquireCtx() CtxInterface
func AcquireCtxWithID ¶
func AcquireCtxWithID(id string) CtxInterface
type DummyAssert ¶
type DummyAssert struct{}
func (DummyAssert) DebugAssert ¶
func (t DummyAssert) DebugAssert(string) RecordInterface
func (DummyAssert) DebugAssertIf ¶
func (t DummyAssert) DebugAssertIf(bool, string) RecordInterface
func (DummyAssert) ErrorAssert ¶
func (t DummyAssert) ErrorAssert(string) RecordInterface
func (DummyAssert) ErrorAssertIf ¶
func (t DummyAssert) ErrorAssertIf(bool, string) RecordInterface
func (DummyAssert) FatalAssert ¶
func (t DummyAssert) FatalAssert(string) RecordInterface
func (DummyAssert) FatalAssertIf ¶
func (t DummyAssert) FatalAssertIf(bool, string) RecordInterface
func (DummyAssert) InfoAssert ¶
func (t DummyAssert) InfoAssert(string) RecordInterface
func (DummyAssert) InfoAssertIf ¶
func (t DummyAssert) InfoAssertIf(bool, string) RecordInterface
func (DummyAssert) WarnAssert ¶
func (t DummyAssert) WarnAssert(string) RecordInterface
func (DummyAssert) WarnAssertIf ¶
func (t DummyAssert) WarnAssertIf(bool, string) RecordInterface
type DummyBroadcast ¶
type DummyBroadcast struct{}
func (DummyBroadcast) SetConfig ¶
func (d DummyBroadcast) SetConfig(*BroadcasterConfig)
type DummyClock ¶
type DummyClock struct{}
func (DummyClock) Now ¶
func (d DummyClock) Now() time.Time
type DummyCtx ¶
type DummyCtx struct {
DummyAssert
}
func (DummyCtx) AcquireThread ¶
func (d DummyCtx) AcquireThread() ThreadInterface
func (DummyCtx) AcquireThreadID ¶
func (d DummyCtx) AcquireThreadID(uint32) ThreadInterface
func (DummyCtx) Assert ¶
func (d DummyCtx) Assert(string) RecordInterface
func (DummyCtx) Debug ¶
func (d DummyCtx) Debug(string) RecordInterface
func (DummyCtx) Error ¶
func (d DummyCtx) Error(string) RecordInterface
func (DummyCtx) Fatal ¶
func (d DummyCtx) Fatal(string) RecordInterface
func (DummyCtx) Info ¶
func (d DummyCtx) Info(string) RecordInterface
func (DummyCtx) ReleaseThread ¶
func (d DummyCtx) ReleaseThread(ThreadInterface) CtxInterface
func (DummyCtx) SetBroadcastTimeout ¶
func (d DummyCtx) SetBroadcastTimeout(time.Duration) CtxInterface
func (DummyCtx) SetClock ¶
func (d DummyCtx) SetClock(Clock) CtxInterface
func (DummyCtx) SetID ¶
func (d DummyCtx) SetID(string) CtxInterface
func (DummyCtx) SetLogger ¶
func (d DummyCtx) SetLogger(Logger) CtxInterface
func (DummyCtx) SetMarshaller ¶
func (d DummyCtx) SetMarshaller(Marshaller) CtxInterface
func (DummyCtx) SetService ¶
func (d DummyCtx) SetService(string) CtxInterface
func (DummyCtx) SetServiceWithStage ¶
func (d DummyCtx) SetServiceWithStage(string, string) CtxInterface
func (DummyCtx) SetStage ¶
func (d DummyCtx) SetStage(string) CtxInterface
func (DummyCtx) Warn ¶
func (d DummyCtx) Warn(string) RecordInterface
func (DummyCtx) Watch ¶
func (d DummyCtx) Watch(Level) CtxInterface
type DummyListener ¶
type DummyListener struct{}
func (DummyListener) SetConfig ¶
func (d DummyListener) SetConfig(*ListenerConfig)
type DummyRecord ¶
type DummyRecord struct{}
func (DummyRecord) Comment ¶
func (r DummyRecord) Comment(string) RecordInterface
func (DummyRecord) CommentIf ¶
func (r DummyRecord) CommentIf(bool, string) RecordInterface
func (DummyRecord) Err ¶
func (r DummyRecord) Err(error) RecordInterface
func (DummyRecord) ErrIf ¶
func (r DummyRecord) ErrIf(bool, error) RecordInterface
func (DummyRecord) Flush ¶
func (r DummyRecord) Flush() error
func (DummyRecord) Slug ¶
func (r DummyRecord) Slug(string) RecordInterface
func (DummyRecord) Var ¶
func (r DummyRecord) Var(string, interface{}) RecordInterface
func (DummyRecord) VarIf ¶
func (r DummyRecord) VarIf(bool, string, interface{}) RecordInterface
func (DummyRecord) With ¶
func (r DummyRecord) With(Option, interface{}) RecordInterface
type DummyThread ¶
type DummyThread struct {
DummyAssert
}
func (DummyThread) AcquireThread ¶
func (t DummyThread) AcquireThread() ThreadInterface
func (DummyThread) AcquireThreadID ¶
func (t DummyThread) AcquireThreadID(uint32) ThreadInterface
func (DummyThread) Assert ¶
func (t DummyThread) Assert(string) RecordInterface
func (DummyThread) AssertIf ¶
func (t DummyThread) AssertIf(bool, string) RecordInterface
func (DummyThread) Debug ¶
func (t DummyThread) Debug(string) RecordInterface
func (DummyThread) DebugIf ¶
func (t DummyThread) DebugIf(bool, string) RecordInterface
func (DummyThread) Error ¶
func (t DummyThread) Error(string) RecordInterface
func (DummyThread) ErrorIf ¶
func (t DummyThread) ErrorIf(bool, string) RecordInterface
func (DummyThread) Fatal ¶
func (t DummyThread) Fatal(string) RecordInterface
func (DummyThread) FatalIf ¶
func (t DummyThread) FatalIf(bool, string) RecordInterface
func (DummyThread) Flush ¶
func (t DummyThread) Flush() error
func (DummyThread) GetID ¶
func (t DummyThread) GetID() uint32
func (DummyThread) Info ¶
func (t DummyThread) Info(string) RecordInterface
func (DummyThread) InfoIf ¶
func (t DummyThread) InfoIf(bool, string) RecordInterface
func (DummyThread) ReleaseThread ¶
func (t DummyThread) ReleaseThread(ThreadInterface) ThreadInterface
func (DummyThread) SetID ¶
func (t DummyThread) SetID(uint32) ThreadInterface
func (DummyThread) Trace ¶
func (t DummyThread) Trace(Level, string) RecordInterface
func (DummyThread) TraceIf ¶
func (t DummyThread) TraceIf(bool, Level, string) RecordInterface
func (DummyThread) Warn ¶
func (t DummyThread) Warn(string) RecordInterface
func (DummyThread) WarnIf ¶
func (t DummyThread) WarnIf(bool, string) RecordInterface
type Listener ¶
type Listener interface {
SetConfig(*ListenerConfig)
GetConfig() *ListenerConfig
Listen(context.Context, chan []byte) error
}
type ListenerConfig ¶
type Logger ¶
type Logger interface {
Printf(format string, v ...interface{})
Print(v ...interface{})
Println(v ...interface{})
}
type Marshaller ¶
type Marshaller interface {
Marshal(io.ReadWriter, interface{}, bool) ([]byte, error)
}
type Message ¶
type MessageRow ¶
type Notifier ¶
type Notifier interface {
SetConfig(*NotifierConfig)
Notify(context.Context, string) error
}
type NotifierConfig ¶
type NotifierConfig struct {
Handler string `json:"handler"`
Addr string `json:"addr,omitempty"`
Channel string `json:"channel,omitempty"`
ChatID string `json:"chatID,omitempty"`
Username string `json:"username,omitempty"`
Token string `json:"token,omitempty"`
Template string `json:"template"`
Format string `json:"format"`
}
type ProtoContainer ¶
type Record ¶
type Record struct {
// contains filtered or unexported fields
}
func (Record) Comment ¶
func (r Record) Comment(msg string) RecordInterface
func (Record) Err ¶
func (r Record) Err(err error) RecordInterface
func (Record) Slug ¶
func (r Record) Slug(slug string) RecordInterface
func (Record) Var ¶
func (r Record) Var(name string, val interface{}) RecordInterface
func (*Record) VarIf ¶
func (r *Record) VarIf(cond bool, name string, val interface{}) RecordInterface
func (Record) With ¶
func (r Record) With(name Option, value interface{}) RecordInterface
type RecordInterface ¶
type RecordInterface interface {
Slug(string) RecordInterface
Var(string, interface{}) RecordInterface
VarIf(bool, string, interface{}) RecordInterface
With(Option, interface{}) RecordInterface
Err(error) RecordInterface
ErrIf(bool, error) RecordInterface
Comment(string) RecordInterface
CommentIf(bool, string) RecordInterface
Flush() error
}
type Thread ¶
type Thread struct {
// contains filtered or unexported fields
}
func (Thread) AcquireThread ¶
func (t Thread) AcquireThread() ThreadInterface
func (Thread) AcquireThreadID ¶
func (t Thread) AcquireThreadID(id uint32) ThreadInterface
func (Thread) Assert ¶
func (t Thread) Assert(msg string) RecordInterface
func (Thread) Debug ¶
func (t Thread) Debug(msg string) RecordInterface
func (Thread) DebugAssert ¶
func (t Thread) DebugAssert(msg string) RecordInterface
func (Thread) DebugAssertIf ¶
func (t Thread) DebugAssertIf(cond bool, msg string) RecordInterface
func (Thread) Error ¶
func (t Thread) Error(msg string) RecordInterface
func (Thread) ErrorAssert ¶
func (t Thread) ErrorAssert(msg string) RecordInterface
func (Thread) ErrorAssertIf ¶
func (t Thread) ErrorAssertIf(cond bool, msg string) RecordInterface
func (Thread) Fatal ¶
func (t Thread) Fatal(msg string) RecordInterface
func (Thread) FatalAssert ¶
func (t Thread) FatalAssert(msg string) RecordInterface
func (Thread) FatalAssertIf ¶
func (t Thread) FatalAssertIf(cond bool, msg string) RecordInterface
func (Thread) Info ¶
func (t Thread) Info(msg string) RecordInterface
func (Thread) InfoAssert ¶
func (t Thread) InfoAssert(msg string) RecordInterface
func (Thread) InfoAssertIf ¶
func (t Thread) InfoAssertIf(cond bool, msg string) RecordInterface
func (Thread) ReleaseThread ¶
func (t Thread) ReleaseThread(thread ThreadInterface) ThreadInterface
func (*Thread) SetID ¶
func (t *Thread) SetID(id uint32) ThreadInterface
func (Thread) Warn ¶
func (t Thread) Warn(msg string) RecordInterface
func (Thread) WarnAssert ¶
func (t Thread) WarnAssert(msg string) RecordInterface
func (Thread) WarnAssertIf ¶
func (t Thread) WarnAssertIf(cond bool, msg string) RecordInterface
type ThreadInterface ¶
type ThreadInterface interface {
AssertInterface
SetID(uint32) ThreadInterface
GetID() uint32
Debug(string) RecordInterface
Info(string) RecordInterface
Warn(string) RecordInterface
Error(string) RecordInterface
Fatal(string) RecordInterface
Assert(string) RecordInterface
Trace(Level, string) RecordInterface
DebugIf(bool, string) RecordInterface
InfoIf(bool, string) RecordInterface
WarnIf(bool, string) RecordInterface
ErrorIf(bool, string) RecordInterface
FatalIf(bool, string) RecordInterface
AssertIf(bool, string) RecordInterface
TraceIf(bool, Level, string) RecordInterface
AcquireThread() ThreadInterface
AcquireThreadID(uint32) ThreadInterface
ReleaseThread(ThreadInterface) ThreadInterface
Flush() error
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.