mirror of
https://github.com/alibaba/higress.git
synced 2026-04-22 20:47:36 +08:00
get upstream serviceSource from RouteCluster information and update docs (#337)
This commit is contained in:
@@ -16,7 +16,6 @@ package config
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"github.com/alibaba/higress/plugins/wasm-go/pkg/wrapper"
|
||||
"net/url"
|
||||
"regexp"
|
||||
"strings"
|
||||
@@ -46,10 +45,10 @@ type Variable struct {
|
||||
}
|
||||
|
||||
type DeGraphQLConfig struct {
|
||||
client wrapper.HttpClient
|
||||
gql string
|
||||
endpoint string
|
||||
timeout uint32
|
||||
domain string
|
||||
variables []Variable
|
||||
}
|
||||
|
||||
@@ -63,6 +62,14 @@ func (d *DeGraphQLConfig) SetEndpoint(endpoint string) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (d *DeGraphQLConfig) GetDomain() string {
|
||||
return d.domain
|
||||
}
|
||||
|
||||
func (d *DeGraphQLConfig) SetDomain(domain string) {
|
||||
d.domain = domain
|
||||
}
|
||||
|
||||
func (d *DeGraphQLConfig) GetEndpoint() string {
|
||||
return d.endpoint
|
||||
}
|
||||
@@ -79,14 +86,6 @@ func (d *DeGraphQLConfig) SetTimeout(timeout uint32) {
|
||||
}
|
||||
}
|
||||
|
||||
func (d *DeGraphQLConfig) SetClient(client wrapper.HttpClient) {
|
||||
d.client = client
|
||||
}
|
||||
|
||||
func (d *DeGraphQLConfig) GetClient() wrapper.HttpClient {
|
||||
return d.client
|
||||
}
|
||||
|
||||
func (d *DeGraphQLConfig) SetGql(gql string) error {
|
||||
if strings.TrimSpace(gql) == "" {
|
||||
return errors.New("gql can't be empty")
|
||||
|
||||
Reference in New Issue
Block a user