processorwrappers

package
v0.0.0-...-0117b6e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 2, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package processorwrappers implements different processor wrappers to handle the processors which launches document worker and session worker for now

Package processorwrappers implements different processor wrappers to handle the processors which launches document worker and session worker for now

Package processorwrappers implements different processor wrappers to handle the processors which launches document worker and session worker for now

Package processorwrappers implements different processor wrappers to handle the processors which launches document worker and session worker for now

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetProcessorWrapperDelegateMap

func GetProcessorWrapperDelegateMap() map[utils.WorkerName]func(context.T, *utils.ProcessorWorkerConfig) IProcessorWrapper

GetProcessorWrapperDelegateMap returns preloaded map with worker name and processor wrapper creation function pointer as its key and value

Types

type CommandWorkerProcessorWrapper

type CommandWorkerProcessorWrapper struct {
	// contains filtered or unexported fields
}

CommandWorkerProcessorWrapper defines properties and methods to interact with the processor launched for the document worker

func (*CommandWorkerProcessorWrapper) GetName

GetName returns the name of the processor

func (*CommandWorkerProcessorWrapper) GetStartWorker

GetStartWorker gets the command which launches the command worker in processor

func (*CommandWorkerProcessorWrapper) GetTerminateWorker

func (cpw *CommandWorkerProcessorWrapper) GetTerminateWorker() contracts.DocumentType

GetTerminateWorker gets the command which cancels the command worker in processor

func (*CommandWorkerProcessorWrapper) Initialize

Initialize initializes command processor and launches the reply thread

func (*CommandWorkerProcessorWrapper) PushToProcessor

PushToProcessor submits the command to the processor

func (*CommandWorkerProcessorWrapper) Stop

func (cpw *CommandWorkerProcessorWrapper) Stop()

Stop stops the processor

type IProcessorWrapper

type IProcessorWrapper interface {
	Initialize(outputChan map[contracts.UpstreamServiceName]chan contracts.DocumentResult) error
	GetName() utils.ProcessorName
	GetStartWorker() contracts.DocumentType
	GetTerminateWorker() contracts.DocumentType
	PushToProcessor(contracts.DocumentState) processor.ErrorCode
	Stop()
}

IProcessorWrapper provides basic methods for processor wrapper

func NewCommandWorkerProcessorWrapper

func NewCommandWorkerProcessorWrapper(context context.T, worker *utils.ProcessorWorkerConfig) IProcessorWrapper

NewCommandWorkerProcessorWrapper initiates new processor wrapper which supports document workers

func NewSessionWorkerProcessorWrapper

func NewSessionWorkerProcessorWrapper(context context.T, worker *utils.ProcessorWorkerConfig) IProcessorWrapper

NewSessionWorkerProcessorWrapper initiates new processor wrapper which supports session workers

type SessionWorkerProcessorWrapper

type SessionWorkerProcessorWrapper struct {
	// contains filtered or unexported fields
}

SessionWorkerProcessorWrapper defines properties and methods to interact with the processor launched for the session worker

func (*SessionWorkerProcessorWrapper) GetName

GetName gets the name of the processor wrapper

func (*SessionWorkerProcessorWrapper) GetStartWorker

GetStartWorker gets the command which launches the session worker in processor

func (*SessionWorkerProcessorWrapper) GetTerminateWorker

func (spw *SessionWorkerProcessorWrapper) GetTerminateWorker() contracts.DocumentType

GetTerminateWorker gets the command which cancels the session worker in processor

func (*SessionWorkerProcessorWrapper) Initialize

Initialize initializes session processor and launches the reply thread

func (*SessionWorkerProcessorWrapper) PushToProcessor

PushToProcessor submits the command to the processor

func (*SessionWorkerProcessorWrapper) Stop

func (spw *SessionWorkerProcessorWrapper) Stop()

Stop stops the processor

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL