consul connect proxy upstream query

25 views
Skip to first unread message

Pavel Chernikov

unread,
Jun 3, 2020, 1:42:15 AM6/3/20
to Consul
I'm trying to find an example of using proxy upstream with a prepared query
consul connect proxy -service local-cm -upstream ...

I see the following code in flag_upstreams.go:
    if idx := strings.Index(name, "."); idx != -1 {
        typ := name[idx+1:]
        name = name[:idx]
        switch typ {
        case "", "service":
            destinationType = "service"

        case "query":
            destinationType = "prepared_query"

        default:
            return fmt.Errorf(
                "Upstream type must be blank, 'service', or 'query'. Got: %q", typ)
        }
    }

Does anybody have an example of what this -upstream syntax would look like with "query"?

Thanks!
Reply all
Reply to author
Forward
0 new messages