As stated previously, APIs are accesible over gRPC with a standardized set of RPCs.
These methods will behave consistently across models.
All readable models have the following RPC signatures:
service ExampleConfigService {
rpc GetOne (ExampleConfigRequest) returns (ExampleConfigResponse);
rpc GetAll (ExampleConfigStreamRequest) returns (stream ExampleConfigStreamResponse);
rpc Subscribe (ExampleConfigStreamRequest) returns (stream ExampleConfigStreamResponse);
}
The ExampleConfigRequest
, ExampleConfigResponse
, ExampleConfigStreamRequest
, and ExampleConfigStreamResponse
are generated wrappers for a given model (ExampleConfig
, in this example). By generating these wrappers we provide further consistency in request parameters.
All wriable models have the following RPC signatures:
service ExampleConfigService {
rpc Set (ExampleConfigSetRequest) returns (ExampleConfigSetResponse);
rpc Delete (ExampleConfigDeleteRequest) returns (ExampleConfigDeleteResponse);
}
The ExampleConfigSetRequest
, ExampleConfigSetResponse
, ExampleConfigDeleteRequest
, and ExampleConfigDeleteResponse
are generated wrappers for a given model (ExampleConfig
, in this example). By generating these wrappers we provide further consistency in request parameters.