|
1 | 1 | # frozen_string_literal: true |
2 | 2 |
|
3 | 3 | module Types |
4 | | - class RuntimeStatusType < BaseEnum |
5 | | - description 'Represent all available types of statuses of a runtime' |
| 4 | + class RuntimeStatusType < Types::BaseObject |
| 5 | + description 'A runtime status information entry' |
6 | 6 |
|
7 | | - value :CONNECTED, 'No problem with connection, everything works as expected', value: 'connected' |
8 | | - value :DISCONNECTED, 'The runtime is disconnected, cause unknown', value: 'disconnected' |
| 7 | + authorize :read_runtime |
| 8 | + |
| 9 | + field :configurations, Types::RuntimeStatusConfigurationType.connection_type, |
| 10 | + null: false, |
| 11 | + description: 'The detailed configuration entries for this runtime status (only for adapters)', |
| 12 | + method: :runtime_status_configurations |
| 13 | + field :identifier, String, |
| 14 | + null: false, |
| 15 | + description: 'The unique identifier for this runtime status' |
| 16 | + field :last_heartbeat, Types::TimeType, |
| 17 | + null: true, |
| 18 | + description: 'The timestamp of the last heartbeat received from the runtime' |
| 19 | + field :runtime_features, [Types::RuntimeFeatureType], |
| 20 | + null: false, |
| 21 | + description: 'The set of features supported by the runtime' |
| 22 | + field :status, Types::RuntimeStatusStatusEnum, |
| 23 | + null: false, |
| 24 | + description: 'The current status of the runtime (e.g. running, stopped)' |
| 25 | + field :type, Types::RuntimeStatusTypeEnum, |
| 26 | + null: false, |
| 27 | + description: 'The type of runtime status information (e.g. adapter, execution)', |
| 28 | + method: :status_type |
| 29 | + |
| 30 | + id_field RuntimeStatus |
| 31 | + timestamps |
9 | 32 | end |
10 | 33 | end |
0 commit comments