Help us shape the future of Go! Take the 2026 Go Developer Survey

context

package
v1.12.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 27, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Context

type Context struct {
	*packet.Head
	// contains filtered or unexported fields
}

func NewContext

func NewContext(val any, data define.ICache, opts ...func(*packet.Head)) *Context

func (*Context) AddDepth

func (c *Context) AddDepth(val int32) int32

func (*Context) Change

func (c *Context) Change(key string)

func (*Context) Clone

func (c *Context) Clone(opts ...func(*packet.Head)) *packet.Head

func (*Context) Debug

func (c *Context) Debug(args ...any)

func (*Context) Debugf

func (c *Context) Debugf(f string, args ...any)

func (*Context) Derive

func (c *Context) Derive(opts ...func(*packet.Head)) *packet.Head

func (*Context) Destroy

func (c *Context) Destroy()

func (*Context) Error

func (c *Context) Error(args ...any)

func (*Context) Errorf

func (c *Context) Errorf(f string, args ...any)

func (*Context) Fatal

func (c *Context) Fatal(args ...any)

func (*Context) Fatalf

func (c *Context) Fatalf(f string, args ...any)

func (*Context) GetActorId

func (c *Context) GetActorId() uint64

func (*Context) GetCache

func (c *Context) GetCache(key string) *redispool.Value

func (*Context) GetClientIp

func (c *Context) GetClientIp() string

func (*Context) GetDepth

func (c *Context) GetDepth() int32

func (*Context) Has

func (c *Context) Has(key string) bool

func (*Context) Info

func (c *Context) Info(args ...any)

func (*Context) Infof

func (c *Context) Infof(f string, args ...any)

func (*Context) IsChanged

func (c *Context) IsChanged(key string) bool

func (*Context) ReadOnly

func (c *Context) ReadOnly() *packet.Head

func (*Context) Refresh

func (c *Context) Refresh()

func (*Context) SetActorFunc

func (c *Context) SetActorFunc(v uint32)

func (*Context) SetActorFuncName

func (c *Context) SetActorFuncName(v string)

func (*Context) SetActorId

func (c *Context) SetActorId(v uint64)

func (*Context) SetBack

func (c *Context) SetBack(v *packet.Callback)

func (*Context) SetCache

func (c *Context) SetCache(key string, value *redispool.Value)

func (*Context) SetClientIp

func (c *Context) SetClientIp(ip string)

func (*Context) SetCmd

func (c *Context) SetCmd(v uint32)

func (*Context) SetCreateTime

func (c *Context) SetCreateTime(v int64)

func (*Context) SetDstId

func (c *Context) SetDstId(v uint32)

func (*Context) SetDstType

func (c *Context) SetDstType(v uint32)

func (*Context) SetReply

func (c *Context) SetReply(v string)

func (*Context) SetSendType

func (c *Context) SetSendType(v packet.SendType)

func (*Context) SetSeq

func (c *Context) SetSeq(v uint32)

func (*Context) SetSocketId

func (c *Context) SetSocketId(v uint32)

func (*Context) SetSrcId

func (c *Context) SetSrcId(v uint32)

func (*Context) SetSrcType

func (c *Context) SetSrcType(v uint32)

func (*Context) SetTraceId

func (c *Context) SetTraceId(v uint32)

func (*Context) SetUid

func (c *Context) SetUid(v uint64)

func (*Context) SetVersion

func (c *Context) SetVersion(v uint32)

func (*Context) Trace

func (c *Context) Trace(args ...any)

func (*Context) Tracef

func (c *Context) Tracef(f string, args ...any)

func (*Context) Values

func (c *Context) Values() []*redispool.Value

func (*Context) Warn

func (c *Context) Warn(args ...any)

func (*Context) Warnf

func (c *Context) Warnf(f string, args ...any)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL