Resource Service
A microservice for resource management part of the Restorecommerce.
Features
-
Persists resources in a database instance, each of them bound with its own separate collection.
-
Exposes a graph traversal operation (further documented in resource-base-interface).
Configuration
The list of resource names should be specified in the resources configuration in the
config.json file, in order to create them in the database.
Such names should have a matching Protocol Buffers file in the
protos folder where all the fields of resources are defined.
API
This microservice exposes the following gRPC endpoints:
CRUD Operations
The microservice exposes the below CRUD operations for creating or modifying resources.
| Method Name | Request Type | Response Type | Description |
|---|---|---|---|
Create |
|
|
List of \<resourceName> to be created |
Read |
|
|
List of \<resourceName> |
Update |
|
|
List of \<resourceName> to be updated |
Upsert |
|
|
List of \<resourceName> to be created or updated |
Delete |
|
|
List of resource IDs to be deleted |
For detailed fields of protobuf messages io.restorecommerce.resourcebase.ReadRequest and
io.restorecommerce.resourcebase.DeleteRequest refer
resource-base-interface.
Graph Operations
| Method Name | Request Type | Response Type | Description |
|---|---|---|---|
Traversal |
|
|
List of vertices and edges data traversed through the graph |
For detailed fields of protobuf messages io.restorecommerce.graph.TraversalRequest and
io.restorecommerce.graph.TraversalResponse refer
resource-base-interface.
Events
Emitted
List of events emitted by this microservice for below topics:
| Topic Name | Event Name | Description |
|---|---|---|
|
|
system restore response |
|
system reset response |
|
|
system health check response |
|
|
system version response |
Consumed
This microservice consumes messages for the following events by topic:
| Topic Name | Event Name | Description |
|---|---|---|
|
|
for triggering for system restore |
|
for triggering system reset |
|
|
to get system health check |
|
|
to get system version |