정리: 앱 경로와 바이너리 접두어를 제거한다

This commit is contained in:
toki 2026-05-02 21:16:34 +09:00
parent de1dcc586a
commit ff1d04d6d1
20 changed files with 64 additions and 64 deletions

View file

@ -5,10 +5,10 @@ GOFLAGS ?= -trimpath
all: build
build:
go build $(GOFLAGS) -o bin/iop-node ./apps/node/cmd/iop-node
go build $(GOFLAGS) -o bin/iop-edge ./apps/edge/cmd/iop-edge
go build $(GOFLAGS) -o bin/iop-control-plane ./apps/control-plane/cmd/iop-control-plane
go build $(GOFLAGS) -o bin/iop-worker ./apps/worker/cmd/iop-worker
go build $(GOFLAGS) -o bin/node ./apps/node/cmd/node
go build $(GOFLAGS) -o bin/edge ./apps/edge/cmd/edge
go build $(GOFLAGS) -o bin/control-plane ./apps/control-plane/cmd/control-plane
go build $(GOFLAGS) -o bin/worker ./apps/worker/cmd/worker
tidy:
go mod tidy

View file

@ -29,12 +29,12 @@ IOP는 단일 서비스가 아닌 플랫폼이다. 여러 앱이 협력하여 AI
go mod tidy
# node 빌드
go build -o bin/iop-node ./apps/node/cmd/iop-node
go build -o bin/node ./apps/node/cmd/node
# 실행
./bin/iop-node version
./bin/iop-node config print
./bin/iop-node serve
./bin/node version
./bin/node config print
./bin/node serve
```
## 모노레포 구조

View file

@ -6,7 +6,7 @@
## 포함 경로
- `apps/edge/cmd/iop-edge/` — edge CLI 진입점과 serve 커맨드
- `apps/edge/cmd/edge/` — edge CLI 진입점과 serve 커맨드
- `apps/edge/internal/bootstrap/` — fx 의존성 주입과 서버 시작/종료 lifecycle
- `apps/edge/internal/node/` — 연결된 node registry와 node 선택
- `apps/edge/internal/transport/` — node 연결 수락, capability 요청, run event 수신

View file

@ -6,7 +6,7 @@
## 포함 경로
- `apps/node/cmd/iop-node/` — node CLI 진입점과 서브커맨드
- `apps/node/cmd/node/` — node CLI 진입점과 서브커맨드
- `apps/node/internal/bootstrap/` — fx 의존성 주입과 adapter registry 구성
- `apps/node/internal/node/` — transport handler 구현과 실행 오케스트레이션
- `apps/node/internal/runtime/` — node 도메인 타입과 핵심 인터페이스

View file

@ -110,13 +110,13 @@ ok iop/apps/edge/internal/node 0.002s
### 최종 검증
```
# 터미널 A
$ ./bin/iop-edge serve --config configs/edge.yaml
$ ./bin/edge serve --config configs/edge.yaml
{"level":"info","caller":"transport/server.go:66","msg":"edge listening for nodes","addr":"0.0.0.0:9090"}
{"level":"info","caller":"transport/server.go:75","msg":"node connection established"}
{"level":"info","caller":"transport/server.go:102","msg":"node registered","node_id":"node-001","adapters":1}
# 터미널 B
$ ./bin/iop-node serve --config configs/node.yaml
$ ./bin/node serve --config configs/node.yaml
{"level":"info","caller":"store/store.go:53","msg":"store ready","dsn":"file:iop.db?cache=shared&mode=rwc"}
{"level":"info","caller":"transport/client.go:35","msg":"connected to edge","addr":"localhost:9090","node_id":"node-001"}
@ -124,12 +124,12 @@ $ PATH=/config/go-sdk/go/bin:/config/go-sdk/bin:$PATH go build ./...
(no output)
$ PATH=/config/go-sdk/go/bin:/config/go-sdk/bin:$PATH go test ./...
? iop/apps/control-plane/cmd/iop-control-plane [no test files]
? iop/apps/edge/cmd/iop-edge [no test files]
? iop/apps/control-plane/cmd/control-plane [no test files]
? iop/apps/edge/cmd/edge [no test files]
? iop/apps/edge/internal/bootstrap [no test files]
ok iop/apps/edge/internal/node (cached)
? iop/apps/edge/internal/transport [no test files]
? iop/apps/node/cmd/iop-node [no test files]
? iop/apps/node/cmd/node [no test files]
? iop/apps/node/internal/adapters [no test files]
? iop/apps/node/internal/adapters/cli [no test files]
? iop/apps/node/internal/adapters/mock [no test files]
@ -141,7 +141,7 @@ ok iop/apps/edge/internal/node (cached)
? iop/apps/node/internal/runtime [no test files]
? iop/apps/node/internal/store [no test files]
? iop/apps/node/internal/transport [no test files]
? iop/apps/worker/cmd/iop-worker [no test files]
? iop/apps/worker/cmd/worker [no test files]
? iop/packages/auth [no test files]
? iop/packages/config [no test files]
? iop/packages/jobs [no test files]

