Add remote mcp server sdk (#1946)

This commit is contained in:
澄潭
2025-03-24 22:11:45 +08:00
committed by GitHub
parent f5d20b72e0
commit d9f16f7d5e
17 changed files with 1337 additions and 13 deletions

View File

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