Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: Decoupled type #549

Merged
merged 75 commits into from
May 25, 2022
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
Show all changes
75 commits
Select commit Hold shift + click to select a range
5485ede
decouple Name and Type
akkw May 8, 2022
7531b39
decouple Name and Type
akkw May 8, 2022
5bcf169
Merge branch 'main' into decoupled_type
akkw May 8, 2022
f9e525b
decouple Name and Type
akkw May 8, 2022
7e4a4e4
decouple Name and Type
akkw May 8, 2022
1480708
Merge branch 'main' of github.com:mosn/layotto into decoupled_type
akkw May 11, 2022
aefe748
decouple Name and Type
akkw May 11, 2022
740fa08
Merge branch 'main' into decoupled_type
zhenjunMa May 12, 2022
7f6b720
Merge branch 'main' into decoupled_type
seeflood May 12, 2022
aa23245
Merge branch 'main' into decoupled_type
seeflood May 13, 2022
2b02e13
decouple Name and Type
akkw May 14, 2022
3ccfc2f
decouple Name and Type
akkw May 14, 2022
c2e2d35
decouple Name and Type
akkw May 14, 2022
aa6835e
decouple Name and Type
akkw May 14, 2022
cbecd72
decouple Name and Type
akkw May 14, 2022
625615a
decouple Name and Type
akkw May 14, 2022
47ae961
decouple Name and Type
akkw May 14, 2022
1bc3ec8
decouple Name and Type
akkw May 14, 2022
928a504
decouple Name and Type
akkw May 14, 2022
98def9e
decouple Name and Type
akkw May 14, 2022
36213b2
decouple Name and Type
akkw May 14, 2022
bde6ef3
decouple Name and Type
akkw May 14, 2022
18c3006
decouple Name and Type
akkw May 15, 2022
045a09b
decouple Name and Type
akkw May 15, 2022
ffdb3b4
Merge branch 'main' into decoupled_type
Xunzhuo May 15, 2022
cebed22
decouple Name and Type
akkw May 15, 2022
a349906
decouple Name and Type
akkw May 15, 2022
7483638
decouple Name and Type
akkw May 15, 2022
a7eb031
decouple Name and Type
akkw May 15, 2022
1891524
decouple Name and Type
akkw May 15, 2022
210ea47
decouple Name and Type
akkw May 15, 2022
7fe5458
decouple Name and Type
akkw May 15, 2022
2378a09
decouple Name and Type
akkw May 15, 2022
ccdbef6
decouple Name and Type
akkw May 15, 2022
208e89f
decouple Name and Type
akkw May 15, 2022
a6889fd
decouple Name and Type
akkw May 15, 2022
7872978
decouple Name and Type
akkw May 15, 2022
a78492f
decouple Name and Type
akkw May 15, 2022
5230f1a
Merge branch 'main' into decoupled_type
seeflood May 16, 2022
671ab35
decouple Name and Type
akkw May 16, 2022
eca8ecc
decouple Name and Type
akkw May 16, 2022
3fabb6e
decouple Name and Type
akkw May 16, 2022
cc16133
decouple Name and Type
akkw May 16, 2022
4ff1c6b
decouple Name and Type
akkw May 16, 2022
12d1f58
decouple Name and Type
akkw May 17, 2022
a073161
decouple Name and Type
akkw May 17, 2022
5c073e9
decouple Name and Type
akkw May 17, 2022
26ab6e1
decouple Name and Type
akkw May 17, 2022
0584b18
Merge branch 'main' into decoupled_type
akkw May 18, 2022
2b6fba7
update wasm demo
zhenjunMa May 18, 2022
fe5a2f8
Merge branch 'main' into decoupled_type
seeflood May 19, 2022
ae5d00a
add type field
seeflood May 19, 2022
cc55fb3
modify custom component
seeflood May 19, 2022
d940cf9
fix typo
seeflood May 19, 2022
17a8c10
demo -> mosn
seeflood May 19, 2022
b54b43d
fix typo
seeflood May 19, 2022
86253bf
decouple Name and Type
akkw May 19, 2022
45ce426
decouple Name and Type
akkw May 19, 2022
7137fde
decouple Name and Type
akkw May 19, 2022
8392e11
decouple Name and Type
akkw May 21, 2022
505339c
Merge branch 'main' of github.com:mosn/layotto into decoupled_type
akkw May 21, 2022
8452cc9
decouple Name and Type
akkw May 21, 2022
800af6d
improve runtime_test.go
seeflood May 23, 2022
8a0eda9
fix ut
seeflood May 23, 2022
1f16729
decouple Name and Type
akkw May 24, 2022
8666733
Merge branch 'decoupled_type' of github.com:akkw/layotto into decoupl…
akkw May 24, 2022
f95470f
Merge branch 'main' of github.com:mosn/layotto into decoupled_type
akkw May 24, 2022
aabed76
Merge branch 'main' of github.com:mosn/layotto into decoupled_type
akkw May 24, 2022
201c561
decouple Name and Type
akkw May 24, 2022
760fc30
decouple Name and Type
akkw May 24, 2022
b1263b5
decouple Name and Type
akkw May 24, 2022
0c9c2cf
decouple Name and Type
akkw May 24, 2022
d996572
decouple Name and Type
akkw May 24, 2022
eeab6f0
decouple Name and Type
akkw May 24, 2022
405a271
fix ut
seeflood May 25, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions components/configstores/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ package configstores