View file

@ -55,12 +55,12 @@ $ PATH=/config/go-sdk/go/bin:/config/go-sdk/bin:$PATH go build ./...
(no output)
$ PATH=/config/go-sdk/go/bin:/config/go-sdk/bin:$PATH go test ./...
? iop/apps/control-plane/cmd/iop-control-plane [no test files]
? iop/apps/edge/cmd/iop-edge [no test files]
? iop/apps/control-plane/cmd/control-plane [no test files]
? iop/apps/edge/cmd/edge [no test files]
? iop/apps/edge/internal/bootstrap [no test files]
ok iop/apps/edge/internal/node (cached)
? iop/apps/edge/internal/transport [no test files]
? iop/apps/node/cmd/iop-node [no test files]
? iop/apps/node/cmd/node [no test files]
? iop/apps/node/internal/adapters [no test files]
? iop/apps/node/internal/adapters/cli [no test files]
? iop/apps/node/internal/adapters/mock [no test files]
@ -72,7 +72,7 @@ ok iop/apps/edge/internal/node (cached)
? iop/apps/node/internal/runtime [no test files]
? iop/apps/node/internal/store [no test files]
? iop/apps/node/internal/transport [no test files]
? iop/apps/worker/cmd/iop-worker [no test files]
? iop/apps/worker/cmd/worker [no test files]
? iop/packages/auth [no test files]
? iop/packages/config [no test files]
? iop/packages/jobs [no test files]

View file

