Package intrinsic_proto.services.v1
Service
DynamicReconfiguration
Message
ApplyConfigurationRequest
Message
ApplyConfigurationResponse
Message
DisableServiceResponse
Message
GetInstanceStateRequest
Message
ListInstanceStatesRequest
Message
ListInstanceStatesResponse
Services
service DynamicReconfiguration intrinsic/assets/services/proto/v1/dynamic_reconfiguration.proto
Supports modifying the configuration of a Service without restarting it.
rpc ApplyConfiguration
Request: intrinsic_proto.services.v1.ApplyConfigurationRequest
Response:
intrinsic_proto.services.v1.ApplyConfigurationResponse
Applies a new Service configuration.
service ServiceState intrinsic/assets/services/proto/v1/service_state.proto
Supports querying and modifying the state of a Service instance.
rpc GetState
Request: intrinsic_proto.services.v1.GetStateRequest
Response:
intrinsic_proto.services.v1.SelfState
Returns the current state of the Service instance.
rpc Enable
Request: intrinsic_proto.services.v1.EnableRequest
Response:
intrinsic_proto.services.v1.EnableResponse
Enables the running Service instance. If the state was previously in STATE_CODE_ERROR, it is expected for the Enable routine to perform the necessary steps to resolve the error before enabling. Enabling an already enabled Service should have no effect.
rpc Disable
Request: intrinsic_proto.services.v1.DisableRequest
Response:
intrinsic_proto.services.v1.DisableResponse
Disables the running Service instance. Disabling a Service that is already disabled or in an error state should have no effect since the Service should not be operating and should not be servicing requests.
service SystemServiceState intrinsic/assets/services/proto/v1/system_service_state.proto
Supports querying and modifying the state of a service instance.
Unlike ServiceState, that is implemented by Service authors on a
per-Service basis, SystemServiceState is a solution-wide service that can
be used to introspect and/or modify the state of a Service instance running
in the workcell. It also monitors the state of the running kubernetes
container of the Service, and is capable of surfacing errors, if any.
A note on terminology:
- Upper case "Service" is used to refer to an asset of type Service.
- Lower case "service" is used to refer to an API service.
rpc GetInstanceState
Request: intrinsic_proto.services.v1.GetInstanceStateRequest
Response:
intrinsic_proto.services.v1.InstanceState
Returns the current state of the requested Service instance.
rpc EnableService
Request: intrinsic_proto.services.v1.EnableServiceRequest
Response:
intrinsic_proto.services.v1.EnableServiceResponse
Enables the requested running Service instance if supported.
- If the Service is in STATE_CODE_STOPPED, this will return a FailedPrecondition error.
- If the Service is in STATE_CODE_ENABLED:
- If it does not support reporting its state (read from
supports_service_statein its manifest), this method will return an UnimplementedError. - If the Service supports reporting states, this call should have no effect, but is left to the Service author to implement.
- If the Service is in STATE_CODE_ERROR:
- If it is due to errors in the running kubernetes container, this method will return a FailedPrecondition error.
- If it is the self-reported state of the Service, then this call is expected to perform the necessary steps to resolve the error before enabling the Service. This is left to the Service author to implement.
- If the Service is in STATE_CODE_DISABLED, this call should enable the Service, but is left to the Service author to implement.
rpc DisableService
Request: intrinsic_proto.services.v1.DisableServiceRequest
Response:
intrinsic_proto.services.v1.DisableServiceResponse
Disables the requested running Service instance if supported.
- If the Service is in STATE_CODE_STOPPED, this will return a FailedPrecondition error.
- If the Service is in STATE_CODE_ENABLED:
- If it does not support reporting its state (read from
supports_service_statein its manifest), this method will return an UnimplementedError. - If the Service supports reporting states, this call should disable the Service, but is left to the Service author to implement.
- If the Service is in STATE_CODE_ERROR:
- If it is due to errors in the running kubernetes container, this method will return a FailedPrecondition error.
- If it is the self-reported state of the Service, then this call should have no effect since the Service should not be operating and should not be servicing requests. It is left to the Service author to implement.
- If the Service is in STATE_CODE_DISABLED, this call should have no effect since the Service should not be operating and should not be servicing requests. It is left to the Service author to implement.
rpc RestartService
Request: intrinsic_proto.services.v1.RestartServiceRequest
Response:
intrinsic_proto.services.v1.RestartServiceResponse
Restarts the running Service instance.
A restart request can be received by a Service instance regardless of its state. A restart request received during an ongoing restart will trigger a new operation immediately.
Note: This will stop all ongoing processes in the Service.
rpc ListInstanceStates
Request: intrinsic_proto.services.v1.ListInstanceStatesRequest
Response:
intrinsic_proto.services.v1.ListInstanceStatesResponse
Returns the states for all Service instances in the solution.
Messages
message ApplyConfigurationRequest intrinsic/assets/services/proto/v1/dynamic_reconfiguration.proto
| Field | Type | Description | |
|---|---|---|---|
| 1 | configuration |
google.protobuf.Any
|
The configuration to apply. |
message ApplyConfigurationResponse intrinsic/assets/services/proto/v1/dynamic_reconfiguration.proto
| Field | Type | Description |
|---|
message DisableRequest intrinsic/assets/services/proto/v1/service_state.proto
| Field | Type | Description |
|---|
message DisableResponse intrinsic/assets/services/proto/v1/service_state.proto
| Field | Type | Description |
|---|
message DisableServiceRequest intrinsic/assets/services/proto/v1/system_service_state.proto
| Field | Type | Description | |
|---|---|---|---|
| 1 | name |
string
|
The name of the Service instance. |
message DisableServiceResponse intrinsic/assets/services/proto/v1/system_service_state.proto
| Field | Type | Description |
|---|
message EnableResponse intrinsic/assets/services/proto/v1/service_state.proto
| Field | Type | Description |
|---|
message EnableServiceRequest intrinsic/assets/services/proto/v1/system_service_state.proto
| Field | Type | Description | |
|---|---|---|---|
| 1 | name |
string
|
The name of the Service instance. |
message EnableServiceResponse intrinsic/assets/services/proto/v1/system_service_state.proto
| Field | Type | Description |
|---|
message GetInstanceStateRequest intrinsic/assets/services/proto/v1/system_service_state.proto
| Field | Type | Description | |
|---|---|---|---|
| 1 | name |
string
|
The name of the Service instance. |
message GetStateRequest intrinsic/assets/services/proto/v1/service_state.proto
| Field | Type | Description |
|---|
message InstanceState intrinsic/assets/services/proto/v1/system_service_state.proto
| Field | Type | Description | |
|---|---|---|---|
| 1 | name |
string
|
The name of the Service instance. |
| 2 | state |
intrinsic_proto.services.v1.State
|
The current state of the Service instance. |
message ListInstanceStatesRequest intrinsic/assets/services/proto/v1/system_service_state.proto
| Field | Type | Description |
|---|
message ListInstanceStatesResponse intrinsic/assets/services/proto/v1/system_service_state.proto
| Field | Type | Description | |
|---|---|---|---|
| 1 | states |
repeated
intrinsic_proto.services.v1.InstanceState
|
The states of all Service instances in the solution. The order of the returned states is not guaranteed to be consistent. |
message RestartServiceRequest intrinsic/assets/services/proto/v1/system_service_state.proto
| Field | Type | Description | |
|---|---|---|---|
| 1 | name |
string
|
The name of the Service instance. |
message RestartServiceResponse intrinsic/assets/services/proto/v1/system_service_state.proto
| Field | Type | Description |
|---|
message SelfState intrinsic/assets/services/proto/v1/service_state.proto
Contains details about the state of a Service.
| Field | Type | Description | |
|---|---|---|---|
| 1 | state_code |
intrinsic_proto.services.v1.SelfState.StateCode
|
Current state code of the running Service instance. |
| 2 | extended_status |
optional
intrinsic_proto.status.ExtendedStatus
|
Optional explanation for the current Service's state, unless the Service is in STATE_CODE_ERROR. When in STATE_CODE_ERROR, it is expected that extended_status includes information on what and/or why the Service failed and how to resolve the failure state. |
message State intrinsic/assets/services/proto/v1/system_service_state.proto
Contains details about the state of a Service.
This state is the operational state of a Service instance. It can include information about the state of the running kubernetes container of the Service instance. For example, an error in the running container would result in an error state with an explanation.
If the container is running and is healthy, this State will be a reflection of the self-reported state of the Service instance. If the Service does not report its state, the state will be set to STATE_CODE_ENABLED by default.
| Field | Type | Description | |
|---|---|---|---|
| 1 | state_code |
intrinsic_proto.services.v1.State.StateCode
|
Current state code of the running Service instance. |
| 2 | extended_status |
optional
intrinsic_proto.status.ExtendedStatus
|
Optional explanation for the current Service's state, unless the Service is in STATE_CODE_ERROR. When in STATE_CODE_ERROR, this field includes information on what and/or why the Service failed and how to resolve the failure state. |
Enums
enum StateCode intrinsic/assets/services/proto/v1/service_state.proto
| Name | Number | Description |
|---|---|---|
STATE_CODE_UNSPECIFIED |
0 | Indicates the Service instance is in an unspecified state. |
STATE_CODE_ERROR |
1 | Indicates the Service instance is in an error state. When a state is in STATE_CODE_ERROR, the Service must now allow interaction with the services that it provides. |
STATE_CODE_DISABLED |
2 | When a Service is disabled, it must not allow interaction with the services that it provides. |
STATE_CODE_ENABLED |
3 | When a Service is enabled, it allows interactions with the services that it provides. |
enum StateCode intrinsic/assets/services/proto/v1/system_service_state.proto
| Name | Number | Description |
|---|---|---|
STATE_CODE_UNSPECIFIED |
0 | Indicates the Service instance is in an unspecified state. |
STATE_CODE_ERROR |
1 | Indicates the Service instance is in an error state. |
STATE_CODE_DISABLED |
2 | When a Service is disabled, it must not allow interaction with the services that it provides. |
STATE_CODE_ENABLED |
3 | When a Service is enabled, it allows interactions with the services that it provides. |
STATE_CODE_STOPPED |
4 | Indicates that the Service instance is in a stopped state. This is different from STATE_CODE_DISABLED in that the Service instance is not capable of accepting API requests. |