This project is created to understand Temporal's Microservice approachment. The repo contains:
- Example Temporal Microservice (Launch Microservice)
- Deployment files of Microservice
- API Gateway for triggering or sending a signal to Workflows. (Endpoint would be gRPC or Rest)
Package Name | Description |
---|---|
App | It contains defitinition of Workflow |
Server | API gateway to interact with temporal workflows which is contains GET, CREATE, DELETE, UPDATE Methods |
Worker | Microservice which is reponsible for run Workflows Actions |
Endpoints | Method | Description |
---|---|---|
/ | GET | List of launch workflows |
/ | POST | Create a predefined launch |
/launch/{workflowId}/{runId} | DELETE | Delete a launch |
/launch/{workflowId}/{runId} | UPDATE | Update a launch without paramater(Only for testing endpoint |
/launch/{workflowId}/{runId} | GET | Get a launch properties. (Only state you could get from this endpoint) |
Firstly you should set Temporal server ip as a environment variable.
export TEMPORAL_SERVER_IP=<TEMPORAL IP>
After that you should start API Gateway Server and Temporal worker with the following command
go run server/main.go
go run worker/main.go
API Gateway will serve from port 5000.