apps/node 중심 구현 — TCP+JSON transport, Hexagonal Architecture, mock/cli adapter, fx DI, SQLite 실행 이력 저장. edge/control-plane/worker는 cobra placeholder. 유닛 테스트 및 통합 테스트 클라이언트 계획서 추가.
33 lines
683 B
Go
33 lines
683 B
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"os"
|
|
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
func main() {
|
|
if err := rootCmd().Execute(); err != nil {
|
|
fmt.Fprintln(os.Stderr, err)
|
|
os.Exit(1)
|
|
}
|
|
}
|
|
|
|
func rootCmd() *cobra.Command {
|
|
root := &cobra.Command{
|
|
Use: "iop-worker",
|
|
Short: "IOP Worker — async job processor (placeholder)",
|
|
Long: `iop-worker processes asynchronous jobs from the IOP job queue.
|
|
|
|
This component is a placeholder. Implementation is planned after the node is stable.`,
|
|
}
|
|
root.AddCommand(&cobra.Command{
|
|
Use: "serve",
|
|
Short: "Start the worker",
|
|
Run: func(_ *cobra.Command, _ []string) {
|
|
fmt.Println("iop-worker serve: not yet implemented")
|
|
},
|
|
})
|
|
return root
|
|
}
|