get upstream serviceSource from RouteCluster information and update docs (#337)

This commit is contained in:
Jun
2023-05-19 10:40:24 +08:00
committed by GitHub
parent e4a47dfb46
commit 625c06e58f
7 changed files with 41 additions and 71 deletions

View File

@@ -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")