Documentation ¶
Index ¶
- Variables
- func CorrlationID(task string) (cid string)
- func GetBool(scp app.DataScope, name string) (value bool, err error)
- func GetComplex128(scp app.DataScope, name string) (value complex128, err error)
- func GetComplex64(scp app.DataScope, name string) (value complex64, err error)
- func GetFloat32(scp app.DataScope, name string) (value float32, err error)
- func GetFloat64(scp app.DataScope, name string) (value float64, err error)
- func GetInt(scp app.DataScope, name string) (value int, err error)
- func GetInt64(scp app.DataScope, name string) (value int64, err error)
- func GetString(scp app.DataScope, name string) (value string, err error)
- func GetUint(scp app.DataScope, name string) (value uint, err error)
- func GetUint64(scp app.DataScope, name string) (value uint64, err error)
- func New(params Params) app.Scope
- func NewChild(parent app.Scope, params ChildParams) app.Scope
- type ChildParams
- type Params
- type Scope
- func (scp *Scope) AddTasks(delta int) (err error)
- func (scp *Scope) AppendError(errs ...error)
- func (scp *Scope) BaseContextScope() app.ContextScope
- func (scp *Scope) BaseDataScope() app.DataScope
- func (scp *Scope) BaseEventScope() app.EventScope
- func (scp *Scope) BaseInjector() app.Injector
- func (scp *Scope) CID() string
- func (scp *Scope) Close() (err error)
- func (scp *Scope) DoneTask()
- func (scp *Scope) Err() error
- func (scp *Scope) GoContext() context.Context
- func (scp *Scope) Kill()
- func (scp *Scope) SID() string
- func (scp *Scope) Stop()
- func (scp *Scope) Wait() error
Constants ¶
This section is empty.
Variables ¶
var ErrDoned = errors.New("context scope is done")
ErrDoned is the error returned by ContextScope.AddTasks when the context scope is done.
Functions ¶
func CorrlationID ¶
func GetComplex128 ¶
func GetComplex128(scp app.DataScope, name string) (value complex128, err error)
GetComplex128 get complex128 value from data scope
func GetComplex64 ¶
GetComplex64 get complex64 value from data scope
func GetFloat32 ¶
GetFloat32 get float32 value from data scope
func GetFloat64 ¶
GetFloat64 get float64 value from data scope
Types ¶
type ChildParams ¶
type ChildParams struct { ContextScope app.ContextScope DataScope app.DataScope EventScope app.EventScope Injector app.Injector Name string CID string }
ChildParams describe child scope
type Params ¶
type Params struct { ContextScope app.ContextScope DataScope app.DataScope EventScope app.EventScope Injector app.Injector CID string Name string }
Params describe scope
type Scope ¶
type Scope struct { app.ContextScope app.DataScope app.EventScope app.Injector // contains filtered or unexported fields }
Scope is global scope interface
func (*Scope) AppendError ¶
AppendError add an error to the scope
func (*Scope) BaseContextScope ¶
func (scp *Scope) BaseContextScope() app.ContextScope
BaseContextScope return unwrap ContextScope object (help better utilize/recycle objects)
func (*Scope) BaseDataScope ¶
BaseDataScope return unwrap DataScope object (help better utilize/recycle objects)
func (*Scope) BaseEventScope ¶
func (scp *Scope) BaseEventScope() app.EventScope
BaseEventScope return unwrap EventScope object (help better utilize/recycle objects)
func (*Scope) BaseInjector ¶
BaseInjector return unwrap dependency injector object (help better utilize/recycle objects)