@ -584,7 +584,7 @@ PATH=/config/go-sdk/bin:$PATH go build ./apps/node/...
**문제**
- `apps/edge/cmd/iop-edge/main.go:27-29`의 serve 커맨드가 placeholder다.
- `apps/edge/cmd/edge/main.go:27-29`의 serve 커맨드가 placeholder다.
- edge config 구조체가 없다.
- 여러 node가 연결될 수 있는 NodeRegistry가 없다.
@ -873,7 +873,7 @@ func Module(cfg *config.EdgeConfig) fx.Option {
}
```
**`apps/edge/cmd/iop-edge/main.go` — serve 커맨드 구현**
**`apps/edge/cmd/edge/main.go` — serve 커맨드 구현**
```go
// Before (main.go:18-34) 전체
@ -892,7 +892,7 @@ func rootCmd() *cobra.Command {
root := &cobra.Command{...}
root.AddCommand(&cobra.Command{
Use: "serve",
Run: func(...) { fmt.Println("iop-edge serve: not yet implemented") },
Run: func(...) { fmt.Println("edge serve: not yet implemented") },
})
return root
}
@ -922,7 +922,7 @@ func main() {
func rootCmd() *cobra.Command {
root := &cobra.Command{
Use: "iop-edge",
Use: "edge",
Short: "IOP Edge — node gateway server",
}
root.PersistentFlags().StringVarP(&cfgFile, "config", "c", "configs/edge.yaml", "config file path")
@ -973,7 +973,7 @@ metrics:
- [x] `apps/edge/internal/node/registry.go` — 신규 생성
- [x] `apps/edge/internal/transport/server.go` — 신규 생성
- [x] `apps/edge/internal/bootstrap/module.go` — 신규 생성
- [x] `apps/edge/cmd/iop-edge/main.go` — serve 커맨드 구현으로 교체
- [x] `apps/edge/cmd/edge/main.go` — serve 커맨드 구현으로 교체
- [x] `configs/edge.yaml` — listen 포트 9090으로 수정
**테스트 작성**
@ -1049,7 +1049,7 @@ PATH=/config/go-sdk/bin:$PATH go test ./apps/edge/internal/node/...
| `apps/edge/internal/node/registry.go` | REFACTOR-5 | 신규 |
| `apps/edge/internal/transport/server.go` | REFACTOR-5 | 신규 |
| `apps/edge/internal/bootstrap/module.go` | REFACTOR-5 | 신규 |
| `apps/edge/cmd/iop-edge/main.go` | REFACTOR-5 | 수정 |
| `apps/edge/cmd/edge/main.go` | REFACTOR-5 | 수정 |
| `configs/edge.yaml` | REFACTOR-5 | 수정 |
---
@ -1061,8 +1061,8 @@ PATH=/config/go-sdk/bin:$PATH go test ./apps/edge/internal/node/...
**터미널 A — edge 서버 실행:**
```bash
PATH=/config/go-sdk/bin:$PATH go build -o bin/iop-edge ./apps/edge/cmd/iop-edge
./bin/iop-edge serve --config configs/edge.yaml
PATH=/config/go-sdk/bin:$PATH go build -o bin/edge ./apps/edge/cmd/edge
./bin/edge serve --config configs/edge.yaml
```
기대 결과:
@ -1073,8 +1073,8 @@ PATH=/config/go-sdk/bin:$PATH go build -o bin/iop-edge ./apps/edge/cmd/iop-edge
**터미널 B — node 실행 (edge에 연결):**
```bash
PATH=/config/go-sdk/bin:$PATH go build -o bin/iop-node ./apps/node/cmd/iop-node
./bin/iop-node serve --config configs/node.yaml
PATH=/config/go-sdk/bin:$PATH go build -o bin/node ./apps/node/cmd/node
./bin/node serve --config configs/node.yaml
```
기대 결과 — node 로그:

View file

@ -79,7 +79,7 @@ ok iop/apps/node/internal/node 0.004s
### 최종 검증
```
$ PATH=/config/go-sdk/go/bin:/config/go-sdk/bin:$PATH go test ./apps/node/...
? iop/apps/node/cmd/iop-node [no test files]
? iop/apps/node/cmd/node [no test files]
? iop/apps/node/internal/adapters [no test files]
? iop/apps/node/internal/adapters/cli [no test files]
? iop/apps/node/internal/adapters/mock [no test files]
@ -93,12 +93,12 @@ ok iop/apps/node/internal/node (cached)
ok iop/apps/node/internal/transport (cached)
$ PATH=/config/go-sdk/go/bin:/config/go-sdk/bin:$PATH go test ./...
? iop/apps/control-plane/cmd/iop-control-plane [no test files]
? iop/apps/edge/cmd/iop-edge [no test files]
? iop/apps/control-plane/cmd/control-plane [no test files]
? iop/apps/edge/cmd/edge [no test files]
? iop/apps/edge/internal/bootstrap [no test files]
ok iop/apps/edge/internal/node (cached)
? iop/apps/edge/internal/transport [no test files]
? iop/apps/node/cmd/iop-node [no test files]
? iop/apps/node/cmd/node [no test files]
? iop/apps/node/internal/adapters [no test files]
? iop/apps/node/internal/adapters/cli [no test files]
? iop/apps/node/internal/adapters/mock [no test files]
@ -110,7 +110,7 @@ ok iop/apps/node/internal/node (cached)
? iop/apps/node/internal/runtime [no test files]
? iop/apps/node/internal/store [no test files]
ok iop/apps/node/internal/transport (cached)
? iop/apps/worker/cmd/iop-worker [no test files]
? iop/apps/worker/cmd/worker [no test files]
? iop/packages/auth [no test files]
? iop/packages/config [no test files]
? iop/packages/jobs [no test files]

View file

@ -79,7 +79,7 @@ ok iop/apps/node/internal/node 0.004s
### 최종 검증
```
$ PATH=/config/go-sdk/go/bin:/config/go-sdk/bin:$PATH go test ./apps/node/...
? iop/apps/node/cmd/iop-node [no test files]
? iop/apps/node/cmd/node [no test files]
? iop/apps/node/internal/adapters [no test files]
? iop/apps/node/internal/adapters/cli [no test files]
? iop/apps/node/internal/adapters/mock [no test files]
@ -93,12 +93,12 @@ ok iop/apps/node/internal/node (cached)
ok iop/apps/node/internal/transport (cached)
$ PATH=/config/go-sdk/go/bin:/config/go-sdk/bin:$PATH go test ./...
? iop/apps/control-plane/cmd/iop-control-plane [no test files]
? iop/apps/edge/cmd/iop-edge [no test files]
? iop/apps/control-plane/cmd/control-plane [no test files]
? iop/apps/edge/cmd/edge [no test files]
? iop/apps/edge/internal/bootstrap [no test files]
ok iop/apps/edge/internal/node (cached)
? iop/apps/edge/internal/transport [no test files]
? iop/apps/node/cmd/iop-node [no test files]
? iop/apps/node/cmd/node [no test files]
? iop/apps/node/internal/adapters [no test files]
? iop/apps/node/internal/adapters/cli [no test files]
? iop/apps/node/internal/adapters/mock [no test files]
@ -110,7 +110,7 @@ ok iop/apps/node/internal/node (cached)
? iop/apps/node/internal/runtime [no test files]
? iop/apps/node/internal/store [no test files]
ok iop/apps/node/internal/transport (cached)
? iop/apps/worker/cmd/iop-worker [no test files]
? iop/apps/worker/cmd/worker [no test files]
? iop/packages/auth [no test files]
? iop/packages/config [no test files]
? iop/packages/jobs [no test files]

View file

@ -62,7 +62,7 @@ ok iop/apps/node/internal/node 1.471s
### 최종 검증
```
$ go test -race ./apps/node/...
? iop/apps/node/cmd/iop-node [no test files]
? iop/apps/node/cmd/node [no test files]
? iop/apps/node/internal/adapters [no test files]
? iop/apps/node/internal/adapters/cli [no test files]
? iop/apps/node/internal/adapters/mock [no test files]
@ -76,12 +76,12 @@ ok iop/apps/node/internal/node (cached)
ok iop/apps/node/internal/transport (cached)
$ go test ./...
? iop/apps/control-plane/cmd/iop-control-plane [no test files]
? iop/apps/edge/cmd/iop-edge [no test files]
? iop/apps/control-plane/cmd/control-plane [no test files]
? iop/apps/edge/cmd/edge [no test files]
? iop/apps/edge/internal/bootstrap [no test files]
ok iop/apps/edge/internal/node 0.356s
? iop/apps/edge/internal/transport [no test files]
? iop/apps/node/cmd/iop-node [no test files]
? iop/apps/node/cmd/node [no test files]
? iop/apps/node/internal/adapters [no test files]
? iop/apps/node/internal/adapters/cli [no test files]
? iop/apps/node/internal/adapters/mock [no test files]
@ -93,7 +93,7 @@ ok iop/apps/node/internal/node 0.392s
? iop/apps/node/internal/runtime [no test files]
? iop/apps/node/internal/store [no test files]
ok iop/apps/node/internal/transport 0.517s
? iop/apps/worker/cmd/iop-worker [no test files]
? iop/apps/worker/cmd/worker [no test files]
? iop/packages/auth [no test files]
? iop/packages/config [no test files]
? iop/packages/jobs [no test files]

View file

@ -1,4 +1,4 @@
# iop-control-plane — Control Plane
# control-plane — Control Plane
노드 등록, 정책 적용, 작업 스케줄링을 담당한다.

View file

@ -16,9 +16,9 @@ func main() {
func rootCmd() *cobra.Command {
root := &cobra.Command{
Use: "iop-control-plane",
Use: "control-plane",
Short: "IOP Control Plane — node registry, policy, scheduling (placeholder)",
Long: `iop-control-plane manages node registration, enforces policy,
Long: `control-plane manages node registration, enforces policy,
and schedules jobs to nodes.
This component is a placeholder. Implementation is planned after the node is stable.`,
@ -27,7 +27,7 @@ This component is a placeholder. Implementation is planned after the node is sta
Use: "serve",
Short: "Start the control-plane server",
Run: func(_ *cobra.Command, _ []string) {
fmt.Println("iop-control-plane serve: not yet implemented")
fmt.Println("control-plane serve: not yet implemented")
},
})
return root

