package
1.6.0-beta.5
Repository: https://github.com/polarismesh/polaris-go.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
No description provided by the author

# Functions

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
ConvertDuration converts to golang duration and logs errors.
CurrentMicrosecond 获取微秒时间.
CurrentMillisecond 获取微秒时间.
CurrentNanosecond obtains the current microsecond, use syscall for better performance.
No description provided by the author
EnsureAndVerifyDir 检测缓存目录,不存在则创建.
ErrCodeFromIndex 根据错误码索引返回错误码.
ErrCodeToString 将错误码转换为字符串.
GetApiDelayRange 获取api时延范围.
No description provided by the author
GetErrCodeType 获取错误码类型.
GetErrorCodeFromError 从错误中获取错误码.
GetIP get local ip from inteface name like eth1.
HashMessage 对PB消息进行hash.
HashStr 对字符串进行hash操作.
IsDir file path is dir.
IsFile file path is dir.
IsNearbyMatch 判断是否满足就近条件.
IsServerException 判断是否为内部server错误.
IsSuccessResultCode 判断是否成功的错误码.
No description provided by the author
No description provided by the author
NewCluster 新建Cluster.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
NewRuleCache 创建规则缓存对象.
NewSDKError SDK错误相关的类构建器.
NewSDKErrorWithServerInfo SDK错误相关的类构建器.
NewServerSDKError 构造服务端相关错误.
NewServiceClusters 创建集群缓存.
No description provided by the author
NewSyncHashSet 创建协程安全的HashSet.
NewValueContext 创建kv上下文对象.
No description provided by the author
No description provided by the author
ParseMilliSeconds 时间转换成毫秒.
PathExist 查看文件路径是否存在.
PoolGetByteBuffer 通过池子获取字符串队列.
PoolGetStringSlice 获取字符串数组.
PoolPutByteBuffer 归还字节数组.
PoolPutStringSlice 归还字符串数组.
ProtoDurationToMS pb时间段转毫秒.
No description provided by the author
ReplaceHomeVar 替换相对路径.
SortMap 对map进行排序, keys的长度必须等于map的长度 返回已经排序的key,以及map中总字符串长度.
TimestampMsToUtcIso8601 格式化时间戳.
ToBoolPtr .
ToDurationPtr 转换时间指针.
ToEventType 通过字符串构造事件类型.
ToMilliSeconds 时间转换成毫秒.
ToNetIP 将uint32类型转化为ipv4地址.
ToStringService 服务元数据的ToString操作.
ValidMetircType 检测是不是合法的统计类型.

# Constants

