mirror of
https://github.com/alibaba/higress.git
synced 2026-05-11 14:27:27 +08:00
Add remote mcp server sdk (#1946)
This commit is contained in:
@@ -24,9 +24,19 @@ import (
|
||||
type Cluster interface {
|
||||
ClusterName() string
|
||||
HostName() string
|
||||
HttpCallNotify() HttpCallNotify
|
||||
}
|
||||
|
||||
type BaseCluster struct {
|
||||
notify HttpCallNotify
|
||||
}
|
||||
|
||||
func (base BaseCluster) HttpCallNotify() HttpCallNotify {
|
||||
return base.notify
|
||||
}
|
||||
|
||||
type RouteCluster struct {
|
||||
BaseCluster
|
||||
Host string
|
||||
}
|
||||
|
||||
@@ -46,6 +56,7 @@ func (c RouteCluster) HostName() string {
|
||||
}
|
||||
|
||||
type TargetCluster struct {
|
||||
BaseCluster
|
||||
Host string
|
||||
Cluster string
|
||||
}
|
||||
@@ -59,6 +70,7 @@ func (c TargetCluster) HostName() string {
|
||||
}
|
||||
|
||||
type K8sCluster struct {
|
||||
BaseCluster
|
||||
ServiceName string
|
||||
Namespace string
|
||||
Port int64
|
||||
@@ -83,6 +95,7 @@ func (c K8sCluster) HostName() string {
|
||||
}
|
||||
|
||||
type NacosCluster struct {
|
||||
BaseCluster
|
||||
ServiceName string
|
||||
// use DEFAULT-GROUP by default
|
||||
Group string
|
||||
@@ -115,6 +128,7 @@ func (c NacosCluster) HostName() string {
|
||||
}
|
||||
|
||||
type StaticIpCluster struct {
|
||||
BaseCluster
|
||||
ServiceName string
|
||||
Port int64
|
||||
Host string
|
||||
@@ -132,6 +146,7 @@ func (c StaticIpCluster) HostName() string {
|
||||
}
|
||||
|
||||
type DnsCluster struct {
|
||||
BaseCluster
|
||||
ServiceName string
|
||||
Domain string
|
||||
Port int64
|
||||
@@ -146,6 +161,7 @@ func (c DnsCluster) HostName() string {
|
||||
}
|
||||
|
||||
type ConsulCluster struct {
|
||||
BaseCluster
|
||||
ServiceName string
|
||||
Datacenter string
|
||||
Port int64
|
||||
@@ -166,6 +182,7 @@ func (c ConsulCluster) HostName() string {
|
||||
}
|
||||
|
||||
type FQDNCluster struct {
|
||||
BaseCluster
|
||||
FQDN string
|
||||
Host string
|
||||
Port int64
|
||||
|
||||
Reference in New Issue
Block a user