Documentation ¶
Index ¶
- Variables
- func ApplyConfigOverrides(cfg *conveyor.PulseConveyorConfig, p ConfigOverrides)
- func DefaultConfig() conveyor.PulseConveyorConfig
- func DefaultConfigNoEventless() conveyor.PulseConveyorConfig
- func NewConveyorDispatcher(ctx context.Context, conveyor *conveyor.PulseConveyor) beat.Dispatcher
- type AppCompartment
- func (p *AppCompartment) AppDependencies() injector.DependencyRegistry
- func (p *AppCompartment) Conveyor() *conveyor.PulseConveyor
- func (p *AppCompartment) GetBeatDispatcher() beat.Dispatcher
- func (p *AppCompartment) Init(ctx context.Context) error
- func (p *AppCompartment) SetImposer(fn ImposerFunc)
- func (p *AppCompartment) Start(context.Context) error
- func (p *AppCompartment) Stop(context.Context) error
- type AppCompartmentSetup
- type ComponentInterceptFunc
- type ComponentSetupFunc
- type ConfigOverrides
- type ConfigReviserFunc
- type ConveyorLogger
- func (c ConveyorLogger) CanLogEvent(eventType smachine.StepLoggerEvent, stepLevel smachine.StepLogLevel) bool
- func (ConveyorLogger) CanLogTestEvent() bool
- func (c ConveyorLogger) CreateAsyncLogger(_ context.Context, _ *smachine.StepLoggerData) (context.Context, smachine.StepLogger)
- func (c ConveyorLogger) GetLoggerContext() context.Context
- func (c ConveyorLogger) GetTracerID() smachine.TracerID
- func (c ConveyorLogger) LogAdapter(data smachine.StepLoggerData, adapterID smachine.AdapterID, callID uint64, ...)
- func (c ConveyorLogger) LogEvent(data smachine.StepLoggerData, customEvent interface{}, ...)
- func (c ConveyorLogger) LogInternal(data smachine.StepLoggerData, updateType string)
- func (ConveyorLogger) LogTestEvent(smachine.StepLoggerData, interface{})
- func (c ConveyorLogger) LogUpdate(data smachine.StepLoggerData, updateData smachine.StepLoggerUpdateData)
- type ConveyorLoggerFactory
- func (c ConveyorLoggerFactory) CreateStepLogger(ctx context.Context, _ smachine.StateMachine, traceID smachine.TracerID) smachine.StepLogger
- func (ConveyorLoggerFactory) LogMachineCritical(slotMachineData smachine.SlotMachineData, msg string)
- func (ConveyorLoggerFactory) LogMachineInternal(slotMachineData smachine.SlotMachineData, msg string)
- func (ConveyorLoggerFactory) LogStopping(*smachine.SlotMachine)
- type ConveyorWorker
- type DispatchedMessage
- type ImposedParams
- type ImposerFunc
- type LogCritical
- type LogInternal
- type LogStepInfo
Constants ¶
This section is empty.
Variables ¶
View Source
var DisableLogStepInfoMarshaller bool
DisableLogStepInfoMarshaller is for benchmarking
Functions ¶
func ApplyConfigOverrides ¶
func ApplyConfigOverrides(cfg *conveyor.PulseConveyorConfig, p ConfigOverrides)
func DefaultConfig ¶
func DefaultConfig() conveyor.PulseConveyorConfig
func DefaultConfigNoEventless ¶
func DefaultConfigNoEventless() conveyor.PulseConveyorConfig
func NewConveyorDispatcher ¶
func NewConveyorDispatcher(ctx context.Context, conveyor *conveyor.PulseConveyor) beat.Dispatcher
Types ¶
type AppCompartment ¶
type AppCompartment struct {
// contains filtered or unexported fields
}
func NewAppCompartment ¶
func NewAppCompartment(name string, appDeps injector.DependencyRegistry, setupFn ConfigReviserFunc) *AppCompartment
func (*AppCompartment) AppDependencies ¶
func (p *AppCompartment) AppDependencies() injector.DependencyRegistry
func (*AppCompartment) Conveyor ¶
func (p *AppCompartment) Conveyor() *conveyor.PulseConveyor
func (*AppCompartment) GetBeatDispatcher ¶
func (p *AppCompartment) GetBeatDispatcher() beat.Dispatcher
func (*AppCompartment) SetImposer ¶
func (p *AppCompartment) SetImposer(fn ImposerFunc)
SetImposer sets a handler that can alternate Init() behavior. For tests ONLY.
type AppCompartmentSetup ¶
type AppCompartmentSetup struct { // ConveyorConfig provides settings for conveyor. ConveyorConfig conveyor.PulseConveyorConfig // EventFactoryFn provides event factory for conveyor. EventFactoryFn conveyor.PulseEventFactoryFunc // Components will be added with conveyor.PulseConveyor.AddManagedComponent(). Components []managed.Component // Dependencies will be added as dependencies to conveyor.PulseConveyor. Dependencies *injector.DynamicContainer }
AppCompartmentSetup is a setup of an app compartment.
func (*AppCompartmentSetup) AddComponent ¶
func (p *AppCompartmentSetup) AddComponent(c managed.Component)
AddComponent is a convenience method to add to the Components field.
func (*AppCompartmentSetup) Injector ¶
func (p *AppCompartmentSetup) Injector() injector.DependencyInjector
type ComponentInterceptFunc ¶
ComponentInterceptFunc allows interception / replacement of conveyor-managed components of an app compartment.
type ComponentSetupFunc ¶
type ComponentSetupFunc = func(context.Context, injector.DependencyInjector, managed.RegisterComponentFunc)
type ConfigOverrides ¶
type ConfigReviserFunc ¶
type ConfigReviserFunc = func(context.Context, injector.DependencyInjector, AppCompartmentSetup) AppCompartmentSetup
ConfigReviserFunc enables AppCompartmentSetup to be revised before creation of an app compartment.
type ConveyorLogger ¶
type ConveyorLogger struct {
// contains filtered or unexported fields
}
func (ConveyorLogger) CanLogEvent ¶
func (c ConveyorLogger) CanLogEvent(eventType smachine.StepLoggerEvent, stepLevel smachine.StepLogLevel) bool
func (ConveyorLogger) CanLogTestEvent ¶
func (ConveyorLogger) CanLogTestEvent() bool
func (ConveyorLogger) CreateAsyncLogger ¶
func (c ConveyorLogger) CreateAsyncLogger(_ context.Context, _ *smachine.StepLoggerData) (context.Context, smachine.StepLogger)
func (ConveyorLogger) GetLoggerContext ¶
func (c ConveyorLogger) GetLoggerContext() context.Context
func (ConveyorLogger) GetTracerID ¶
func (c ConveyorLogger) GetTracerID() smachine.TracerID
func (ConveyorLogger) LogAdapter ¶
func (c ConveyorLogger) LogAdapter(data smachine.StepLoggerData, adapterID smachine.AdapterID, callID uint64, fields []logfmt.LogFieldMarshaller)
func (ConveyorLogger) LogEvent ¶
func (c ConveyorLogger) LogEvent(data smachine.StepLoggerData, customEvent interface{}, fields []logfmt.LogFieldMarshaller)
func (ConveyorLogger) LogInternal ¶
func (c ConveyorLogger) LogInternal(data smachine.StepLoggerData, updateType string)
func (ConveyorLogger) LogTestEvent ¶
func (ConveyorLogger) LogTestEvent(smachine.StepLoggerData, interface{})
func (ConveyorLogger) LogUpdate ¶
func (c ConveyorLogger) LogUpdate(data smachine.StepLoggerData, updateData smachine.StepLoggerUpdateData)
type ConveyorLoggerFactory ¶
type ConveyorLoggerFactory struct { }
func (ConveyorLoggerFactory) CreateStepLogger ¶
func (c ConveyorLoggerFactory) CreateStepLogger(ctx context.Context, _ smachine.StateMachine, traceID smachine.TracerID) smachine.StepLogger
func (ConveyorLoggerFactory) LogMachineCritical ¶
func (ConveyorLoggerFactory) LogMachineCritical(slotMachineData smachine.SlotMachineData, msg string)
func (ConveyorLoggerFactory) LogMachineInternal ¶
func (ConveyorLoggerFactory) LogMachineInternal(slotMachineData smachine.SlotMachineData, msg string)
func (ConveyorLoggerFactory) LogStopping ¶
func (ConveyorLoggerFactory) LogStopping(*smachine.SlotMachine)
type ConveyorWorker ¶
type ConveyorWorker struct {
// contains filtered or unexported fields
}
func NewConveyorWorker ¶
func NewConveyorWorker(cycleFn conveyor.PulseConveyorCycleFunc) ConveyorWorker
func (*ConveyorWorker) AttachTo ¶
func (w *ConveyorWorker) AttachTo(conveyor *conveyor.PulseConveyor)
func (*ConveyorWorker) Stop ¶
func (w *ConveyorWorker) Stop()
type DispatchedMessage ¶
type ImposedParams ¶
type ImposedParams struct { // InitContext provides a context given into Init() of app component (not compartment). // This context is cancelled on stop. InitContext context.Context // AppInject contains dependencies provided from Server to App component AppInject injector.DependencyInjector // CompartmentSetup is a configuration of conveyor-based app compartment. CompartmentSetup AppCompartmentSetup // ComponentInterceptFn for use by ServerTemplate.InitTemplate. ComponentInterceptFn ComponentInterceptFunc // ConveyorCycleFn enables access to conveyor's worker state. See instestconveyor.CycleController ConveyorCycleFn conveyor.PulseConveyorCycleFunc // EventJournal will be connected to logger of conveyor when is not nil. EventJournal *journal.Journal }
ImposedParams is a set of overrides available to ImposerFunc provided with instestconveyor.ServerTemplate.SetImposer()
type ImposerFunc ¶
type ImposerFunc = func(*ImposedParams)
ImposerFunc enables imposing of test-specific overrides on an app compartment.
type LogCritical ¶
type LogInternal ¶
type LogStepInfo ¶
type LogStepInfo struct { Message string MachineID string CycleNo uint32 Declaration smachine.StateMachineHelper `fmt:"%T"` SlotID smachine.SlotID SlotStepNo uint32 CurrentStep string NextStep string `opt:""` ExecutionTime int64 `opt:""` InactivityTime int64 `opt:""` AdapterID smachine.AdapterID `opt:""` CallID uint64 `opt:""` }
func (LogStepInfo) GetLogObjectMarshaller ¶
func (v LogStepInfo) GetLogObjectMarshaller() logfmt.LogObjectMarshaller
func (LogStepInfo) MarshalLogObject ¶
func (v LogStepInfo) MarshalLogObject(w logfmt.LogObjectWriter, _ logfmt.LogObjectMetricCollector) (msg string, defMsg bool)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.