Skip to content

Commit 2b7b56c

Browse files
committed
refactor: change resource name 'nodes' to 'specs'
1 parent 611a884 commit 2b7b56c

14 files changed

Lines changed: 89 additions & 89 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ Adjust settings through `.uniflow.toml` or environment variables.
8989
|----------------------|--------------------------|---------------------------|
9090
| `database.url` | `DATABASE.URL` | `mem://` or `mongodb://` |
9191
| `database.name` | `DATABASE.NAME` | - |
92-
| `collection.nodes` | `COLLECTION.NODES` | `nodes` |
92+
| `collection.specs` | `COLLECTION.SPECS` | `nodes` |
9393
| `collection.secrets` | `COLLECTION.SECRETS` | `secrets` |
9494

9595
## 📊 Benchmark

README_kr.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ pong#
8989
|----------------------|--------------------------|---------------------------|
9090
| `database.url` | `DATABASE.URL` | `mem://` 또는 `mongodb://` |
9191
| `database.name` | `DATABASE.NAME` | - |
92-
| `collection.nodes` | `COLLECTION.NODES` | `nodes` |
92+
| `collection.specs` | `COLLECTION.SPECS` | `nodes` |
9393
| `collection.secrets` | `COLLECTION.SECRETS` | `secrets` |
9494

9595
## 📊 벤치마크

cmd/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Settings can be modified using the `.uniflow.toml` file or system environment va
1111
| `database.url` | `DATABASE.URL` | `mem://` or `mongodb://` |
1212
| `database.name` | `DATABASE.NAME` | - |
1313
| `collection.charts` | `COLLECTION.CHARTS` | `charts` |
14-
| `collection.nodes` | `COLLECTION.NODES` | `nodes` |
14+
| `collection.specs` | `COLLECTION.SPECS` | `nodes` |
1515
| `collection.secrets` | `COLLECTION.SECRETS` | `secrets` |
1616

