This commit is contained in:
co63oc
2024-06-26 19:47:39 +08:00
committed by GitHub
parent 4ca2d23404
commit 9c6ea109f8
7 changed files with 24 additions and 24 deletions

View File

@@ -175,7 +175,7 @@ func promptInstall(writer io.Writer, profileName string) bool {
func promptProfileName(writer io.Writer) string {
answer := ""
fmt.Fprintf(writer, "\nPlease select higress install configration profile:\n")
fmt.Fprintf(writer, "\nPlease select higress install configuration profile:\n")
fmt.Fprintf(writer, "\n1.Install higress to local kubernetes cluster like kind etc.\n")
fmt.Fprintf(writer, "\n2.Install higress to kubernetes cluster\n")
fmt.Fprintf(writer, "\n3.Install higress to local docker environment\n")

View File

@@ -918,7 +918,7 @@ func (m *IngressConfig) AddOrUpdateWasmPlugin(clusterNamespacedName util.Cluster
Labels: map[string]string{constants.AlwaysPushLabel: "true"},
}
for _, f := range m.wasmPluginHandlers {
IngressLog.Debug("WasmPlugin triggerd update")
IngressLog.Debug("WasmPlugin triggered update")
f(config.Config{Meta: metadata}, config.Config{Meta: metadata}, model.EventUpdate)
}
istioWasmPlugin, err := m.convertIstioWasmPlugin(&wasmPlugin.Spec)
@@ -960,7 +960,7 @@ func (m *IngressConfig) DeleteWasmPlugin(clusterNamespacedName util.ClusterNames
Labels: map[string]string{constants.AlwaysPushLabel: "true"},
}
for _, f := range m.wasmPluginHandlers {
IngressLog.Debug("WasmPlugin triggerd update")
IngressLog.Debug("WasmPlugin triggered update")
f(config.Config{Meta: metadata}, config.Config{Meta: metadata}, model.EventDelete)
}
}
@@ -987,7 +987,7 @@ func (m *IngressConfig) AddOrUpdateMcpBridge(clusterNamespacedName util.ClusterN
Labels: map[string]string{constants.AlwaysPushLabel: "true"},
}
for _, f := range m.serviceEntryHandlers {
IngressLog.Debug("McpBridge triggerd serviceEntry update")
IngressLog.Debug("McpBridge triggered serviceEntry update")
f(config.Config{Meta: metadata}, config.Config{Meta: metadata}, model.EventUpdate)
}
}, m.localKubeClient, m.namespace)
@@ -1042,7 +1042,7 @@ func (m *IngressConfig) AddOrUpdateHttp2Rpc(clusterNamespacedName util.ClusterNa
}
func (m *IngressConfig) DeleteHttp2Rpc(clusterNamespacedName util.ClusterNamespacedName) {
IngressLog.Infof("Http2Rpc triggerd deleted event %s", clusterNamespacedName.Name)
IngressLog.Infof("Http2Rpc triggered deleted event %s", clusterNamespacedName.Name)
if clusterNamespacedName.Namespace != m.namespace {
return
}
@@ -1054,7 +1054,7 @@ func (m *IngressConfig) DeleteHttp2Rpc(clusterNamespacedName util.ClusterNamespa
}
m.mutex.Unlock()
if hit {
IngressLog.Infof("Http2Rpc triggerd deleted event executed %s", clusterNamespacedName.Name)
IngressLog.Infof("Http2Rpc triggered deleted event executed %s", clusterNamespacedName.Name)
push := func(kind config.GroupVersionKind) {
m.XDSUpdater.ConfigUpdate(&model.PushRequest{
Full: true,
@@ -1160,13 +1160,13 @@ func (m *IngressConfig) constructHttp2RpcEnvoyFilter(http2rpcConfig *annotations
IngressLog.Infof("Found http2rpc mappings %v", mappings)
if _, exist := mappings[http2rpcConfig.Name]; !exist {
IngressLog.Errorf("Http2RpcConfig name %s, not found Http2Rpc CRD", http2rpcConfig.Name)
return nil, errors.New("invalid http2rpcConfig has no useable http2rpc")
return nil, errors.New("invalid http2rpcConfig has no usable http2rpc")
}
http2rpcCRD := mappings[http2rpcConfig.Name]
if http2rpcCRD.GetDubbo() == nil {
IngressLog.Errorf("Http2RpcConfig name %s, only support Http2Rpc CRD Dubbo Service type", http2rpcConfig.Name)
return nil, errors.New("invalid http2rpcConfig has no useable http2rpc")
return nil, errors.New("invalid http2rpcConfig has no usable http2rpc")
}
httpRoute := route.HTTPRoute
@@ -1293,7 +1293,7 @@ func (m *IngressConfig) constructHttp2RpcMethods(dubbo *higressv1.DubboService)
var method = make(map[string]interface{})
method["name"] = serviceMethod.GetServiceMethod()
var params []interface{}
// paramFromEntireBody is for methods with single parameter. So when paramFromEntireBody exists, we just ignore parmas.
// paramFromEntireBody is for methods with single parameter. So when paramFromEntireBody exists, we just ignore params.
var paramFromEntireBody = serviceMethod.GetParamFromEntireBody()
if paramFromEntireBody != nil {
var param = make(map[string]interface{})

View File

@@ -31,7 +31,7 @@ import (
)
const (
ConuslHealthPassing = "passing"
ConsulHealthPassing = "passing"
DefaultRefreshInterval = time.Second * 30
DefaultRefreshIntervalLimit = time.Second * 10
)
@@ -315,7 +315,7 @@ func (w *watcher) generateServiceEntry(host string, services []*consulapi.Servic
for _, service := range services {
// service status: maintenance > critical > warning > passing
if service.Checks.AggregatedStatus() != ConuslHealthPassing {
if service.Checks.AggregatedStatus() != ConsulHealthPassing {
continue
}

View File

@@ -42,7 +42,7 @@ func NewEurekaHttpClient(config EurekaHttpConfig) EurekaHttpClient {
type EurekaHttpConfig struct {
BaseUrl string
ConnectTimeoutSeconds int // default 30
PollInterval int //default 30
PollInterval int // default 30
Retries int // default 3
RetryDelayTime int // default 100ms
EnableDelta bool
@@ -101,7 +101,7 @@ func (e *eurekaHttpClient) ScheduleAppUpdates(name string, stop <-chan struct{})
func (e *eurekaHttpClient) GetDelta() (*Applications, error) {
if !e.EnableDelta {
return nil, fmt.Errorf("failed to get DeltaAppliation, enableDelta is false")
return nil, fmt.Errorf("failed to get DeltaApplication, enableDelta is false")
}
return e.getApplications("/apps/delta")
}
@@ -119,7 +119,7 @@ func (c *eurekaHttpClient) getApplications(path string) (*Applications, error) {
var rj fargo.GetAppsResponseJson
if err = json.Unmarshal(res, &rj); err != nil {
log.Errorf("Failed to unmarshal response body to fargo.GetAppResponseJosn, error: %v", err)
log.Errorf("Failed to unmarshal response body to fargo.GetAppResponseJson, error: %v", err)
return nil, err
}

View File

@@ -30,7 +30,7 @@ type Cache interface {
UpdateServiceEntryWrapper(service string, data *ServiceEntryWrapper)
DeleteServiceEntryWrapper(service string)
PurgeStaleService()
UpdateServiceEntryEnpointWrapper(service, ip, regionId, zoneId, protocol string, labels map[string]string)
UpdateServiceEntryEndpointWrapper(service, ip, regionId, zoneId, protocol string, labels map[string]string)
GetServiceByEndpoints(requestVersions, endpoints map[string]bool, versionKey string, protocol common.Protocol) map[string][]string
GetAllServiceEntry() []*v1alpha3.ServiceEntry
GetAllServiceEntryWrapper() []*ServiceEntryWrapper
@@ -58,7 +58,7 @@ type store struct {
deferedDelete map[string]struct{}
}
func (s *store) UpdateServiceEntryEnpointWrapper(service, ip, regionId, zoneId, protocol string, labels map[string]string) {
func (s *store) UpdateServiceEntryEndpointWrapper(service, ip, regionId, zoneId, protocol string, labels map[string]string) {
s.mux.Lock()
defer s.mux.Unlock()
if se, exist := s.sew[service]; exist {

View File

@@ -66,7 +66,7 @@ type watcher struct {
isStop bool
addrProvider *address.NacosAddressProvider
updateCacheWhenEmpty bool
nacosClietConfig *constant.ClientConfig
nacosClientConfig *constant.ClientConfig
authOption provider.AuthOption
}
@@ -94,7 +94,7 @@ func NewWatcher(cache memory.Cache, opts ...WatcherOption) (provider.Watcher, er
log.Infof("new nacos2 watcher with config Name:%s", w.Name)
w.nacosClietConfig = constant.NewClientConfig(
w.nacosClientConfig = constant.NewClientConfig(
constant.WithTimeoutMs(DefaultNacosTimeout),
constant.WithLogLevel(DefaultNacosLogLevel),
constant.WithLogDir(DefaultNacosLogDir),
@@ -129,7 +129,7 @@ func NewWatcher(cache memory.Cache, opts ...WatcherOption) (provider.Watcher, er
success := make(chan struct{})
go func() {
namingClient, err := clients.NewNamingClient(vo.NacosClientParam{
ClientConfig: w.nacosClietConfig,
ClientConfig: w.nacosClientConfig,
ServerConfigs: sc,
})
if err == nil {
@@ -267,7 +267,7 @@ func (w *watcher) updateNacosClient() {
defer w.mutex.Unlock()
w.Domain = addr
namingClient, err := clients.NewNamingClient(vo.NacosClientParam{
ClientConfig: w.nacosClietConfig,
ClientConfig: w.nacosClientConfig,
ServerConfigs: []constant.ServerConfig{
*constant.NewServerConfig(addr, uint64(w.Port)),
},

View File

@@ -241,7 +241,7 @@ func (w *watcher) fetchAllServices(firstFetch ...bool) error {
case SpringCloudService:
serviceConfig.UrlIndex = path.Join(serviceInfo.rootPath, serviceInfo.service)
default:
return errors.New("unkown type")
return errors.New("unknown type")
}
serviceConfigs = append(serviceConfigs, serviceConfig)
}
@@ -275,7 +275,7 @@ func (w *watcher) ListenService() {
}
log.Errorf("[Zookeeper][ListenService] Get children of path zkRootPath with watcher failed, err:%v, index:%s", err, listIndex.UrlIndex)
// May be the provider does not ready yet, sleep failTimes * ConnDelay senconds to wait
// May be the provider does not ready yet, sleep failTimes * ConnDelay seconds to wait
after := time.After(timeSecondDuration(failTimes * ConnDelay))
select {
case <-after:
@@ -384,7 +384,7 @@ func (w *watcher) GetInterfaceConfig(event Event) (string, *InterfaceConfig, err
}
}
func (w *watcher) GetSpringCloudConfig(intefaceName string, content []byte) (string, *InterfaceConfig, error) {
func (w *watcher) GetSpringCloudConfig(interfaceName string, content []byte) (string, *InterfaceConfig, error) {
var instance SpringCloudInstance
err := json.Unmarshal(content, &instance)
if err != nil {
@@ -392,7 +392,7 @@ func (w *watcher) GetSpringCloudConfig(intefaceName string, content []byte) (str
return "", nil, err
}
var config InterfaceConfig
host := intefaceName
host := interfaceName
config.Host = host
config.Protocol = common.HTTP.String()
if len(instance.Payload.Metadata) > 0 && instance.Payload.Metadata["protocol"] != "" {