Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var LogContextKeyStr = Key("key")
View Source
var UnnamedKeyStr = "unamed_key"
Functions ¶
This section is empty.
Types ¶
type ArrayContext ¶
type ArrayContext struct {
BaseContext
}
func (*ArrayContext) Add ¶
func (c *ArrayContext) Add(key string, value any)
func (*ArrayContext) Get ¶
func (c *ArrayContext) Get() any
type BaseContext ¶
type BaseContext struct {
ContextInterface
Ctx context.Context
Mutex sync.RWMutex
}
func (*BaseContext) GetMutex ¶
func (c *BaseContext) GetMutex() *sync.RWMutex
type ContextInterface ¶
type MutexMapContext ¶
type MutexMapContext struct {
BaseContext
}
func (*MutexMapContext) Add ¶
func (c *MutexMapContext) Add(key string, value any)
func (*MutexMapContext) Get ¶
func (c *MutexMapContext) Get() any
type SyncMapContext ¶
type SyncMapContext struct {
BaseContext
}
func (*SyncMapContext) Add ¶
func (c *SyncMapContext) Add(key string, value any)
func (*SyncMapContext) Get ¶
func (c *SyncMapContext) Get() any
The log of SyncMap doesn't output as expected, duo to zap doesn't support sync.Map directly.
Click to show internal directories.
Click to hide internal directories.