// StoreConfig wraps configuration for a store implementation
type StoreConfig struct {
Type string `json:"type"`
akkw marked this conversation as resolved.
Show resolved Hide resolved
StoreName string `json:"store_name"`
Address []string `json:"address"`
TimeOut string `json:"timeout"`
Expand Down
1 change: 1 addition & 0 deletions components/custom/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
package custom

type Config struct {
Type string `json:"type"`
Version string `json:"version"`
Metadata map[string]string `json:"metadata"`
}
1 change: 1 addition & 0 deletions components/file/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import (

// FileConfig wraps configuration for a file implementation
type FileConfig struct {
Type string `json:"type"`
Metadata json.RawMessage
}

Expand Down
1 change: 1 addition & 0 deletions components/hello/hello.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ type HelloService interface {
}

type HelloConfig struct {
Type string `json:"type"`
HelloString string `json:"hello"`
}

Expand Down
1 change: 1 addition & 0 deletions components/lock/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ type Feature string

// Lock's metadata
type Config struct {
Type string `json:"type"`
Metadata map[string]string `json:"metadata"`
}

Expand Down
1 change: 1 addition & 0 deletions components/rpc/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ type RPCResponse struct {
}

type RpcConfig struct {
Type string `json:"type"`
Config json.RawMessage
}

Expand Down
1 change: 1 addition & 0 deletions components/sequencer/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
package sequencer

type Config struct {
Type string `json:"type"`
BiggerThan map[string]int64 `json:"biggerThan"`
Metadata map[string]string `json:"metadata"`
}
6 changes: 4 additions & 2 deletions configs/config_apollo.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,13 @@
"server_name": "runtime",
"grpc_config": {
"hellos": {
"helloworld": {
"helloworld_demo": {
"type": "helloworld",
"hello": "greeting"
}
},
"config_store": {
akkw marked this conversation as resolved.
Show resolved Hide resolved
"config_store_demo": {
"type": "config_store",
"apollo": {
"address": [
"http://106.54.227.205:8080"
Expand Down
6 changes: 4 additions & 2 deletions configs/config_apollo_health.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,13 @@
"server_name": "runtime",
"grpc_config": {
"hellos": {
"helloworld": {
"helloworld_demo": {
"type": "helloworld",
"hello": "greeting"
}
},
"config_store": {
"config_store_demo": {
akkw marked this conversation as resolved.
Show resolved Hide resolved
"type": "config_store",
"apollo": {
"address": [
"http://106.54.227.205:8080"
Expand Down
6 changes: 4 additions & 2 deletions configs/config_bindings.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,14 @@
"server_name": "runtime",
"grpc_config": {
"hellos": {
"helloworld": {
"helloworld_demo": {
"type": "helloworld",
"hello": "greeting"
}
},
"bindings": {
"http": {
"http_demo": {
"type": "http",
"metadata":
{
"url": "https://github.com/mosn/layotto"
Expand Down
6 changes: 4 additions & 2 deletions configs/config_file.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,14 @@
"server_name": "runtime",
"grpc_config": {
"hellos": {
"helloworld": {
"helloworld_demo": {
"type": "helloworld",
"hello": "greeting"
}
},
"file": {
"minioOSS": {
"minioOSS_demo": {
"type": "minioOSS",
"metadata": [
{
"endpoint": "127.0.0.1:9000",
Expand Down
6 changes: 4 additions & 2 deletions configs/config_file_qiniu_oss.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,14 @@
"server_name": "runtime",
"grpc_config": {
"hellos": {
"helloworld": {
"helloworld_demo": {
"type": "helloworld",
"hello": "greeting"
}
},
"file": {
"qiniuOSS": {
"qiniuOSS_demo": {
"type": "qiniuOSS",
"metadata": [
{
"endpoint": "<require>",
Expand Down
6 changes: 4 additions & 2 deletions configs/config_file_tencentcloud_oss.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,14 @@
"server_name": "runtime",
"grpc_config": {
"hellos": {
"helloworld": {
"helloworld_demo": {
"type": "helloworld",
"hello": "greeting"
}
},
"files": {
"tencentCloudOSS": {
"tencentCloudOSS_demo": {
"type": "tencentCloudOSS",
"metadata": [
{
"endpoint": "<get endpoint from https://console.cloud.tencent.com/cos/bucket configuration management>",
Expand Down
18 changes: 12 additions & 6 deletions configs/config_in_memory.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,37 +22,43 @@
"server_name": "runtime",
"grpc_config": {
"hellos": {
"helloworld": {
"helloworld_demo": {
"type": "helloworld",
"hello": "greeting"
}
},
"state": {
"in-memory": {
"in-memory_demo": {
"type": "in-memory",
"metadata": {
}
}
},
"lock": {
"in-memory": {
"in-memory_demo": {
"type": "in-memory",
"metadata": {
}
}
},
"pub_subs": {
"in-memory": {
"in-memory_demo": {
akkw marked this conversation as resolved.
Show resolved Hide resolved
"type": "in-memory",
"metadata": {
"consumerID": "1"
}
}
},
"sequencer": {
"in-memory": {
"in-memory_demo": {
akkw marked this conversation as resolved.
Show resolved Hide resolved
"type": "in-memory",
"metadata": {}
}
},
"custom_component": {
"helloworld": {
"in-memory": {
"in-memory_demo": {
"type": "in-memory",
seeflood marked this conversation as resolved.
Show resolved Hide resolved
"metadata": {}
}
}
Expand Down
30 changes: 20 additions & 10 deletions configs/config_integration_redis_etcd.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@
"server_name": "runtime",
"grpc_config": {
"rpcs": {
"mosn": {
"mosn_demo": {
"type": "mosn",
"config": {
"channel": [
{
Expand All @@ -61,35 +62,40 @@
}
},
"hellos": {
"helloworld": {
"helloworld_demo": {
"type": "helloworld",
"hello": "greeting"
}
},
"bindings": {
"http": {
"http_demo": {
"type": "http",
"metadata": {
"url": "https://registry.npmmirror.com/layotto/0.0.0"
}
}
},
"config_store": {
"etcd": {
"etcd_demo": {
"type": "etcd",
"address": [
"127.0.0.1:2379"
],
"timeout": "10"
}
},
"state": {
"redis": {
"redis_demo": {
"type": "redis",
"metadata": {
"redisHost": "localhost:6380",
"redisPassword": ""
}
}
},
"sequencer": {
"etcd": {
"etcd_demo": {
"type": "etcd",
"metadata": {
"endpoints": "localhost:2379",
"segmentCacheEnable": "false",
Expand All @@ -99,15 +105,17 @@
"dialTimeout": "5"
}
},
"redis": {
"redis_demo": {
"type": "redis",
"metadata": {
"redisHost": "127.0.0.1:6380",
"redisPassword": ""
}
}
},
"lock": {
"etcd": {
"etcd_demo": {
"type": "etcd",
"metadata": {
"endpoints": "localhost:2379",
"username": "",
Expand All @@ -116,15 +124,17 @@
"dialTimeout": "5"
}
},
"redis": {
"redis_demo": {
"type": "redis",
"metadata": {
"redisHost": "localhost:6380",
"redisPassword": ""
}
}
},
"pub_subs": {
"redis": {
"redis_demo": {
"type": "redis",
"metadata": {
"redisHost": "localhost:6380",
"redisPassword": ""
Expand Down
6 changes: 4 additions & 2 deletions configs/config_lock_consul.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,14 @@
"server_name": "runtime",
"grpc_config": {
"hellos": {
"helloworld": {
"helloworld_demo": {
"type": "helloworld",
"hello": "greeting"
}
},
"lock": {
"consul": {
"consul_demo": {
"type": "consul",
"metadata": {
"address": "localhost:8500",
"scheme": "http"
Expand Down
6 changes: 4 additions & 2 deletions configs/config_lock_etcd.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,14 @@
"server_name": "runtime",
"grpc_config": {
"hellos": {
"helloworld": {
"helloworld_demo": {
"type": "helloworld",
"hello": "greeting"
}
},
"lock": {
"etcd": {
"etcd_demo": {
"type": "etcd",
"metadata": {
"endpoints": "localhost:2379",
"username": "",
Expand Down
6 changes: 4 additions & 2 deletions configs/config_lock_mongo.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,14 @@
"server_name": "runtime",
"grpc_config": {
"hellos": {
"helloworld": {
"helloworld_demo": {
"type": "helloworld",
"hello": "greeting"
}
},
"lock": {
"mongo": {
"mongo_demo": {
"type": "mongo",
"metadata": {
"mongoHost": "localhost:27017",
"mongoPassword": "",
Expand Down
6 changes: 4 additions & 2 deletions configs/config_lock_redis.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,14 @@
"server_name": "runtime",
"grpc_config": {
"hellos": {
"helloworld": {
"helloworld_demo": {
"type": "helloworld",
"hello": "greeting"
}
},
"lock": {
"redis": {
"redis_demo": {
akkw marked this conversation as resolved.
Show resolved Hide resolved
"type": "redis",
"metadata": {
"redisHost": "localhost:6380",
"redisPassword": ""
Expand Down
6 changes: 4 additions & 2 deletions configs/config_lock_redis_cluster.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,14 @@
"server_name": "runtime",
"grpc_config": {
"hellos": {
"helloworld": {
"helloworld_demo": {
"type": "helloworld",
"hello": "greeting"
}
},
"lock": {
"redis_cluster": {
"redis_cluster_demo": {
"type": "redis_cluster",
"metadata": {
"concurrency": "0",
"redisHosts": "localhost:6381,localhost:6382,localhost:6383,localhost:6384,localhost:6385",
Expand Down
Loading