Documentation ¶
Index ¶
- Constants
- Variables
- func GetCommandRequest(task messages.CamundaExternalTask) (command messages.Command, err error)
- func GetIncident(task messages.CamundaExternalTask) (incident *string)
- func StartCacheInvalidator(ctx context.Context, conf util.Config) (err error)
- func StartHealthCheckEndpoint(ctx context.Context, config util.Config, worker *CmdWorker)
- func Worker(ctx context.Context, config util.Config, comFactory com.FactoryInterface, ...)
- type CmdWorker
- func (this *CmdWorker) CreateProtocolMessage(command messages.Command, task messages.CamundaExternalTask) (request *messages.KafkaMessage, event *messages.EventRequest, err error)
- func (this *CmdWorker) ErrorMessageHandler(msg string) error
- func (this *CmdWorker) ExecuteCommand(command messages.Command, task messages.CamundaExternalTask, caller string)
- func (this *CmdWorker) ExecuteNextTasks() (wait bool)
- func (this *CmdWorker) ExecuteTask(task messages.CamundaExternalTask, caller string)
- func (this *CmdWorker) GetLastEventValue(token string, userId string, device model.Device, service model.Service, ...) (code int, result interface{})
- func (this *CmdWorker) GetQueuedResponseHandler(ctx context.Context, workerCount int64, queueSize int64) func(msg string) (err error)
- func (this *CmdWorker) GetState() WorkerState
- func (this *CmdWorker) HandleTaskResponse(msg string) (err error)
- func (this *CmdWorker) LastProducerCallSuccessful() bool
- func (w *CmdWorker) Loop(ctx context.Context)
- func (this *CmdWorker) SinceLastSuccessfulCamundaCall() time.Duration
- type DeviceGroupsHandler
- type Metrics
- type Timescale
- type WorkerState
Constants ¶
View Source
const CheckCamundaDuration = false
View Source
const DuplicateActivitySleep = 100 * time.Millisecond
Variables ¶
View Source
var ErrMissingLastValue = errors.New("missing last value in mgw-last-value")
View Source
var ErrMissingLastValueCode = 513 //custom code to signify missing last-value in mgw-last-value
Functions ¶
func GetCommandRequest ¶
func GetCommandRequest(task messages.CamundaExternalTask) (command messages.Command, err error)
func GetIncident ¶ added in v0.0.21
func GetIncident(task messages.CamundaExternalTask) (incident *string)
func StartCacheInvalidator ¶
func Worker ¶
func Worker(ctx context.Context, config util.Config, comFactory com.FactoryInterface, repoFactory devicerepository.FactoryInterface, camundaFactory interfaces.FactoryInterface, marshallerFactory marshaller.FactoryInterface, timescaleFactory timescale.FactoryInterface)
Types ¶
type CmdWorker ¶
type CmdWorker struct {
// contains filtered or unexported fields
}
func New ¶
func New(ctx context.Context, config util.Config, comFactory com.FactoryInterface, repoFactory devicerepository.FactoryInterface, camundaFactory interfaces.FactoryInterface, marshallerFactory marshaller.FactoryInterface, timescaleFactory timescale.FactoryInterface) (w *CmdWorker, err error)
func (*CmdWorker) CreateProtocolMessage ¶
func (this *CmdWorker) CreateProtocolMessage(command messages.Command, task messages.CamundaExternalTask) (request *messages.KafkaMessage, event *messages.EventRequest, err error)
CreateProtocolMessage implements: devicegroups.Callback
func (*CmdWorker) ErrorMessageHandler ¶
func (*CmdWorker) ExecuteCommand ¶
func (*CmdWorker) ExecuteNextTasks ¶
func (*CmdWorker) ExecuteTask ¶
func (this *CmdWorker) ExecuteTask(task messages.CamundaExternalTask, caller string)
func (*CmdWorker) GetLastEventValue ¶
func (*CmdWorker) GetQueuedResponseHandler ¶
func (*CmdWorker) GetState ¶
func (this *CmdWorker) GetState() WorkerState
func (*CmdWorker) HandleTaskResponse ¶
func (*CmdWorker) LastProducerCallSuccessful ¶
func (*CmdWorker) SinceLastSuccessfulCamundaCall ¶
type DeviceGroupsHandler ¶
type DeviceGroupsHandler interface { ProcessCommand(request messages.Command, task messages.CamundaExternalTask, caller string) (completed bool, missingRequests messages.RequestInfoList, finishedResults []interface{}, err error) ProcessResponse(taskId string, subResult interface{}) (parent messages.GroupTaskMetadataElement, results []interface{}, finished bool, err error) }
type Metrics ¶
type Metrics interface { interfaces.Metrics HandleResponseTrace(trace []messages.Trace) }
type Timescale ¶
type Timescale interface {
Query(token string, request []messages.TimescaleRequest, timeout time.Duration) (result []messages.TimescaleResponse, err error)
}
type WorkerState ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.