Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Context ¶
type Context struct { Online bool ConfigRoot string ReqLog *ReqLog Plugins *loader.PluginLoader LoadConfig func(path string) (*config.Config, error) Gateway bool ConstructNode func() (*core.IpfsNode, error) // contains filtered or unexported fields }
上下文表示请求上下文
func (*Context) LogRequest ¶
func (c *Context) LogRequest(req *cmds.Request) func()
log request将传递的请求添加到请求日志中,然后 返回请求时应调用的函数 一生都结束了。
type ReqLog ¶
type ReqLog struct { Requests []*ReqLogEntry // contains filtered or unexported fields }
reqlog是请求的日志
func (*ReqLog) SetKeepTime ¶
setkeeptime设置一个持续时间,在此时间之后,一个条目将被视为不活动。
Click to show internal directories.
Click to hide internal directories.