Skip to content

Commit 4ab9f57

Browse files
committed
modify service controller api called
1 parent 0ff592b commit 4ab9f57

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

discoverDemo/gateway.go renamed to discoverDemo/api.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
)
77

88
func getInfo(in struct{ Name string }, c *discover.Caller) (out struct{ FullName string }) {
9-
_ = c.Get("s1", "/"+in.Name+"/fullName").To(&out)
9+
_ = c.Get("c1", "/"+in.Name+"/fullName").To(&out)
1010
return
1111
}
1212

discoverDemo/controller.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,5 @@ func main() {
2121
s.Register(1, "/{name}/fullName", getFullNameController)
2222
s.Start()
2323
}
24+
25+
//export discover_app="c1"

discoverDemo/service.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,5 @@ func main() {
1111
s.Register(1, "/{name}/fullName", getFullNameService)
1212
s.Start()
1313
}
14+
15+
//export service_app="s1"

0 commit comments

Comments
 (0)