Fix no routes found

Signed-off-by: René Jochum <rene@jochum.dev>
master
René Jochum 2 years ago
parent 3fb6e843be
commit 7b17b73384

@ -22,7 +22,7 @@ then it registers that endpoints via a proxy method within gin.
task
```
### Remove everything except the result created by task
### Remove everything except the resulting podman images created by task
```bash
task rm

@ -5,8 +5,10 @@ vars:
sh: git tag --points-at HEAD
GIT_COMMIT:
sh: git rev-parse HEAD
GIT_DIRTY:
sh: git status -s
VERSION:
sh: if test -z "{{.GIT_TAG}}"; then echo "{{.GIT_COMMIT}}"; elif test -n "{{.GIT_TAG}}"; then echo "{{.GIT_TAG}}"; else echo "dirty"; fi
sh: if test "{{.GIT_DIRTY}}" != ""; then echo "{{.GIT_COMMIT}}-dirty"; elif test "{{.GIT_TAG}}" != ""; then echo "{{.GIT_TAG}}"; else echo "{{.GIT_COMMIT}}"; fi
tasks:
default:
@ -14,6 +16,10 @@ tasks:
- task: volume
- task: podman
version:
cmds:
- echo "{{.VERSION}}"
volume:
run: "once"
cmds:
@ -64,7 +70,7 @@ tasks:
cmds:
- podman tag docker.io/pcdummy/go-micro-router:latest docker.io/pcdummy/go-micro-router:{{.GIT_TAG}}
status:
- test -z "{{.GIT_TAG}}"
- test "{{.VERSION}}" != "{{.GIT_TAG}}"
podman:
desc: Generate docker container for go-micro-router tagged as docker.io/pcdummy/go-micro-router:latest and :GIT_TAG if theres a tag
@ -72,6 +78,16 @@ tasks:
- task: build:podman
- task: tag:podman
publish:
desc: Publish images to docker.io, this requires the current commit to be a git tag
deps:
- podman
cmds:
- podman publish docker.io/pcdummy/go-micro-router:latest
- podman publish docker.io/pcdummy/go-micro-router:{{.GIT_TAG}}
status:
- test "{{.VERSION}}" != "{{.GIT_TAG}}"
tidy:
desc: Run "go mod tidy" in a container
cmds:

@ -49,13 +49,15 @@ func (h *Handler) Start() error {
ctx := context.Background()
for {
services, err := util.FindByEndpoint(h.service, routerclientpb.RouterClientService.Routes)
services, err := util.FindByEndpoint(h.service, "RouterClient.Routes")
if err != nil {
logger.Error(err)
continue
}
for _, s := range services {
logger.Info("Found service '%s'", s.Name)
client := routerclientpb.NewRouterClientService(s.Name, h.service.Client())
resp, err := client.Routes(ctx, &emptypb.Empty{})
if err != nil {

Loading…
Cancel
Save