Supports MCP service configuration protocol and SNI, along with various other fixes. (#1369)

This commit is contained in:
澄潭
2024-10-09 15:54:19 +08:00
committed by GitHub
parent 3ed28f2a66
commit ecf52aecfc
23 changed files with 282 additions and 94 deletions

View File

@@ -18,27 +18,37 @@ import (
"time"
"istio.io/api/networking/v1alpha3"
"github.com/alibaba/higress/pkg/ingress/kube/common"
)
type ServiceEntryWrapper struct {
ServiceName string
ServiceEntry *v1alpha3.ServiceEntry
Suffix string
RegistryType string
createTime time.Time
type ServiceWrapper struct {
ServiceName string
ServiceEntry *v1alpha3.ServiceEntry
DestinationRuleWrapper *common.WrapperDestinationRule
Suffix string
RegistryType string
RegistryName string
createTime time.Time
}
func (sew *ServiceEntryWrapper) DeepCopy() *ServiceEntryWrapper {
return &ServiceEntryWrapper{
ServiceEntry: sew.ServiceEntry.DeepCopy(),
createTime: sew.GetCreateTime(),
func (sew *ServiceWrapper) DeepCopy() *ServiceWrapper {
res := &ServiceWrapper{}
res = sew
res.ServiceEntry = sew.ServiceEntry.DeepCopy()
res.createTime = sew.GetCreateTime()
if sew.DestinationRuleWrapper != nil {
res.DestinationRuleWrapper = sew.DestinationRuleWrapper
res.DestinationRuleWrapper.DestinationRule = sew.DestinationRuleWrapper.DestinationRule.DeepCopy()
}
return res
}
func (sew *ServiceEntryWrapper) SetCreateTime(createTime time.Time) {
func (sew *ServiceWrapper) SetCreateTime(createTime time.Time) {
sew.createTime = createTime
}
func (sew *ServiceEntryWrapper) GetCreateTime() time.Time {
func (sew *ServiceWrapper) GetCreateTime() time.Time {
return sew.createTime
}