Added 新增类型.
API延时范围常量.
API延时范围常量.
API延时范围常量.
API延时范围常量.
API延时范围常量.
API延时范围常量.
API标识.
API标识.
API标识.
API标识.
API标识.
API标识.
API标识.
API标识.
ApiOperationMax 这个必须在最下面.
API标识.
API标识.
API标识.
API标识.
API标识.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
用于拼接metadata的样式.
用于拼接metadata的样式.
No description provided by the author
Close 断路器关闭,节点处于正常工作状态.
ConfigQuotaGlobalMode 在全局配置.
ConfigQuotaLocalMode 在本地配置.
ContextKeyEngine 主流程引擎的上下文key SDK初始化后,会将主流程引擎对象放入上下文中,供插件按需使用.
ContextKeyFinishInitTime sdkContext创建结束时间.
ContextKeyPlugins sdkcontext上面的pluginManager.
ContextKeySelfIP sdk bind ip.
ContextKeyTakeEffectTime sdkContext创建开始时间.
ContextKeyToken SDK的唯一标识id.
CONTINUE 本次任务处理完毕,更新时间戳并等待下一轮.
CustomMeta 匹配自定义meta.
Dead 节点仍然不可用.
DefaultHeartbeatTtl.
Deleted 删除类型.
ErrCodeAPIInstanceNotFound 服务实例获取失败.
ErrCodeAPIInvalidArgument API参数非法的错误码.
ErrCodeAPIInvalidConfig 配置非法的错误码.
ErrCodeAPITimeoutError API超时错误的错误码.
ErrCodeCircuitBreakerError 服务熔断错误.
No description provided by the author
No description provided by the author
ErrCodeConsumerInitCalleeError 初始化服务运行中需要的被调服务失败.
ErrCodeCount 接口错误码数量,每添加了一个错误码,将这个数值加1.
No description provided by the author
ErrCodeDstMetaMismatch 目标规则元数据过滤失败.
ErrCodeInstanceInfoError 实例信息有误,如服务权重信息为空.
ErrCodeInternalError 内部算法及系统错误.
No description provided by the author
ErrCodeInvalidResponse Server返回的消息不合法.
ErrCodeInvalidRule 路由规则非法.
No description provided by the author
ErrCodeInvalidStateError SDK已经destroy后,继续调API会出现的错误码.
ErrCodeLocationMismatch 就近路由失败,在对应就近级别上面没有实例.
ErrCodeLocationNotFound 获取地域信息失败.
ErrCodeMeshConfigNotFound 目标类型的网格规则未找到.
ErrCodeNetworkError 连接server时所出现的未知网络异常.
ErrCodePluginError 插件错误的错误码.
No description provided by the author
ErrCodeRouteRuleNotMatch 路由规则匹配失败.
No description provided by the author
ErrCodeServerException server返回500错误.
ErrCodeServerUserError 连接server时,server返回400错误信息.
ErrCodeServiceNotFound 服务不存在.
ErrCodeSuccess 没有发生错误.
No description provided by the author
ErrCodeUnknown 未知错误.
No description provided by the author
No description provided by the author
No description provided by the author
EventCircuitBreaker 熔断规则.
EventFaultDetect 探测规则.
service实例事件.
EventInstances 实例事件.
EventRateLimiting 限流配置事件.
EventRouting 路由配置事件.
EventServices 批量服务.
EventStart 任务启动事件.
EventStop 任务停止事件.
EventUnknown 未知事件.
GetOneHealth 通配所有可用ip实例,等于关闭meta路由.
HalfOpen 断路器半开,节点处于刚熔断恢复,只允许少量请求通过.
HealthCheckTypeHeartBeat 健康检查类型:心跳.
Healthy 节点探测结果已经恢复健康, 代表可以放开一部分流量.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
LocationEmpty 地域信息获取成功,但是是空的,即没有在cmdb上面发现地域信息.
LocationError 地域信息获取失败,出现异常.
LocationInit 地域信息初始化,未获取到地域信息.
LocationReady 地域信息获取成功.
MaxPriority 最大优先级.
MaxWeight 最大权重值.
MeshDestinationRule DestinationRule.
MeshEnvoyFilter EnvoyFilter.
MeshGateway Gateway.
MeshServiceEntry ServiceEntry.
MeshVirtualService VirtualService.
MinPriority 最小优先级.
MinWeight 最小权重值.
ModeNoAgent 以no agent模式运行.
ModeWithAgent 带agent模式运行.
Modified 修改类型.
用于拼接metadata的样式.
NotChanged 没有变更.
NotContainMetaKey 匹配不带 metaData key路由.
Open 断路器已打开,代表节点已经被熔断.
No description provided by the author
北极星系统错误.
QuotaResultLimited 应答码:限制.
QuotaResultOk 应答码:成功.
RateLimitGlobal 在全局限流.
RateLimitLocal 在本地限流.
No description provided by the author
返回码取模的底数.
RetFail 调用失败.
RetFlowControl 限流.
RetReject 被熔断.
RetSuccess 调用成功.
RetTimeout 调用超时.
RetUnknown.
No description provided by the author
No description provided by the author
No description provided by the author
取模后的server内部错误.
No description provided by the author
SKIP 本次任务无需执行,不更新时间戳.
取模后的成功错误码.
TERMINATE 后续任务无需再执行.
用户错误.
WatchModeLongPull watch model by long pulling, the invocation would be hang on until revision updated or timeout.
WatchModeNotify watch model by notify to listener.

# Variables

No description provided by the author
No description provided by the author
MeshKeyLen 网格请求key分割长度.
MeshKeySpliter 网格请求key分隔符.
MeshPrefix 网格请求key前缀.

# Structs

