This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
├── /app/ | |
│ ├── main.go # the place where you will put the worker service code | |
│ ├── go.mod # the go module delaraction | |
│ ├── go.sum # the go sum with versions | |
│ ├── /customer # Customer folder holds any code related to customer domain | |
| | └── repository.go # Repository holds the inMemory Cache for Customeres, Replace with a DB if wanted | |
│ ├── /workflows # workflows holds all the available workflows for the Domain | |
| | └── /greetings/ # Workflow and Activities for Greetings | |
| | └── greetings.go | |
├── /cadence/ # All Related Cadence stuff goes here |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package customer | |
import ( | |
"fmt" | |
"time" | |
) | |
var ( | |
// Bad Solution for in mem during tutorial |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
percy@awesome:~/development/cadence-demo/app$ go run main.go | |
2022-02-27T08:08:08.411+0100 INFO internal/internal_worker.go:826 Worker has no workflows registered, so workflow worker will not be started. {"Domain": "tavern", "TaskList": "greetings", "WorkerID": "16765@DESKTOP-3DP516F@greetings@b2b05411-9dbc-4bf3-a241-2a949da322b6"} | |
2022-02-27T08:08:08.411+0100 INFO internal/internal_worker.go:834 Started Workflow Worker {"Domain": "tavern", "TaskList": "greetings", "WorkerID": "16765@DESKTOP-3DP516F@greetings@b2b05411-9dbc-4bf3-a241-2a949da322b6"} | |
2022-02-27T08:08:08.412+0100 INFO internal/internal_worker.go:838 Worker has no activities registered, so activity worker will not be started. {"Domain": "tavern", "TaskList": "greetings", "WorkerID": "16765@DESKTOP-3DP516F@greetings@b2b05411-9dbc-4bf3-a241-2a949da322b6"} | |
2022-02-27T08:08:08.412+0100 INFO app/main.go:44 Started Worker. {"worker": "greetings"} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
_ "go.uber.org/cadence/.gen/go/cadence" | |
"go.uber.org/cadence/.gen/go/cadence/workflowserviceclient" | |
"go.uber.org/cadence/worker" | |
"github.com/uber-go/tally" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func New( | |
service workflowserviceclient.Interface, | |
domain string, | |
taskList string, | |
options Options, | |
) Worker { | |
return internal.NewWorker(service, domain, taskList, options) | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
├── /app/ | |
│ ├── main.go # the place where you will put the worker service code | |
│ ├── go.mod # the go module delaraction | |
│ ├── go.sum # the go sum with versions | |
├── /cadence/ # All Related Cadence stuff goes here | |
│ ├── /data/ # | |
| | └── /mysql/ # The folder mounted onto the Docker to persist data for Mysql | |
| | └── /prometheus/ # The folder mounted onto the Docker to persist data for Prometheus | |
│ ├── /prometheus/ # Folder related to Prometheus |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3' | |
services: | |
mysql: | |
image: mysql:5.7 | |
ports: | |
- "3306:3306" | |
environment: | |
- "MYSQL_ROOT_PASSWORD=root" | |
volumes: | |
- ./data/mysql/:/var/lib/mysql |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
├── /app/ | |
├── /cadence/ # All Related Cadence stuff goes here | |
│ ├── /data/ # | |
| | └── /mysql/ # The folder mounted onto the Docker to persist data for Mysql | |
| | └── /prometheus/ # The folder mounted onto the Docker to persist data for Prometheus | |
│ ├── /prometheus/ # Folder related to Prometheus | |
| | └── prometheus.yml # Prometheus config file | |
| | └── prometheus_config_multicluster.yml # Prometheus config file for multi clusters | |
│ └── docker-compose.yml # Your docker-compose selected from the Cadence repo based on your persistent storage |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
goos: windows | |
goarch: amd64 | |
pkg: programmingpercy/benchgeneric | |
cpu: Intel(R) Core(TM) i7-10750H CPU @ 2.60GHz | |
Benchmark_Structures | |
Benchmark_Structures/Person_Generic_Move | |
Benchmark_Structures/Person_Generic_Move-4 1000000000 4.690 ns/op | |
Benchmark_Structures/Person_Generic_Move-4 1000000000 4.668 ns/op | |
Benchmark_Structures/Person_Generic_Move-4 1000000000 4.727 ns/op | |
Benchmark_Structures/Person_Generic_Move-4 1000000000 4.664 ns/op |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package benchmarking | |
import "testing" | |
func Benchmark_Structures(b *testing.B) { | |
// Init the structs | |
p := &Person[float32]{Name: "John"} | |
c := &Car[int]{Name: "Ferrari"} |