Versions in this module Expand all Collapse all v1 v1.5.4 Oct 26, 2023 Changes in this version + const DefaultRateLimitReportAmountPresent + const DefaultRejectRateLimiter + const MatchAll + const MaxRateLimitReportAmountPresent + const MinRateLimitReportAmountPresent + var ServerErrorCodeTypeMap = map[uint32]model.ErrCode + func ConvertDuration(d *duration.Duration) (time.Duration, error) + func ConvertServerErrorToRpcError(code uint32) model.ErrCode + func GenServicesRevision(services []*apiservice.Service) string + func GetEventType(respType apiservice.DiscoverResponse_DiscoverResponseType) model.EventType + func GetMaxValidDuration(rule *apitraffic.Rule) (time.Duration, error) + func GetProtoRequestType(event model.EventType) apiservice.DiscoverRequest_DiscoverRequestType + func IsMatchAllValue(ruleMetaValue *apimodel.MatchString) bool + func NewRoutingRuleInProto(resp *apiservice.DiscoverResponse) model.ServiceRule + func ProtoDurationToMS(dur *duration.Duration) int64 + func ValidateMessage(eventKey *model.ServiceEventKey, message interface{}) error + type DiscoverError struct + Code int32 + Message string + func (d *DiscoverError) Error() string + type InstSlice []*apiservice.Instance + func (is InstSlice) Len() int + func (is InstSlice) Less(i, j int) bool + func (is InstSlice) Swap(i, j int) + type InstanceInProto struct + func NewInstanceInProto(instance *apiservice.Instance, svcKey *model.ServiceKey, ...) *InstanceInProto + func (i *InstanceInProto) DeepClone() model.Instance + func (i *InstanceInProto) GetActiveDetectStatus() model.ActiveDetectStatus + func (i *InstanceInProto) GetCampus() string + func (i *InstanceInProto) GetCircuitBreakerStatus() model.CircuitBreakerStatus + func (i *InstanceInProto) GetExtendedData(pluginIndex int32) interface{} + func (i *InstanceInProto) GetHost() string + func (i *InstanceInProto) GetIDC() string + func (i *InstanceInProto) GetId() string + func (i *InstanceInProto) GetInstanceKey() model.InstanceKey + func (i *InstanceInProto) GetInstanceLocalValue() local.InstanceLocalValue + func (i *InstanceInProto) GetLogicSet() string + func (i *InstanceInProto) GetNamespace() string + func (i *InstanceInProto) GetPort() uint32 + func (i *InstanceInProto) GetPriority() uint32 + func (i *InstanceInProto) GetProtocol() string + func (i *InstanceInProto) GetRegion() string + func (i *InstanceInProto) GetRevision() string + func (i *InstanceInProto) GetService() string + func (i *InstanceInProto) GetSliceWindows(pluginIndex int32) []*metric.SliceWindow + func (i *InstanceInProto) GetTtl() int64 + func (i *InstanceInProto) GetVersion() string + func (i *InstanceInProto) GetVpcId() string + func (i *InstanceInProto) GetWeight() int + func (i *InstanceInProto) GetZone() string + func (i *InstanceInProto) IsEnableHealthCheck() bool + func (i *InstanceInProto) IsHealthy() bool + func (i *InstanceInProto) IsIsolated() bool + func (i *InstanceInProto) SetExtendedData(pluginIndex int32, data interface{}) + func (i *InstanceInProto) SetHealthy(status bool) + func (i *InstanceInProto) SingleInstances() []model.Instance + type RateLimitRuleCache struct + MaxDuration time.Duration + type RateLimitingAssistant struct + func (r *RateLimitingAssistant) ParseRuleValue(resp *apiservice.DiscoverResponse) (proto.Message, string) + func (r *RateLimitingAssistant) SetDefault(message proto.Message) + func (r *RateLimitingAssistant) Validate(message proto.Message, ruleCache model.RuleCache) error + type RoutingAssistant struct + func (r *RoutingAssistant) ParseRuleValue(resp *apiservice.DiscoverResponse) (proto.Message, string) + func (r *RoutingAssistant) SetDefault(message proto.Message) + func (r *RoutingAssistant) Validate(message proto.Message, ruleCache model.RuleCache) error + type ServiceInstancesInProto struct + CacheLoaded int32 + func NewServiceInstancesInProto(resp *apiservice.DiscoverResponse, ...) *ServiceInstancesInProto + func (s *ServiceInstancesInProto) GetGetTotalWeight() int + func (s *ServiceInstancesInProto) GetHashValue() uint64 + func (s *ServiceInstancesInProto) GetInstance(instId string) model.Instance + func (s *ServiceInstancesInProto) GetInstanceLocalValue(instId string) local.InstanceLocalValue + func (s *ServiceInstancesInProto) GetInstances() []model.Instance + func (s *ServiceInstancesInProto) GetMetadata() map[string]string + func (s *ServiceInstancesInProto) GetNamespace() string + func (s *ServiceInstancesInProto) GetRevision() string + func (s *ServiceInstancesInProto) GetService() string + func (s *ServiceInstancesInProto) GetServiceClusters() model.ServiceClusters + func (s *ServiceInstancesInProto) GetServiceLoadbalancer() loadbalancer.LoadBalancer + func (s *ServiceInstancesInProto) GetServiceLocalValue() local.ServiceLocalValue + func (s *ServiceInstancesInProto) GetServiceRouterChain() *servicerouter.RouterChain + func (s *ServiceInstancesInProto) GetSvcIDSet() model.HashSet + func (s *ServiceInstancesInProto) GetTotalWeight() int + func (s *ServiceInstancesInProto) GetType() model.EventType + func (s *ServiceInstancesInProto) IsCacheLoaded() bool + func (s *ServiceInstancesInProto) IsInitialized() bool + func (s *ServiceInstancesInProto) IsNotExists() bool + func (s *ServiceInstancesInProto) ReloadServiceClusters() + func (s *ServiceInstancesInProto) SetInitialized(isInitialized bool) + type ServiceRuleAssistant interface + ParseRuleValue func(resp *apiservice.DiscoverResponse) (proto.Message, string) + SetDefault func(message proto.Message) + Validate func(message proto.Message, cache model.RuleCache) error + type ServiceRuleInProto struct + CacheLoaded int32 + func NewServiceRuleInProto(resp *apiservice.DiscoverResponse) *ServiceRuleInProto + func NewServiceRuleInProtoWithInitializeStatus(resp *apiservice.DiscoverResponse, initialized bool) *ServiceRuleInProto + func (s *ServiceRuleInProto) GetHashValue() uint64 + func (s *ServiceRuleInProto) GetNamespace() string + func (s *ServiceRuleInProto) GetRevision() string + func (s *ServiceRuleInProto) GetRuleCache() model.RuleCache + func (s *ServiceRuleInProto) GetService() string + func (s *ServiceRuleInProto) GetType() model.EventType + func (s *ServiceRuleInProto) GetValidateError() error + func (s *ServiceRuleInProto) GetValue() interface{} + func (s *ServiceRuleInProto) IsCacheLoaded() bool + func (s *ServiceRuleInProto) IsInitialized() bool + func (s *ServiceRuleInProto) IsNotExists() bool + func (s *ServiceRuleInProto) ValidateAndBuildCache() error + type ServicesProto struct + CacheLoaded int32 + func NewServicesProto(resp *apiservice.DiscoverResponse) *ServicesProto + func (s *ServicesProto) GetHashValue() uint64 + func (s *ServicesProto) GetNamespace() string + func (s *ServicesProto) GetRevision() string + func (s *ServicesProto) GetType() model.EventType + func (s *ServicesProto) GetValue() []*model.ServiceKey + func (s *ServicesProto) IsInitialized() bool + func (s *ServicesProto) IsNotExists() bool + type SvcPluginValues struct + Loadbalancer loadbalancer.LoadBalancer + Routers *servicerouter.RouterChain