Documentation
¶
Index ¶
- Constants
- Variables
- func LogEntry(key string, value interface{}) api.Logger
- type DefaultContext
- func (c *DefaultContext) Deadline() (deadline time.Time, ok bool)
- func (c *DefaultContext) Done() <-chan struct{}
- func (c *DefaultContext) Err() error
- func (c *DefaultContext) GetContext() context.Context
- func (c *DefaultContext) GetInstanceId() int
- func (c *DefaultContext) GetLogger() api.Logger
- func (c *DefaultContext) GetOpId() string
- func (c *DefaultContext) GetRuleId() string
- func (c *DefaultContext) Value(key interface{}) interface{}
- func (c *DefaultContext) WithCancel() (api.StreamContext, context.CancelFunc)
- func (c *DefaultContext) WithInstance(instanceId int) api.StreamContext
- func (c *DefaultContext) WithMeta(ruleId string, opId string) api.StreamContext
- type DefaultFuncContext
Constants ¶
View Source
const LoggerKey = "$$logger"
Variables ¶
View Source
var Log *logrus.Logger
Functions ¶
Types ¶
type DefaultContext ¶
type DefaultContext struct {
// contains filtered or unexported fields
}
func Background ¶
func Background() *DefaultContext
func WithValue ¶
func WithValue(parent *DefaultContext, key, val interface{}) *DefaultContext
func (*DefaultContext) Deadline ¶
func (c *DefaultContext) Deadline() (deadline time.Time, ok bool)
Deadline Implement context interface
func (*DefaultContext) Done ¶
func (c *DefaultContext) Done() <-chan struct{}
func (*DefaultContext) Err ¶
func (c *DefaultContext) Err() error
func (*DefaultContext) GetContext ¶
func (c *DefaultContext) GetContext() context.Context
Stream metas
func (*DefaultContext) GetInstanceId ¶
func (c *DefaultContext) GetInstanceId() int
func (*DefaultContext) GetLogger ¶
func (c *DefaultContext) GetLogger() api.Logger
func (*DefaultContext) GetOpId ¶
func (c *DefaultContext) GetOpId() string
func (*DefaultContext) GetRuleId ¶
func (c *DefaultContext) GetRuleId() string
func (*DefaultContext) Value ¶
func (c *DefaultContext) Value(key interface{}) interface{}
func (*DefaultContext) WithCancel ¶
func (c *DefaultContext) WithCancel() (api.StreamContext, context.CancelFunc)
func (*DefaultContext) WithInstance ¶
func (c *DefaultContext) WithInstance(instanceId int) api.StreamContext
func (*DefaultContext) WithMeta ¶
func (c *DefaultContext) WithMeta(ruleId string, opId string) api.StreamContext
type DefaultFuncContext ¶
type DefaultFuncContext struct { api.StreamContext // contains filtered or unexported fields }
func NewDefaultFuncContext ¶
func NewDefaultFuncContext(ctx api.StreamContext, id int) *DefaultFuncContext
func (*DefaultFuncContext) GetFuncId ¶
func (c *DefaultFuncContext) GetFuncId() int
Click to show internal directories.
Click to hide internal directories.