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.
75 lines
2.6 KiB
Go
75 lines
2.6 KiB
Go
// Code generated by protoc-gen-go-helpers. DO NOT EDIT.
|
|
package enums
|
|
|
|
import (
|
|
"fmt"
|
|
)
|
|
|
|
var (
|
|
ReplicationTaskType_shorthandValue = map[string]int32{
|
|
"Unspecified": 0,
|
|
"NamespaceTask": 1,
|
|
"HistoryTask": 2,
|
|
"SyncShardStatusTask": 3,
|
|
"SyncActivityTask": 4,
|
|
"HistoryMetadataTask": 5,
|
|
"HistoryV2Task": 6,
|
|
"SyncWorkflowStateTask": 7,
|
|
"TaskQueueUserData": 8,
|
|
"SyncHsmTask": 9,
|
|
"BackfillHistoryTask": 10,
|
|
"VerifyVersionedTransitionTask": 11,
|
|
"SyncVersionedTransitionTask": 12,
|
|
"DeleteExecutionTask": 13,
|
|
}
|
|
)
|
|
|
|
// ReplicationTaskTypeFromString parses a ReplicationTaskType value from either the protojson
|
|
// canonical SCREAMING_CASE enum or the traditional temporal PascalCase enum to ReplicationTaskType
|
|
func ReplicationTaskTypeFromString(s string) (ReplicationTaskType, error) {
|
|
if v, ok := ReplicationTaskType_value[s]; ok {
|
|
return ReplicationTaskType(v), nil
|
|
} else if v, ok := ReplicationTaskType_shorthandValue[s]; ok {
|
|
return ReplicationTaskType(v), nil
|
|
}
|
|
return ReplicationTaskType(0), fmt.Errorf("%s is not a valid ReplicationTaskType", s)
|
|
}
|
|
|
|
var (
|
|
NamespaceOperation_shorthandValue = map[string]int32{
|
|
"Unspecified": 0,
|
|
"Create": 1,
|
|
"Update": 2,
|
|
}
|
|
)
|
|
|
|
// NamespaceOperationFromString parses a NamespaceOperation value from either the protojson
|
|
// canonical SCREAMING_CASE enum or the traditional temporal PascalCase enum to NamespaceOperation
|
|
func NamespaceOperationFromString(s string) (NamespaceOperation, error) {
|
|
if v, ok := NamespaceOperation_value[s]; ok {
|
|
return NamespaceOperation(v), nil
|
|
} else if v, ok := NamespaceOperation_shorthandValue[s]; ok {
|
|
return NamespaceOperation(v), nil
|
|
}
|
|
return NamespaceOperation(0), fmt.Errorf("%s is not a valid NamespaceOperation", s)
|
|
}
|
|
|
|
var (
|
|
ReplicationFlowControlCommand_shorthandValue = map[string]int32{
|
|
"Unspecified": 0,
|
|
"Resume": 1,
|
|
"Pause": 2,
|
|
}
|
|
)
|
|
|
|
// ReplicationFlowControlCommandFromString parses a ReplicationFlowControlCommand value from either the protojson
|
|
// canonical SCREAMING_CASE enum or the traditional temporal PascalCase enum to ReplicationFlowControlCommand
|
|
func ReplicationFlowControlCommandFromString(s string) (ReplicationFlowControlCommand, error) {
|
|
if v, ok := ReplicationFlowControlCommand_value[s]; ok {
|
|
return ReplicationFlowControlCommand(v), nil
|
|
} else if v, ok := ReplicationFlowControlCommand_shorthandValue[s]; ok {
|
|
return ReplicationFlowControlCommand(v), nil
|
|
}
|
|
return ReplicationFlowControlCommand(0), fmt.Errorf("%s is not a valid ReplicationFlowControlCommand", s)
|
|
}
|