mirror of
https://github.com/hanzoai/tasks.git
synced 2026-10-04 02:04:03 +00:00
Goes from 135 MB binary with 1153 files importing go.temporal.io and 224
importing google.golang.org/grpc to a 10 MB native binary with ZERO of
either.
Deleted:
- tasks/, tasktests/, service/, chasm/, client/, api/, proto/, tools/
- cmd/tools/, components/, docker/
- schema/{cassandra,elasticsearch,mysql,postgresql,sqlite}/
- 40 tainted common/ subdirs + 7 top-level common files
- tests/testutils (no longer referenced after surviving deps drop common)
New cmd/tasksd (~100 lines) boots tasks.Embed (zap.Node) + http.Server.
New pkg/tasks/embed.go registers ZAP handlers for the SDK opcode surface
(0x0060-0x00A5). Workflow handlers return a 501 "not yet implemented"
envelope; native engine lands behind this contract.
Build: go build ./cmd/tasksd → 10 MB
Vet: go vet ./... → clean
Boot: tasksd --zap-port 9999 --http :7243
Probes: /healthz, /v1/tasks/health → 200
UI: /_/tasks/, / → 200 (embedded Vite bundle)
ZAP: _tasks._tcp on :9999 (mDNS disabled; direct connect)
go.mod: tidy. No go.temporal.io. No google.golang.org/grpc.
84 lines
3.8 KiB
Go
84 lines
3.8 KiB
Go
package tdbg
|
|
|
|
// Flags used to specify cli command line arguments
|
|
var (
|
|
FlagAddress = "address"
|
|
FlagHistoryAddress = "history-address"
|
|
FlagNamespaceID = "namespace-id"
|
|
FlagNamespace = "namespace"
|
|
FlagNamespaceAlias = []string{"n"}
|
|
FlagShardID = "shard-id"
|
|
FlagWorkflowID = "workflow-id"
|
|
FlagWorkflowIDAlias = []string{"wid"}
|
|
FlagRunID = "run-id"
|
|
FlagRunIDAlias = []string{"rid"}
|
|
FlagBusinessID = "business-id"
|
|
FlagBusinessIDAlias = []string{"bid", FlagWorkflowID, FlagWorkflowIDAlias[0]}
|
|
FlagArchetype = "archetype"
|
|
FlagArchetypeID = "archetype-id"
|
|
FlagNumberOfShards = "number-of-shards"
|
|
FlagMinEventID = "min-event-id"
|
|
FlagMaxEventID = "max-event-id"
|
|
FlagTaskQueue = "task-queue"
|
|
FlagTaskQueueType = "task-queue-type"
|
|
FlagContextTimeout = "context-timeout"
|
|
FlagContextTimeoutAlias = []string{"ct"}
|
|
FlagCluster = "cluster"
|
|
FlagTargetCluster = "target-cluster"
|
|
FlagPageSize = "pagesize"
|
|
FlagFrom = "from"
|
|
FlagPrintFullyDetail = "print-full"
|
|
FlagPrintJSON = "print-json"
|
|
FlagHeartbeatedWithin = "heartbeated-within"
|
|
FlagInputFilename = "input-filename"
|
|
FlagOutputFilename = "output-filename"
|
|
FlagClusterMembershipRole = "role"
|
|
FlagSkipErrorMode = "skip-errors"
|
|
FlagTaskID = "task-id"
|
|
FlagTaskCategory = "task-category"
|
|
FlagTaskVisibilityTimestamp = "task-timestamp"
|
|
FlagMinVisibilityTimestamp = "min-visibility-ts"
|
|
FlagMaxVisibilityTimestamp = "max-visibility-ts"
|
|
FlagEnableTLS = "tls"
|
|
FlagTLSCertPath = "tls-cert-path"
|
|
FlagTLSKeyPath = "tls-key-path"
|
|
FlagTLSCaPath = "tls-ca-path"
|
|
FlagTLSDisableHostVerification = "tls-disable-host-verification"
|
|
FlagTLSServerName = "tls-server-name"
|
|
FlagLastMessageID = "last-message-id"
|
|
FlagJobToken = "job-token"
|
|
FlagReason = "reason"
|
|
FlagYes = "yes"
|
|
FlagMore = "more"
|
|
FlagMinEventVersion = "min-event-version"
|
|
FlagMaxEventVersion = "max-event-version"
|
|
FlagMinTaskID = "min-task-id"
|
|
FlagMaxTaskID = "max-task-id"
|
|
FlagSubqueue = "subqueue"
|
|
FlagDLQType = "dlq-type"
|
|
FlagQueueType = "queue-type"
|
|
FlagDLQVersion = "dlq-version"
|
|
FlagMaxMessageCount = "max-message-count"
|
|
FlagProtoType = "type"
|
|
FlagHexData = "hex-data"
|
|
FlagHexFile = "hex-file"
|
|
FlagBinaryFile = "binary-file"
|
|
FlagBase64Data = "base64-data"
|
|
FlagBase64File = "base64-file"
|
|
FlagTaskCategoryID = "task-category-id"
|
|
FlagEncoding = "encoding"
|
|
FlagPartitionID = "partition-id"
|
|
FlagStickyName = "sticky-name"
|
|
FlagBuildIDs = "select-build-id"
|
|
FlagUnversioned = "select-unversioned"
|
|
FlagAllActive = "select-all-active"
|
|
FlagFair = "fair"
|
|
FlagMinPass = "min-pass"
|
|
FlagVisibilityQuery = "query"
|
|
FlagJobID = "job-id"
|
|
FlagDecode = "decode"
|
|
FlagScheduleID = "schedule-id"
|
|
FlagScheduleIDAlias = []string{"sid"}
|
|
FlagTarget = "target"
|
|
)
|