Nydan / poctemporal

POC for Temporal

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

POC Temporal

This repository is a sample worker and http server for triggering Temporal workflow. The application implement TLS for connecting to Temporal cluster.

Separated Worker and Workflow trigger

To run the POC:

  1. Generate certificate by following tls-simple.

  2. Copy the generated /certs folder to this root repo.

  3. Run the docker-compose from tls-simple.

  4. Create a namespace by running this command:

    docker exec tls-simple_temporal-admin-tools_1 tctl --namespace {namespace} namespace register
    

    It run the tctl command from the cluster with TLS. Replace the {namespace} value and change the configuration in development.yaml.

  5. Run the app:

    go run apps/main.go
    
  6. Try to create API request:

    curl --location --request POST 'localhost:8084' \
    --header 'Content-Type: application/json' \
    --data-raw '{
        "Amount": 1000,
        "UserID": "nydan"
    }'
    

About

POC for Temporal


Languages

Language:Go 100.0%