APICallKey API调用的唯一标识.
APICallResult sdk api调用结果.
Argument 限流/路由参数.
No description provided by the author
No description provided by the author
No description provided by the author
CircuitBreakerStatusImpl 熔断状态模型,实现了CircuitBreakerStatus接口.
CircuitBreakerStatusWrapper 上方熔断管理器的包装,用于存入 atomic.Value.
CircuitBreakGauge Circuit Break Gauge.
Cluster 路由后的集群信息,包含的是标签以及地域信息.
ClusterEventHandler 集群事件处理器.
ClusterKey 集群缓存KEY对象.
ClusterValue 集群缓存VALUE对象.
ConfigFileChangeEvent 配置文件变更事件.
ConfigGroupChangeEvent 配置文件变更事件.
ControlParam 单次查询的控制参数.
DefaultConfigFileMetadata 默认 ConfigFileMetadata 实现类.
DefaultInstance default instance implementation.
No description provided by the author
EmptyInstanceGauge instangeGauge的空实现.
FailOverDefaultMetaConfig .
No description provided by the author
FilteredInstanceCounter 本地缓存中过滤的实例数量.
GetAllInstancesRequest 获取所有实例的请求.
No description provided by the author
GetInstancesRequest 批量服务实例查询请求.
GetOneInstanceRequest 单个服务实例查询请求.
GetServiceRuleRequest 获取服务规则请求.
GetServicesRequest 获取服务请求.
No description provided by the author
InitCalleeServiceRequest .
InstanceAddEvent 实例Add事件.
InstanceDeleteEvent 实例Delete事件.
InstanceDeRegisterRequest 反注册服务请求.
InstanceEvent 实例事件.
InstanceHeartbeatRequest 心跳上报请求.
InstanceKey 服务实例的唯一标识.
InstanceRegisterRequest 注册服务请求.
InstanceRegisterResponse 注册服务应答.
No description provided by the author
InstanceSet 服务实例集合.
InstancesResponse 服务实例查询应答.
InstanceUpdateEvent 实例Update事件.
InstanceWeight 节点权重.
Location 位置信息.
LocationBasedMetaKey 基于某个地域信息的元数据查询key.
No description provided by the author
MetaComposedValue 单个结构,针对单个会进行优化.
No description provided by the author
No description provided by the author
NotifyTrigger 通知开关,标识本次需要获取哪些资源.
OneInstanceResponse 单个服务实例.
OneInstanceUpdate 实例one update struct.
PeriodicTask 周期执行的任务信息(含高优先级任务).
PriorityTask 任务结构.
ProcessLoadBalanceRequest the input request parameters for RouterAPI.ProcessLoadBalance.
ProcessRoutersRequest the input request parameters for RouterAPI.ProcessRouters.
QuotaFutureImpl 异步获取配额的future.
QuotaRequestImpl 配额获取的请求.
QuotaResponse 配额查询应答.
RateLimitGauge Rate Limit Gauge.
ReplicateNodes 备份节点Set.
ReportClientRequest 客户端上报请求信息.
ReportClientResponse 客户端上报应答信息.
No description provided by the author
No description provided by the author
No description provided by the author
SDKToken sdkContext的唯一标识.
SelectorBase 插件自定义的实例选择器base.
ServiceCallResult 服务调用结果.
ServiceEventKey 服务加规则的唯一标识KEY.
ServiceInfo 服务信息.
ServiceKey 服务的唯一标识KEY.
No description provided by the author
ServiceRuleResponse 服务规则应答.
ServicesResponse 批量服务应答.
No description provided by the author
StatInfo 监控插件元数据信息.
SyncHashSet 协程安全的HashSet.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
WatchServiceRequest WatchService req.
WatchServiceResponse.
WeightedIndex 带累加权重的索引.

# Interfaces

ActiveDetectStatus 健康探测管理器.
CacheValueQuery 缓存查询请求对象.
CircuitBreakerStatus 熔断器状态管理器.
ClusterOwner 保存了cluster指针的对象.
ConfigFile 文本类型配置文件对象.
No description provided by the author
ConfigFileMetadata 配置文件元信息.
Engine 编排调度引擎,API相关逻辑在这里执行.
ExtendedSelector 可供插件自定义的实例选择器.
Instance 服务实例信息.
InstanceGauge 针对单个实例的单次评估指标.
No description provided by the author
InvokeHandler .
LocationInfo 地域信息.
PeriodicCallBack 回调接口.
PriorityCallBack 调度高优先级任务.
RegistryValue 存储于sdk缓存中的对象,包括服务实例和服务路由.
Resource.
No description provided by the author
RuleCache 服务规则缓存.
SDKError SDK错误的总封装类型.
ServiceClusters 集群缓存接口.
ServiceInstances 服务实例列表.
ServiceMetadata 服务元数据信息.
ServiceRule 服务配置通用接口.
No description provided by the author
Services 批量服务.
No description provided by the author
No description provided by the author
TaskValue 任务值类型.
TaskValues 定时任务处理的数据.
ValueContext 用于主流程传递kv数据的上下文对象,线程安全.

# Type aliases

ApiDelayRange API延时范围.
ApiOperation 命名类型,标识具体的API类型.
ChangeType 配置文件变更类型.
ConfigMode 配置模式.
No description provided by the author
No description provided by the author
ErrCode 错误码类型,Polaris SDK对外返回错误码都使用该类型.
ErrCodeType 错误码类型.
EventType 事件类型,用于标识各种不同的事件.
FailOverHandler 元数据路由兜底策略.
HashSet Hash集合数据结构.
HealthCheckStatus 健康探测状态.
No description provided by the author
MetricType 统计类型.
No description provided by the author
No description provided by the author
QuotaResultCode 应答码.
RetStatus 调用结果状态.
RunMode SDK的运行模式,可以指定为agent或者no-agent模式.
Status 断路器状态.
No description provided by the author
No description provided by the author
任务处理结果.
No description provided by the author
WeightIndexSlice 权重索引集合.