File tree Expand file tree Collapse file tree 2 files changed +26
-7
lines changed
Expand file tree Collapse file tree 2 files changed +26
-7
lines changed Original file line number Diff line number Diff line change @@ -12,10 +12,24 @@ type Maintainers struct {
1212 Email string
1313}
1414
15+ type Grpc struct {
16+ Port int
17+ }
18+
19+ type Graphql struct {
20+ Enabled bool
21+ Port int
22+ }
23+
24+ type Http struct {
25+ Enabled bool
26+ Port int
27+ }
28+
1529type Network struct {
16- HTTPPort int `yaml:"http-port,omitempty"`
17- GrpcPort int `yaml:"grpc-port,omitempty"`
18- GraphqlPort int `yaml:"graphql-port,omitempty"`
30+ Grpc Grpc
31+ Http Http
32+ Graphql Graphql
1933}
2034
2135type Service struct {
@@ -49,6 +63,6 @@ func LoadConfig(filePath string) *SproutConfig {
4963}
5064
5165func (c * SproutConfig ) Print () {
52- pp .Print (c )
66+ pp .Println (c )
5367
5468}
Original file line number Diff line number Diff line change @@ -8,9 +8,14 @@ maintainers:
88 email : bob@test.com
99
1010network :
11- http-port : 8080
12- grpc-port : 3000
13- graphql-port : 8082
11+ grpc :
12+ port : 3000
13+ http :
14+ enabled : true
15+ port : 8080
16+ graphql :
17+ enabled : true
18+ port : 8082
1419
1520services :
1621 - name : helloworld
You can’t perform that action at this time.
0 commit comments