Documentation ¶
Overview ¶
Package item implements the faces.IItem interface.
Index ¶
- func New(ctx context.Context, tr faces.ITrace) faces.IItem
- type Data
- type Item
- func (i *Item) AddError(err error)
- func (i *Item) AfterProcess(_ faces.Name, _ error)
- func (i *Item) BeforeProcess(_ faces.Name)
- func (i *Item) Cancel()
- func (i *Item) CleanError()
- func (i *Item) Finish()
- func (i *Item) Get() interface{}
- func (i *Item) GetContext() context.Context
- func (i *Item) GetError() error
- func (i *Item) GetHandlerError() faces.Name
- func (i *Item) GetID() int64
- func (i *Item) GetLastHandler() faces.Name
- func (i *Item) GetPriority() int
- func (i *Item) GetSkipNames() []faces.Name
- func (i *Item) GetSkipToName() faces.Name
- func (i *Item) GetTestObject() faces.ITestObject
- func (i *Item) Init(ctxIn context.Context, tr faces.ITrace) faces.IItem
- func (i *Item) InitEmpty()
- func (i *Item) IsStopped() bool
- func (i *Item) LogTraceFinishTimef(format string, a ...interface{})
- func (i *Item) LogTracef(format string, a ...interface{})
- func (i *Item) NeedToSkip(worker faces.IWorker) (bool, error)
- func (i *Item) PushedToChannel(_ faces.Name)
- func (i *Item) ReceivedFromChannel()
- func (i *Item) Set(data interface{})
- func (i *Item) SetHandlerError(handlerNameWithError faces.Name)
- func (i *Item) SetID(id int64)
- func (i *Item) SetLastHandler(handlerName faces.Name)
- func (i *Item) SetLock()
- func (i *Item) SetPriority(priority int)
- func (i *Item) SetSkipNames(names ...faces.Name)
- func (i *Item) SetSkipToName(name faces.Name)
- func (i *Item) SetTestObject(testObject faces.ITestObject)
- func (i *Item) SetUnlock()
- func (i *Item) Start()
- func (i *Item) Stopped()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Data ¶
type Data struct {
// contains filtered or unexported fields
}
Data is internal item's storage. It exits as property of Item for OOP/inheritance goals.
type Item ¶
Item implements the faces.IItem interface.
func (*Item) AfterProcess ¶ added in v0.0.12
AfterProcess does nothing. It should be redefined.
func (*Item) BeforeProcess ¶ added in v0.0.12
BeforeProcess does nothing. It should be redefined.
func (*Item) Cancel ¶ added in v0.0.3
func (i *Item) Cancel()
Cancel emergency breaks the processing by global context.
func (*Item) Get ¶
func (i *Item) Get() interface{}
Get is a interface function. It's a simple getter.
func (*Item) GetContext ¶
GetContext is a interface function. It's a simple getter.
func (*Item) GetHandlerError ¶
GetHandlerError returns the error which got within processing of the item.
func (*Item) GetLastHandler ¶
GetLastHandler returns the last handler name which processed the item.
func (*Item) GetSkipNames ¶ added in v0.0.10
GetSkipNames returns handler name which was set up with SetSkipNames.
func (*Item) GetSkipToName ¶
GetSkipToName returns handler name which was set up with SetSkipToName and is not yet processed.
func (*Item) GetTestObject ¶ added in v0.0.21
func (i *Item) GetTestObject() faces.ITestObject
GetTestObject is a interface function. It's a simple getter.
func (*Item) IsStopped ¶ added in v0.2.2
IsStopped indicates that item should only be processed by the Final or Error Handlers
func (*Item) LogTraceFinishTimef ¶ added in v0.1.0
LogTraceFinishTimef adds the message and during of period from last call of item.LogTraceFinishTimef or item.Start to tracer.
func (*Item) NeedToSkip ¶ added in v0.0.3
NeedToSkip checks should be handler skipped or not.
func (*Item) PushedToChannel ¶ added in v0.0.10
PushedToChannel does nothing. It should be redefined.
func (*Item) ReceivedFromChannel ¶ added in v0.0.10
func (i *Item) ReceivedFromChannel()
ReceivedFromChannel does nothing. It should be redefined.
func (*Item) Set ¶
func (i *Item) Set(data interface{})
Set is a simple setter. It sets up the data of item.
func (*Item) SetHandlerError ¶
SetHandlerError sets the error which got within processing of the item.
func (*Item) SetLastHandler ¶
SetLastHandler sets the last handler name which processed the item.
func (*Item) SetPriority ¶
SetPriority sets priority for item if priority queue is used.
func (*Item) SetSkipNames ¶ added in v0.0.10
SetSkipNames sets the handler names. Conveyor skips all these handlers.
func (*Item) SetSkipToName ¶
SetSkipToName sets the handler name. Conveyor skips all handlers until that. When conveyor reaches that name is set up as EmptySkipName. If conveyor finishes and name is not found item gets error.
func (*Item) SetTestObject ¶ added in v0.0.21
func (i *Item) SetTestObject(testObject faces.ITestObject)
SetTestObject is a interface function. It's a setter. It sets up the Empty test object if it gets nil input parameter.
func (*Item) SetUnlock ¶ added in v0.0.19
func (i *Item) SetUnlock()
SetUnlock is a interface function.