| package xds |
| |
| import ( |
| "github.com/apache/dubbo-kubernetes/pkg/config/schema/kind" |
| "github.com/apache/dubbo-kubernetes/pkg/util/sets" |
| "github.com/apache/dubbo-kubernetes/sail/pkg/model" |
| ) |
| |
| // TODO EDS |
| func (s *DiscoveryServer) EDSUpdate(shard model.ShardKey, serviceName string, namespace string, |
| dubboEndpoints []*model.DubboEndpoint, |
| ) { |
| // Update the endpoint shards |
| pushType := s.Env.EndpointIndex.UpdateServiceEndpoints(shard, serviceName, namespace, dubboEndpoints, true) |
| if pushType == model.IncrementalPush || pushType == model.FullPush { |
| // Trigger a push |
| s.ConfigUpdate(&model.PushRequest{ |
| Full: pushType == model.FullPush, |
| ConfigsUpdated: sets.New(model.ConfigKey{Kind: kind.ServiceEntry, Name: serviceName, Namespace: namespace}), |
| Reason: model.NewReasonStats(model.EndpointUpdate), |
| }) |
| } |
| } |