Test your use case with a go gin server, temporal and traefik

Last Update : 21 June, 2024 | Published : 16 June, 2024 | 1 Min Read

How to Test the gin server and traefik in local environment

  • You can test the gin server which contains temporal worker and traefik in local environment using the following command:

    # Go to root directory
    docker compose up -d
    
    # once the containers are up and running you will see the following output
      ✔ Container traefik-temporal-poc-traefik-1                             Running 0.0s
      ✔ Container traefik-temporal-poc-temporal-1                            Started 0.4s
      ✔ Container traefik-temporal-poc-worker-1                              Started 0.5s
      ✔ Container traefik-temporal-poc-server-1                              Started 0.7s
    

    container status

  • To check the status of your traefik, you can click on the traefik link in the browser. https://localhost:8080 browser-view

  • Check the temporal dashboard in the browser. http://localhost:8233/namespaces/default/workflows temporal-dashboard

  • Check the temporal metrics on http://localhost:41393/metrics temporal-metrics

  • Make a post request to run workflows in temporal.

    curl -H 'Content-Type: application/json' -d '{ "name" : "test intelops" }' -X POST http://localhost:7200/start-workflow
    

    success-http

  • The post request will create a new workflow in temporal. You can see the dashboard with the new workflow in the temporal dashboard. http://localhost:8233/namespaces/default/workflows temporal-dashboard-running

  • This workflow will be executed till the worker completes its activity or task. Once it’s done, the workflow will be marked as completed. workflow-completed

  • We can also see the overview/history of the workflow in the temporal dashboard. http://localhost:8233/namespaces/default/workflows temporal-metrics

Looking for Cloud-Native Implementation?

Finding the right talent is pain. More so, keeping up with concepts, culture, technology and tools. We all have been there. Our AI-based automated solutions helps eliminate these issues, making your teams lives easy.

Contact Us