1717
If you are using [MongoDB](https://www.mongodb.com/), enable [Change Streams](https://www.mongodb.com/docs/manual/changeStreams/) to track resource changes in real time. This requires setting up a [replica set](https://www.mongodb.com/docs/manual/replication/).
@@ -31,7 +31,7 @@ The `start` command executes all node specifications in the specified namespace.
3131
If the namespace is empty, you can provide an initial node specification using the `--from-specs` flag:
3232

3333
```sh
34-
./dist/uniflow start --namespace default --from-specs examples/nodes.yaml
34+
./dist/uniflow start --namespace default --from-specs examples/specs.yaml
3535
```
3636

3737
You can specify an initial secrets file with the `--from-secrets` flag:
@@ -55,7 +55,7 @@ Charts can be initialized using the `--from-charts` flag:
5555
The `apply` command applies the contents of a specified file to the namespace. If no namespace is specified, the `default` namespace is used.
5656

5757
```sh
58-
./dist/uniflowctl apply nodes --namespace default --filename examples/nodes.yaml
58+
./dist/uniflowctl apply nodes --namespace default --filename examples/specs.yaml
5959
```
6060

6161
To apply secrets:
@@ -75,7 +75,7 @@ To apply charts:
7575
The `delete` command removes all resources defined in the specified file. If no namespace is specified, the `default` namespace is used.
7676

7777
```sh
78-
./dist/uniflowctl delete nodes --namespace default --filename examples/nodes.yaml
78+
./dist/uniflowctl delete nodes --namespace default --filename examples/specs.yaml
7979
```
8080

8181
To delete secrets:

cmd/README_kr.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
| `database.url` | `DATABASE.URL` | `mem://` 또는 `mongodb://` |
1212
| `database.name` | `DATABASE.NAME` | - |
1313
| `collection.charts` | `COLLECTION.CHARTS` | `charts` |
14-
| `collection.nodes` | `COLLECTION.NODES` | `nodes` |
14+
| `collection.specs` | `COLLECTION.SPECS` | `nodes` |
1515
| `collection.secrets` | `COLLECTION.SECRETS` | `secrets` |
1616

1717
만약 [MongoDB](https://www.mongodb.com/)를 사용한다면, 리소스의 변경 사항을 실시간으로 추적하기 위해 [변경 스트림](https://www.mongodb.com/docs/manual/changeStreams/)을 활성화해야 합니다. 이를 위해서는 [복제 세트](https://www.mongodb.com/docs/manual/replication/) 설정이 필요합니다.
@@ -31,7 +31,7 @@
3131
네임스페이스가 비어 있을 경우, 초기 노드 명세를 `--from-specs` 플래그로 제공할 수 있습니다:
3232

3333
```sh
34-
./dist/uniflow start --namespace default --from-specs examples/nodes.yaml
34+
./dist/uniflow start --namespace default --from-specs examples/specs.yaml
3535
```
3636

3737
초기 시크릿 파일은 `--from-secrets` 플래그로 설정할 수 있습니다:
@@ -54,7 +54,7 @@
5454
`apply` 명령어는 지정된 파일 내용을 네임스페이스에 적용합니다. 네임스페이스를 지정하지 않으면 기본적으로 `default` 네임스페이스가 사용됩니다.
5555

5656
```sh
57-
./dist/uniflowctl apply nodes --namespace default --filename examples/nodes.yaml
57+
./dist/uniflowctl apply nodes --namespace default --filename examples/specs.yaml
5858
```
5959

6060
시크릿을 적용하려면:
@@ -74,7 +74,7 @@
7474
`delete` 명령어는 지정된 파일에 정의된 모든 리소스를 삭제합니다. 네임스페이스를 지정하지 않으면 기본적으로 `default` 네임스페이스가 사용됩니다.
7575

7676
```sh
77-
./dist/uniflowctl delete nodes --namespace default --filename examples/nodes.yaml
77+
./dist/uniflowctl delete nodes --namespace default --filename examples/specs.yaml
7878
```
7979

8080
시크릿을 삭제하려면:

cmd/pkg/uniflow/main.go

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ const configFile = ".uniflow.toml"
3030
const (
3131
flagDatabaseURL = "database.url"
3232
flagDatabaseName = "database.name"
33-
flagCollectionNodes = "collection.nodes"
33+
flagCollectionSpecs = "collection.specs"
3434
flagCollectionSecrets = "collection.secrets"
3535
flagCollectionCharts = "collection.charts"
3636
)
@@ -41,10 +41,10 @@ const (
4141
opUpdateCharts = "charts.update"
4242
opDeleteCharts = "charts.delete"
4343

44-
opCreateNodes = "nodes.create"
45-
opReadNodes = "nodes.read"
46-
opUpdateNodes = "nodes.update"
47-
opDeleteNodes = "nodes.delete"
44+
opCreateSpecs = "specs.create"
45+
opReadSpecs = "specs.read"
46+
opUpdateSpecs = "specs.update"
47+
opDeleteSpecs = "specs.delete"
4848

4949
opCreateSecrets = "secrets.create"
5050
opReadSecrets = "secrets.read"
@@ -53,7 +53,7 @@ const (
5353
)
5454

5555
func init() {
56-
viper.SetDefault(flagCollectionNodes, "nodes")
56+
viper.SetDefault(flagCollectionSpecs, "specs")
5757
viper.SetDefault(flagCollectionSecrets, "secrets")
5858
viper.SetDefault(flagCollectionCharts, "charts")
5959

@@ -67,7 +67,7 @@ func main() {
6767

6868
databaseURL := viper.GetString(flagDatabaseURL)
6969
databaseName := viper.GetString(flagDatabaseName)
70-
collectionNodes := viper.GetString(flagCollectionNodes)
70+
collectionNodes := viper.GetString(flagCollectionSpecs)
7171
collectionSecrets := viper.GetString(flagCollectionSecrets)
7272
collectionCharts := viper.GetString(flagCollectionCharts)
7373

@@ -106,10 +106,10 @@ func main() {
106106
langs.Store(typescript.Language, typescript.NewCompiler())
107107

108108
nativeTable := system.NewNativeTable()
109-
nativeTable.Store(opCreateNodes, system.CreateResource(specStore))
110-
nativeTable.Store(opReadNodes, system.ReadResource(specStore))
111-
nativeTable.Store(opUpdateNodes, system.UpdateResource(specStore))
112-
nativeTable.Store(opDeleteNodes, system.DeleteResource(specStore))
109+
nativeTable.Store(opCreateSpecs, system.CreateResource(specStore))
110+
nativeTable.Store(opReadSpecs, system.ReadResource(specStore))
111+
nativeTable.Store(opUpdateSpecs, system.UpdateResource(specStore))
112+
nativeTable.Store(opDeleteSpecs, system.DeleteResource(specStore))
113113
nativeTable.Store(opCreateSecrets, system.CreateResource(secretStore))
114114
nativeTable.Store(opReadSecrets, system.ReadResource(secretStore))
115115
nativeTable.Store(opUpdateSecrets, system.UpdateResource(secretStore))

cmd/pkg/uniflowctl/main.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@ const configFile = ".uniflow.toml"
1717
const (
1818
flagDatabaseURL = "database.url"
1919
flagDatabaseName = "database.name"
20-
flagCollectionNodes = "collection.nodes"
20+
flagCollectionSpecs = "collection.specs"
2121
flagCollectionSecrets = "collection.secrets"
2222
flagCollectionCharts = "collection.charts"
2323
)
2424

2525
func init() {
26-
viper.SetDefault(flagCollectionNodes, "nodes")
26+
viper.SetDefault(flagCollectionSpecs, "specs")
2727
viper.SetDefault(flagCollectionSecrets, "secrets")
2828
viper.SetDefault(flagCollectionCharts, "charts")
2929

@@ -37,7 +37,7 @@ func main() {
3737

3838
databaseURL := viper.GetString(flagDatabaseURL)
3939
databaseName := viper.GetString(flagDatabaseName)
40-
collectionNodes := viper.GetString(flagCollectionNodes)
40+
collectionNodes := viper.GetString(flagCollectionSpecs)
4141
collectionSecrets := viper.GetString(flagCollectionSecrets)
4242
collectionCharts := viper.GetString(flagCollectionCharts)
4343

docs/architecture.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -51,39 +51,39 @@ Users can update node specifications by using a Command-Line Interface (CLI) or
5151
name: router
5252
routes:
5353
- method: POST
54-
path: /v1/nodes
54+
path: /v1/specs
5555
port: out[0]
5656
- method: GET
57-
path: /v1/nodes
57+
path: /v1/specs
5858
port: out[1]
5959
- method: PATCH
60-
path: /v1/nodes
60+
path: /v1/specs
6161
port: out[2]
6262
- method: DELETE
63-
path: /v1/nodes
63+
path: /v1/specs
6464
port: out[3]
6565
ports:
6666
out[0]:
67-
- name: nodes_create
67+
- name: specs_create
6868
port: in
6969
out[1]:
70-
- name: nodes_read
70+
- name: specs_read
7171
port: in
7272
out[2]:
73-
- name: nodes_update
73+
- name: specs_update
7474
port: in
7575
out[3]:
76-
- name: nodes_delete
76+
- name: specs_delete
7777
port: in
7878

7979
- kind: block
80-
name: nodes_create
80+
name: specs_create
8181
specs:
8282
- kind: snippet
8383
language: cel
8484
code: 'has(self.body) ? self.body : null'
8585
- kind: native
86-
opcode: nodes.create
86+
opcode: specs.create
8787
- kind: snippet
8888
language: javascript
8989
code: |
@@ -95,13 +95,13 @@ Users can update node specifications by using a Command-Line Interface (CLI) or
9595
}
9696
9797
- kind: block
98-
name: nodes_read
98+
name: specs_read
9999
specs:
100100
- kind: snippet
101101
language: json
102102
code: 'null'
103103
- kind: native
104-
opcode: nodes.read
104+
opcode: specs.read
105105
- kind: snippet
106106
language: javascript
107107
code: |
@@ -113,13 +113,13 @@ Users can update node specifications by using a Command-Line Interface (CLI) or
113113
}
114114
115115
- kind: block
116-
name: nodes_update
116+
name: specs_update
117117
specs:
118118
- kind: snippet
119119
language: cel
120120
code: 'has(self.body) ? self.body : null'
121121
- kind: native
122-
opcode: nodes.update
122+
opcode: specs.update
123123
- kind: snippet
124124
language: javascript
125125
code: |
@@ -131,13 +131,13 @@ Users can update node specifications by using a Command-Line Interface (CLI) or
131131
}
132132
133133
- kind: block
134-
name: nodes_delete
134+
name: specs_delete
135135
specs:
136136
- kind: snippet
137137
language: json
138138
code: 'null'
139139
- kind: native
140-
opcode: nodes.delete
140+
opcode: specs.delete
141141
- kind: snippet
142142
language: javascript
143143
code: |

docs/architecture_kr.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -49,39 +49,39 @@
4949
name: router
5050
routes:
5151
- method: POST
52-
path: /v1/nodes
52+
path: /v1/specs
5353
port: out[0]
5454
- method: GET
55-
path: /v1/nodes
55+
path: /v1/specs
5656
port: out[1]
5757
- method: PATCH
58-
path: /v1/nodes
58+
path: /v1/specs
5959
port: out[2]
6060
- method: DELETE
61-
path: /v1/nodes
61+
path: /v1/specs
6262
port: out[3]
6363
ports:
6464
out[0]:
65-
- name: nodes_create
65+
- name: specs_create
6666
port: in
6767
out[1]:
68-
- name: nodes_read
68+
- name: specs_read
6969
port: in
7070
out[2]:
71-
- name: nodes_update
71+
- name: specs_update
7272
port: in
7373
out[3]:
74-
- name: nodes_delete
74+
- name: specs_delete
7575
port: in
7676

7777
- kind: block
78-
name: nodes_create
78+
name: specs_create
7979
specs:
8080
- kind: snippet
8181
language: cel
8282
code: 'has(self.body) ? self.body : null'
8383
- kind: native
84-
opcode: nodes.create
84+
opcode: specs.create
8585
- kind: snippet
8686
language: javascript
8787
code: |
@@ -93,13 +93,13 @@
9393
}
9494
9595
- kind: block
96-
name: nodes_read
96+
name: specs_read
9797
specs:
9898
- kind: snippet
9999
language: json
100100
code: 'null'
101101
- kind: native
102-
opcode: nodes.read
102+
opcode: specs.read
103103
- kind: snippet
104104
language: javascript
105105
code: |
@@ -111,13 +111,13 @@
111111
}
112112
113113
- kind: block
114-
name: nodes_update
114+
name: specs_update
115115
specs:
116116
- kind: snippet
117117
language: cel
118118
code: 'has(self.body) ? self.body : null'
119119
- kind: native
120-
opcode: nodes.update
120+
opcode: specs.update
121121
- kind: snippet
122122
language: javascript
123123
code: |
@@ -129,13 +129,13 @@
129129
}
130130
131131
- kind: block
132-
name: nodes_delete
132+
name: specs_delete
133133
specs:
134134
- kind: snippet
135135
language: json
136136
code: 'null'
137137
- kind: native
138-
opcode: nodes.delete
138+
opcode: specs.delete
139139
- kind: snippet
140140
language: javascript
141141
code: |

0 commit comments

Comments
 (0)