Documentation ¶
Index ¶
Constants ¶
View Source
const ( // DefaultTimeout The Context default timeout one minute. DefaultTimeout = time.Minute )
Variables ¶
This section is empty.
Functions ¶
func LoadPlugin ¶
Types ¶
type Context ¶
type Context struct { context.Context // set to non-nil by the first cancel call // contains filtered or unexported fields }
Context The Parser context
func NewContext ¶
func NewContext(opt ContextOptions) *Context
NewContext creates a new Context with ContextOptions
func (*Context) Cancel ¶
func (c *Context) Cancel()
Cancel this context releases resources associated with it, so code should call cancel as soon as the operations running in this Context complete.
func (*Context) GetValue ¶
GetValue returns the value associated with this context for key, or nil if no value is associated with key. Successive calls to Value with the same key returns the same result.
func (*Context) Logger ¶
Logger returns the logger, if ContextOptions.Logger is nil return slog.Default
Click to show internal directories.
Click to hide internal directories.