Documentation
¶
Index ¶
- type Context
- func (c *Context) Clone() types.Context
- func (c *Context) GetAnnotation(s string) interface{}
- func (c *Context) GetConfig() types.LuetConfig
- func (c *Context) SetAnnotation(s string, i interface{})
- func (c *Context) Warn(mess ...interface{})
- func (c *Context) Warnf(t string, mess ...interface{})
- func (c *Context) Warning(mess ...interface{})
- func (c *Context) Warningf(t string, mess ...interface{})
- func (c *Context) WithLoggingContext(name string) types.Context
- type ContextOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Context ¶
type Context struct { types.Logger context.Context types.GarbageCollector Config *types.LuetConfig NoSpinner bool // contains filtered or unexported fields }
func NewContext ¶
func NewContext(opts ...ContextOption) *Context
NewContext returns a new context. It accepts a Garbage collector, a config and a logger as an option
func (*Context) GetAnnotation ¶
GetAnnotation gets generic annotations to hold in a context
func (*Context) GetConfig ¶
func (c *Context) GetConfig() types.LuetConfig
func (*Context) SetAnnotation ¶
SetAnnotation sets generic annotations to hold in a context
type ContextOption ¶
func WithConfig ¶
func WithConfig(cc *types.LuetConfig) ContextOption
WithConfig sets the luet config
func WithGarbageCollector ¶
func WithGarbageCollector(l types.GarbageCollector) ContextOption
WithGarbageCollector sets the Garbage collector for the given context
Click to show internal directories.
Click to hide internal directories.