add ai cache plugin (#1010)

This commit is contained in:
澄潭
2024-05-29 21:10:22 +08:00
committed by GitHub
parent b00f79f3af
commit 812edf1490
10 changed files with 543 additions and 5 deletions

View File

@@ -151,3 +151,20 @@ func (c ConsulCluster) HostName() string {
}
return c.ServiceName
}
type FQDNCluster struct {
FQDN string
Host string
Port int64
}
func (c FQDNCluster) ClusterName() string {
return fmt.Sprintf("outbound|%d||%s", c.Port, c.FQDN)
}
func (c FQDNCluster) HostName() string {
if c.Host != "" {
return c.Host
}
return c.FQDN
}