Thrift module: worker
Data structures
Struct: Message
Key | Field | Type | Description | Requiredness | Default value |
1 | success | bool | | default | |
2 | message | string | | default | |
Struct: Connection
Key | Field | Type | Description | Requiredness | Default value |
1 | name | string | | default | |
2 | type | string | | default | |
3 | config | map<string , string > | | default | |
Struct: Action
Key | Field | Type | Description | Requiredness | Default value |
1 | name | string | | default | |
2 | code | string | | default | |
Struct: Execute
Key | Field | Type | Description | Requiredness | Default value |
1 | action | string | | default | |
2 | request | Request | | default | |
3 | context | Context | | default | |
Struct: HttpRequest
Key | Field | Type | Description | Requiredness | Default value |
1 | method | string | | default | |
2 | headers | map<string , string > | | default | |
3 | uriFragments | map<string , string > | | default | |
4 | parameters | map<string , string > | | default | |
5 | body | string | | default | |
Struct: RpcRequest
Key | Field | Type | Description | Requiredness | Default value |
1 | arguments | string | | default | |
Struct: Context
Key | Field | Type | Description | Requiredness | Default value |
1 | routeId | i64 | | default | |
2 | baseUrl | string | | default | |
3 | app | App | | default | |
4 | user | User | | default | |
Struct: App
Key | Field | Type | Description | Requiredness | Default value |
1 | id | i64 | | default | |
2 | userId | i64 | | default | |
3 | status | i32 | | default | |
4 | name | string | | default | |
5 | url | string | | default | |
6 | appKey | string | | default | |
7 | scopes | list<string > | | default | |
8 | parameters | list<string > | | default | |
Struct: User
Key | Field | Type | Description | Requiredness | Default value |
1 | id | i64 | | default | |
2 | roleId | i64 | | default | |
3 | categoryId | i64 | | default | |
4 | status | i32 | | default | |
5 | name | string | | default | |
6 | email | string | | default | |
7 | points | i32 | | default | |
Struct: Result
Key | Field | Type | Description | Requiredness | Default value |
1 | response | Response | | default | |
2 | events | list<Event > | | default | |
3 | logs | list<Log > | | default | |
Struct: Response
Key | Field | Type | Description | Requiredness | Default value |
1 | statusCode | i32 | | default | |
2 | headers | map<string , string > | | default | |
3 | body | string | | default | |
Struct: Event
Key | Field | Type | Description | Requiredness | Default value |
1 | eventName | string | | default | |
2 | data | string | | default | |
Struct: Log
Key | Field | Type | Description | Requiredness | Default value |
1 | level | string | | default | |
2 | message | string | | default | |
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