mirror of https://github.com/status-im/consul.git
agent: set origin during PQ execution
This commit is contained in:
parent
3797e6544c
commit
865c264b9c
|
@ -592,6 +592,7 @@ RPC:
|
||||||
func (d *DNSServer) preparedQueryLookup(network, datacenter, query string, req, resp *dns.Msg) {
|
func (d *DNSServer) preparedQueryLookup(network, datacenter, query string, req, resp *dns.Msg) {
|
||||||
// Execute the prepared query.
|
// Execute the prepared query.
|
||||||
args := structs.PreparedQueryExecuteRequest{
|
args := structs.PreparedQueryExecuteRequest{
|
||||||
|
Origin: d.agent.config.NodeName,
|
||||||
Datacenter: datacenter,
|
Datacenter: datacenter,
|
||||||
QueryIDOrName: query,
|
QueryIDOrName: query,
|
||||||
QueryOptions: structs.QueryOptions{
|
QueryOptions: structs.QueryOptions{
|
||||||
|
|
|
@ -95,6 +95,7 @@ func parseLimit(req *http.Request, limit *int) error {
|
||||||
// preparedQueryExecute executes a prepared query.
|
// preparedQueryExecute executes a prepared query.
|
||||||
func (s *HTTPServer) preparedQueryExecute(id string, resp http.ResponseWriter, req *http.Request) (interface{}, error) {
|
func (s *HTTPServer) preparedQueryExecute(id string, resp http.ResponseWriter, req *http.Request) (interface{}, error) {
|
||||||
args := structs.PreparedQueryExecuteRequest{
|
args := structs.PreparedQueryExecuteRequest{
|
||||||
|
Origin: s.agent.config.NodeName,
|
||||||
QueryIDOrName: id,
|
QueryIDOrName: id,
|
||||||
}
|
}
|
||||||
s.parseSource(req, &args.Source)
|
s.parseSource(req, &args.Source)
|
||||||
|
|
Loading…
Reference in New Issue