Thrift module: worker

ModuleServicesData typesConstants
workerWorker
Action
App
Connection
Context
Event
Execute
HttpRequest
Log
Message
Request
Response
Result
RpcRequest
User

Data structures

Struct: Message

KeyFieldTypeDescriptionRequirednessDefault value
1successbooldefault
2messagestringdefault

Struct: Connection

KeyFieldTypeDescriptionRequirednessDefault value
1namestringdefault
2typestringdefault
3configmap<string, string>default

Struct: Action

KeyFieldTypeDescriptionRequirednessDefault value
1namestringdefault
2codestringdefault

Struct: Execute

KeyFieldTypeDescriptionRequirednessDefault value
1actionstringdefault
2requestRequestdefault
3contextContextdefault

Union: Request

KeyFieldTypeDescriptionRequirednessDefault value
1httpHttpRequestoptional
2rpcRpcRequestoptional

Struct: HttpRequest

KeyFieldTypeDescriptionRequirednessDefault value
1methodstringdefault
2headersmap<string, string>default
3uriFragmentsmap<string, string>default
4parametersmap<string, string>default
5bodystringdefault

Struct: RpcRequest

KeyFieldTypeDescriptionRequirednessDefault value
1argumentsstringdefault

Struct: Context

KeyFieldTypeDescriptionRequirednessDefault value
1routeIdi64default
2baseUrlstringdefault
3appAppdefault
4userUserdefault

Struct: App

KeyFieldTypeDescriptionRequirednessDefault value
1idi64default
2userIdi64default
3statusi32default
4namestringdefault
5urlstringdefault
6appKeystringdefault
7scopeslist<string>default
8parameterslist<string>default

Struct: User

KeyFieldTypeDescriptionRequirednessDefault value
1idi64default
2roleIdi64default
3categoryIdi64default
4statusi32default
5namestringdefault
6emailstringdefault
7pointsi32default

Struct: Result

KeyFieldTypeDescriptionRequirednessDefault value
1responseResponsedefault
2eventslist<Event>default
3logslist<Log>default

Struct: Response

KeyFieldTypeDescriptionRequirednessDefault value
1statusCodei32default
2headersmap<string, string>default
3bodystringdefault

Struct: Event

KeyFieldTypeDescriptionRequirednessDefault value
1eventNamestringdefault
2datastringdefault

Struct: Log

KeyFieldTypeDescriptionRequirednessDefault value
1levelstringdefault
2messagestringdefault


Services

Service: Worker

The Fusio Worker provides a simple interface so that the Fusio instance can interact with the worker.

Function: Worker.setConnection

Message setConnection(Connection connection)
Sets a specific connection to the worker. This method is invoked everytime a connection is created or updated at
the Fusio instance. The worker must persist the connection so at it can be reused on execution

Function: Worker.setAction

Message setAction(Action action)
Sets a specific action to the worker. This method is invoked everytime an action is created or updated at the Fusio
instance. The worker must persist the action code at a file which then can be executed. If your language needs a
compile step it should be invoked at this call

Function: Worker.executeAction

Result executeAction(Execute execute)
Is called if an user invokes a route at Fusio and this routes has a worker action assigned. The worker must then
execute the provided action name and return the response