View file

@ -1,4 +1,4 @@
# iop-edge — Edge API Gateway
# edge — Edge API Gateway
외부 클라이언트에 OpenAI-compatible HTTP API를 노출하고,
IOP 내부 TCP 프로토콜을 통해 node로 요청을 라우팅한다.

View file

@ -22,7 +22,7 @@ func main() {
func rootCmd() *cobra.Command {
root := &cobra.Command{
Use: "iop-edge",
Use: "edge",
Short: "IOP Edge — node gateway server",
}
root.PersistentFlags().StringVarP(&cfgFile, "config", "c", "configs/edge.yaml", "config file path")

View file

@ -1,4 +1,4 @@
# iop-node — Node Agent
# node — Node Agent
디바이스당 1개 실행되는 IOP 노드 에이전트.
실제 AI 모델 추론 어댑터를 관리하고, TCP + Protobuf + mTLS 소켓을 통해 요청을 처리한다.
@ -6,7 +6,7 @@
## 내부 구조 (Hexagonal Architecture)
```
cmd/iop-node/ — CLI 진입점 (cobra)
cmd/node/ — CLI 진입점 (cobra)
internal/
bootstrap/ — fx 의존성 주입 모듈
node/ — 핵심 노드 서비스 (transport.Handler 구현)
@ -25,16 +25,16 @@ internal/
```bash
# 빌드
go build -o bin/iop-node ./apps/node/cmd/iop-node
go build -o bin/node ./apps/node/cmd/node
# 버전 확인
./bin/iop-node version
./bin/node version
# 설정 확인
./bin/iop-node config print --config configs/node.yaml
./bin/node config print --config configs/node.yaml
# 서버 실행
./bin/iop-node serve --config configs/node.yaml
./bin/node serve --config configs/node.yaml
```
## 어댑터

View file

@ -24,7 +24,7 @@ func main() {
func rootCmd() *cobra.Command {
root := &cobra.Command{
Use: "iop-node",
Use: "node",
Short: "IOP Node Agent — runs inference adapters on this device",
}
root.PersistentFlags().StringVarP(&cfgFile, "config", "c", "configs/node.yaml", "config file path")

View file

@ -1,4 +1,4 @@
# iop-worker — Async Worker
# worker — Async Worker
비동기 작업 큐에서 작업을 꺼내어 처리한다.

View file

@ -16,9 +16,9 @@ func main() {
func rootCmd() *cobra.Command {
root := &cobra.Command{
Use: "iop-worker",
Use: "worker",
Short: "IOP Worker — async job processor (placeholder)",
Long: `iop-worker processes asynchronous jobs from the IOP job queue.
Long: `worker processes asynchronous jobs from the IOP job queue.
This component is a placeholder. Implementation is planned after the node is stable.`,
}
@ -26,7 +26,7 @@ This component is a placeholder. Implementation is planned after the node is sta
Use: "serve",
Short: "Start the worker",
Run: func(_ *cobra.Command, _ []string) {
fmt.Println("iop-worker serve: not yet implemented")
fmt.Println("worker serve: not yet implemented")
},
})
return root

View file

@ -1,6 +1,6 @@
node:
id: "node-001"
name: "iop-node-local"
name: "node-local"
transport:
edge_addr: "localhost:9090"

View file

@ -2,7 +2,7 @@ worker:
concurrency: 8
sqlite:
dsn: "file:iop-worker.db?cache=shared&mode=rwc"
dsn: "file:worker.db?cache=shared&mode=rwc"
logging:
level: "info"