├── .devcontainer └── devcontainer.json ├── .github └── workflows │ └── ci.yml ├── .gitignore ├── CONTRIBUTING-zh.md ├── CONTRIBUTING.md ├── Code-of-Conduct-zh.md ├── Code-of-Conduct.md ├── Dockerfile ├── LICENSE ├── Makefile ├── PULL_REQUEST_TEMPLATE.md ├── README-zh.md ├── README.md ├── checkstyle ├── checkstyle.xml └── suppressions.xml ├── doc ├── grafana面板数据图表配置.zip └── how-to-start.md ├── entrypoint.sh ├── femas-adaptor ├── femas-adaptor-opensource-admin │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── com │ │ │ │ └── tencent │ │ │ │ └── tsf │ │ │ │ └── femas │ │ │ │ ├── adaptor │ │ │ │ └── paas │ │ │ │ │ ├── config │ │ │ │ │ ├── FemasConfigGrpcClientManager.java │ │ │ │ │ ├── FemasConfigHttpClientManager.java │ │ │ │ │ └── FemasPaasConfigManager.java │ │ │ │ │ ├── governance │ │ │ │ │ ├── auth │ │ │ │ │ │ ├── AuthRule.java │ │ │ │ │ │ ├── AuthRuleGroup.java │ │ │ │ │ │ └── FemasAuthHandler.java │ │ │ │ │ ├── circuitbreaker │ │ │ │ │ │ ├── CircuitBreakerApi.java │ │ │ │ │ │ ├── CircuitBreakerRule.java │ │ │ │ │ │ ├── CircuitBreakerStrategy.java │ │ │ │ │ │ ├── FemasCircuitBreakerHandler.java │ │ │ │ │ │ └── event │ │ │ │ │ │ │ ├── CircuitBreakerEventCollector.java │ │ │ │ │ │ │ └── EventResponse.java │ │ │ │ │ ├── lane │ │ │ │ │ │ ├── FemasLaneFilter.java │ │ │ │ │ │ ├── FemasLaneHandler.java │ │ │ │ │ │ ├── LaneGroup.java │ │ │ │ │ │ ├── LaneIdHolder.java │ │ │ │ │ │ ├── LaneInfo.java │ │ │ │ │ │ ├── LaneRule.java │ │ │ │ │ │ ├── LaneRuleTag.java │ │ │ │ │ │ ├── RuleTagRelationship.java │ │ │ │ │ │ └── ServiceInfo.java │ │ │ │ │ ├── loadbalance │ │ │ │ │ │ └── FemasLoadBalancerHandler.java │ │ │ │ │ ├── ratelimiter │ │ │ │ │ │ ├── FemasRateLimiter.java │ │ │ │ │ │ ├── FemasRateLimiterHandler.java │ │ │ │ │ │ ├── FemasTokenBucket.java │ │ │ │ │ │ ├── RateLimitClientCache.java │ │ │ │ │ │ ├── RateLimitController.java │ │ │ │ │ │ ├── RequestCollector.java │ │ │ │ │ │ └── entity │ │ │ │ │ │ │ ├── LimitRule.java │ │ │ │ │ │ │ ├── ReportRequest.java │ │ │ │ │ │ │ └── ReportResponse.java │ │ │ │ │ └── router │ │ │ │ │ │ ├── FemasRouterHandler.java │ │ │ │ │ │ ├── RouteDest.java │ │ │ │ │ │ ├── RouteDestItem.java │ │ │ │ │ │ ├── RouteRule.java │ │ │ │ │ │ ├── RouteRuleGroup.java │ │ │ │ │ │ └── RouteTag.java │ │ │ │ │ ├── logger │ │ │ │ │ ├── ConverterBase.java │ │ │ │ │ ├── Log4J2TraceConverter.java │ │ │ │ │ └── LogbackTraceConverter.java │ │ │ │ │ └── registry │ │ │ │ │ └── FemasRegistry.java │ │ │ │ └── common │ │ │ │ └── context │ │ │ │ └── FemasContext.java │ │ └── resources │ │ │ └── META-INF │ │ │ └── services │ │ │ ├── com.tencent.tsf.femas.common.context.Context │ │ │ ├── com.tencent.tsf.femas.common.context.ContextConstant │ │ │ ├── com.tencent.tsf.femas.common.serviceregistry.AbstractServiceRegistryMetadata │ │ │ ├── com.tencent.tsf.femas.governance.connector.server.ServerConnectorManager │ │ │ ├── com.tencent.tsf.femas.governance.lane.LaneFilter │ │ │ ├── com.tencent.tsf.femas.governance.ratelimit.RateLimiter │ │ │ └── com.tencent.tsf.femas.plugin.config.ConfigHandler │ │ └── test │ │ └── java │ │ └── com │ │ └── tencent │ │ └── tsf │ │ └── femas │ │ └── opensource │ │ └── adaptor │ │ └── ConfigClientManagerTest.java └── pom.xml ├── femas-admin-starter ├── bin │ ├── shutdown.cmd │ ├── shutdown.sh │ ├── startup.cmd │ └── startup.sh ├── femas-assembly.xml └── pom.xml ├── femas-admin ├── pom.xml └── src │ ├── main │ ├── java │ │ └── com │ │ │ └── tencent │ │ │ └── tsf │ │ │ └── femas │ │ │ ├── FemasApplication.java │ │ │ ├── config │ │ │ ├── AdminInterceptor.java │ │ │ ├── GlobalConfig.java │ │ │ ├── RestTemplateConfiguration.java │ │ │ └── WebConfigurer.java │ │ │ ├── constant │ │ │ ├── AdminConstants.java │ │ │ ├── DcfgConstants.java │ │ │ ├── IgnorePrefix.java │ │ │ ├── ModuleConstants.java │ │ │ ├── PromConstants.java │ │ │ └── Types.java │ │ │ ├── context │ │ │ └── ApplicationContextHelper.java │ │ │ ├── endpoint │ │ │ ├── LoginEndpoint.java │ │ │ ├── adaptor │ │ │ │ ├── AbstractBaseEndpoint.java │ │ │ │ ├── ControllerExecutorTemplate.java │ │ │ │ └── Processor.java │ │ │ ├── configlisten │ │ │ │ ├── ConfigEndpoint.java │ │ │ │ ├── GrpcLongPollingEndpoint.java │ │ │ │ └── LongPollingEndpoint.java │ │ │ ├── dcfg │ │ │ │ └── DcfgEndpoint.java │ │ │ ├── handler │ │ │ │ └── GlobalExceptionHandler.java │ │ │ ├── index │ │ │ │ └── IndexController.java │ │ │ ├── log │ │ │ │ └── LogEndpoint.java │ │ │ ├── metircs │ │ │ │ └── package-info.java │ │ │ ├── metric │ │ │ │ └── MetricEndpoint.java │ │ │ ├── namespace │ │ │ │ └── NamespaceManageEndpoint.java │ │ │ ├── registry │ │ │ │ └── RegistryManageEndpoint.java │ │ │ ├── rocks │ │ │ │ └── RocksManageEndpoint.java │ │ │ ├── rule │ │ │ │ ├── auth │ │ │ │ │ └── AuthEndpoint.java │ │ │ │ ├── breaker │ │ │ │ │ └── BreakerEndpoint.java │ │ │ │ ├── lane │ │ │ │ │ └── LaneController.java │ │ │ │ ├── limit │ │ │ │ │ └── LimitEndpoint.java │ │ │ │ └── route │ │ │ │ │ └── RouteEndpoint.java │ │ │ ├── servicegovern │ │ │ │ └── ServiceManageEndpoint.java │ │ │ └── trace │ │ │ │ └── TraceEndpoint.java │ │ │ ├── entity │ │ │ ├── IdModel.java │ │ │ ├── KVEntity.java │ │ │ ├── Page.java │ │ │ ├── PageModel.java │ │ │ ├── PageService.java │ │ │ ├── Record.java │ │ │ ├── ServiceInfo.java │ │ │ ├── ServiceModel.java │ │ │ ├── ServiceVersion.java │ │ │ ├── dcfg │ │ │ │ ├── Config.java │ │ │ │ ├── ConfigReleaseLog.java │ │ │ │ ├── ConfigRequest.java │ │ │ │ └── ConfigVersion.java │ │ │ ├── log │ │ │ │ └── LogModel.java │ │ │ ├── metrix │ │ │ │ ├── CallKindMetric.java │ │ │ │ ├── HttpStatusMetric.java │ │ │ │ ├── InstanceMetric.java │ │ │ │ ├── ResponseMetric.java │ │ │ │ ├── ServiceMetric.java │ │ │ │ ├── TimeSeries.java │ │ │ │ ├── model │ │ │ │ │ ├── MetricModel.java │ │ │ │ │ ├── ServiceMetricModel.java │ │ │ │ │ └── ServiceOverviewMetricModel.java │ │ │ │ ├── prom │ │ │ │ │ ├── MetricResult.java │ │ │ │ │ ├── PromDataInfo.java │ │ │ │ │ ├── PromResponse.java │ │ │ │ │ └── VectorResult.java │ │ │ │ └── view │ │ │ │ │ ├── RateLimitMetricVo.java │ │ │ │ │ ├── RouteMetricVo.java │ │ │ │ │ ├── ServiceMetricVo.java │ │ │ │ │ └── ServiceOverviewMetricVo.java │ │ │ ├── namespace │ │ │ │ ├── Namespace.java │ │ │ │ ├── NamespaceIdModel.java │ │ │ │ ├── NamespacePageModel.java │ │ │ │ └── NamespaceVo.java │ │ │ ├── param │ │ │ │ ├── InstanceVersionParam.java │ │ │ │ ├── RegistryInstanceParam.java │ │ │ │ ├── RegistryServiceParam.java │ │ │ │ └── User.java │ │ │ ├── pass │ │ │ │ ├── GetValue.java │ │ │ │ ├── auth │ │ │ │ │ ├── AuthRule.java │ │ │ │ │ └── AuthRuleGroup.java │ │ │ │ ├── circuitbreaker │ │ │ │ │ ├── CircuitBreakerApi.java │ │ │ │ │ ├── CircuitBreakerRule.java │ │ │ │ │ ├── CircuitBreakerStrategy.java │ │ │ │ │ └── FemasCircuitBreakerIsolationLevelEnum.java │ │ │ │ └── route │ │ │ │ │ ├── RouteDest.java │ │ │ │ │ ├── RouteDestItem.java │ │ │ │ │ ├── RouteRule.java │ │ │ │ │ ├── RouteRuleGroup.java │ │ │ │ │ └── RouteTag.java │ │ │ ├── registry │ │ │ │ ├── ApiModel.java │ │ │ │ ├── ClusterServer.java │ │ │ │ ├── Instance.java │ │ │ │ ├── RegistryConfig.java │ │ │ │ ├── RegistryConfigModel.java │ │ │ │ ├── RegistryIdModel.java │ │ │ │ ├── RegistryInfo.java │ │ │ │ ├── RegistryIns.java │ │ │ │ ├── RegistryModel.java │ │ │ │ ├── RegistryPageService.java │ │ │ │ ├── RegistrySearch.java │ │ │ │ ├── RegistryStatus.java │ │ │ │ ├── ServerState.java │ │ │ │ ├── ServiceApi.java │ │ │ │ ├── ServiceApiRequest.java │ │ │ │ ├── ServiceBriefInfo.java │ │ │ │ ├── ServiceOverview.java │ │ │ │ ├── consul │ │ │ │ │ ├── ConsulServer.java │ │ │ │ │ └── ConsulService.java │ │ │ │ ├── eureka │ │ │ │ │ ├── EurekaApplication.java │ │ │ │ │ ├── EurekaInstance.java │ │ │ │ │ ├── EurekaServer.java │ │ │ │ │ └── EurekaService.java │ │ │ │ ├── nacos │ │ │ │ │ ├── NacosInstance.java │ │ │ │ │ ├── NacosServer.java │ │ │ │ │ └── NacosService.java │ │ │ │ └── polaris │ │ │ │ │ ├── PolarisServer.java │ │ │ │ │ └── PolarisService.java │ │ │ ├── rocks │ │ │ │ └── RocksModel.java │ │ │ ├── rule │ │ │ │ ├── DestTag.java │ │ │ │ ├── FemasAuthRule.java │ │ │ │ ├── FemasCircuitBreakerRule.java │ │ │ │ ├── FemasCircuitBreakerStrategy.java │ │ │ │ ├── FemasEventData.java │ │ │ │ ├── FemasEventDataPair.java │ │ │ │ ├── FemasEventList.java │ │ │ │ ├── FemasLimitRule.java │ │ │ │ ├── FemasRouteRule.java │ │ │ │ ├── RuleModel.java │ │ │ │ ├── RuleSearch.java │ │ │ │ ├── ServiceSearch.java │ │ │ │ ├── auth │ │ │ │ │ ├── AuthRuleModel.java │ │ │ │ │ ├── RuleTypeEnum.java │ │ │ │ │ ├── ServiceAuthRuleModel.java │ │ │ │ │ └── ServiceAuthTypeModel.java │ │ │ │ ├── breaker │ │ │ │ │ └── CircuitBreakerModel.java │ │ │ │ ├── lane │ │ │ │ │ ├── GrayTypeEnum.java │ │ │ │ │ ├── LaneInfo.java │ │ │ │ │ ├── LaneInfoModel.java │ │ │ │ │ ├── LaneRule.java │ │ │ │ │ ├── LaneRuleModel.java │ │ │ │ │ ├── LaneRuleTag.java │ │ │ │ │ ├── LaneServiceInfo.java │ │ │ │ │ ├── PriorityModel.java │ │ │ │ │ └── RuleTagRelationship.java │ │ │ │ ├── limit │ │ │ │ │ └── LimitModel.java │ │ │ │ └── route │ │ │ │ │ ├── RouteTag.java │ │ │ │ │ ├── Tolerate.java │ │ │ │ │ └── TolerateModel.java │ │ │ ├── service │ │ │ │ ├── EventTypeEnum.java │ │ │ │ ├── ServiceEventModel.java │ │ │ │ └── ServiceEventView.java │ │ │ └── trace │ │ │ │ ├── NodeMetricsQueryCondition.java │ │ │ │ ├── TopologyQueryCondition.java │ │ │ │ ├── TraceDetailQueryCondition.java │ │ │ │ ├── TraceQueryCondition.java │ │ │ │ ├── config │ │ │ │ └── SkyWalkingConditional.java │ │ │ │ ├── skywalking │ │ │ │ ├── BasicTrace.java │ │ │ │ ├── Call.java │ │ │ │ ├── DefaultScopeDefine.java │ │ │ │ ├── DetectPoint.java │ │ │ │ ├── Duration.java │ │ │ │ ├── DurationUtils.java │ │ │ │ ├── KeyValue.java │ │ │ │ ├── LogEntity.java │ │ │ │ ├── MicroServiceType.java │ │ │ │ ├── Node.java │ │ │ │ ├── Pagination.java │ │ │ │ ├── PointOfTime.java │ │ │ │ ├── QueryOrder.java │ │ │ │ ├── Ref.java │ │ │ │ ├── RefType.java │ │ │ │ ├── Scope.java │ │ │ │ ├── ScopeDefaultColumn.java │ │ │ │ ├── Service.java │ │ │ │ ├── SkyWalkingMetricsType.java │ │ │ │ ├── SkywalkingConstant.java │ │ │ │ ├── Span.java │ │ │ │ ├── SpanTag.java │ │ │ │ ├── Step.java │ │ │ │ ├── TagPair.java │ │ │ │ ├── Topology.java │ │ │ │ ├── Trace.java │ │ │ │ ├── TraceBrief.java │ │ │ │ └── TraceState.java │ │ │ │ └── vo │ │ │ │ ├── BasicTraceVo.java │ │ │ │ ├── NodeVo.java │ │ │ │ ├── SpanVo.java │ │ │ │ ├── TopologyVo.java │ │ │ │ ├── TraceBriefVo.java │ │ │ │ └── TraceVo.java │ │ │ ├── enums │ │ │ ├── LogModuleEnum.java │ │ │ ├── RegistryStatus.java │ │ │ └── ServiceInvokeEnum.java │ │ │ ├── event │ │ │ ├── ConfigDataChangedListener.java │ │ │ ├── ConfigUpdateEvent.java │ │ │ ├── ConfigUpdateEventDispatcher.java │ │ │ └── EventPublishCenter.java │ │ │ ├── exception │ │ │ ├── FemasException.java │ │ │ ├── IDQuantityInvalidException.java │ │ │ ├── InvalidResourceException.java │ │ │ ├── RegistryConfigErrorException.java │ │ │ └── RocksDbStorageException.java │ │ │ ├── factory │ │ │ └── ServiceExecutorFactory.java │ │ │ ├── filter │ │ │ └── FemasCoreFilter.java │ │ │ ├── listener │ │ │ └── SpringBootStartListener.java │ │ │ ├── schedule │ │ │ └── SyncNamespaceTask.java │ │ │ ├── service │ │ │ ├── ConfigListenerService.java │ │ │ ├── EventService.java │ │ │ ├── IIDGeneratorService.java │ │ │ ├── MetricService.java │ │ │ ├── NamespaceManageExecutor.java │ │ │ ├── RawKvListenerService.java │ │ │ ├── ServiceExecutor.java │ │ │ ├── ServiceExecutorPool.java │ │ │ ├── dcfg │ │ │ │ ├── ConfigService.java │ │ │ │ └── ConfigVersionService.java │ │ │ ├── http │ │ │ │ └── HttpLongPollingDataUpdateService.java │ │ │ ├── impl │ │ │ │ ├── IDGeneratorService.java │ │ │ │ └── MetricServiceImpl.java │ │ │ ├── namespace │ │ │ │ └── NamespaceMangerService.java │ │ │ ├── registry │ │ │ │ ├── ConsulRegistryOpenApi.java │ │ │ │ ├── EurekaRegistryOpenApi.java │ │ │ │ ├── K8sRegistryOpenApi.java │ │ │ │ ├── KubernetesFabricRegistryOpenApi.java │ │ │ │ ├── NacosRegistryOpenApi.java │ │ │ │ ├── OpenApiFactory.java │ │ │ │ ├── PolarisRegistryOpenApi.java │ │ │ │ ├── RegistryManagerService.java │ │ │ │ ├── RegistryOpenApiAdaptor.java │ │ │ │ ├── RegistryOpenApiInterface.java │ │ │ │ ├── RoundRobbin.java │ │ │ │ ├── ServerMetrics.java │ │ │ │ ├── ServiceCacheListener.java │ │ │ │ └── ServiceManagerService.java │ │ │ ├── rule │ │ │ │ ├── AuthService.java │ │ │ │ ├── BreakerService.java │ │ │ │ ├── ConvertService.java │ │ │ │ ├── LaneService.java │ │ │ │ ├── LimitService.java │ │ │ │ └── RouteService.java │ │ │ └── trace │ │ │ │ ├── AbstractOpenTracingServer.java │ │ │ │ ├── OpentracingServer.java │ │ │ │ └── skywalking │ │ │ │ └── SkyWalkingTracingServer.java │ │ │ ├── storage │ │ │ ├── DataOperation.java │ │ │ ├── StorageResult.java │ │ │ ├── config │ │ │ │ ├── MysqlDbConditional.java │ │ │ │ └── RocksDbConditional.java │ │ │ ├── external │ │ │ │ ├── JdbcTemplateContext.java │ │ │ │ ├── MysqlDataOperation.java │ │ │ │ ├── MysqlDbManager.java │ │ │ │ ├── RowMapperFactory.java │ │ │ │ └── rowmapper │ │ │ │ │ ├── AuthRowMapper.java │ │ │ │ │ ├── CircuitBreakerRowMapper.java │ │ │ │ │ ├── LaneRowMapper.java │ │ │ │ │ ├── LaneRuleRowMapper.java │ │ │ │ │ ├── NamespaceRowMapper.java │ │ │ │ │ ├── RateLimitRowMapper.java │ │ │ │ │ ├── RouteRowMapper.java │ │ │ │ │ └── ServiceEventRowMapper.java │ │ │ └── rocksdb │ │ │ │ ├── AbstractRawKVStore.java │ │ │ │ ├── Lifecycle.java │ │ │ │ ├── RawKVStore.java │ │ │ │ ├── RocksDbConfig.java │ │ │ │ ├── RocksDbDataOperation.java │ │ │ │ ├── RocksDbKvStore.java │ │ │ │ └── StringRawKVStoreManager.java │ │ │ └── util │ │ │ ├── AESUtils.java │ │ │ ├── AdminTimeUtil.java │ │ │ ├── EnvUtil.java │ │ │ ├── HttpTinyClient.java │ │ │ ├── IOTinyUtils.java │ │ │ ├── MapUtil.java │ │ │ ├── PageUtil.java │ │ │ ├── PromDataUtil.java │ │ │ ├── ResourceFileReadUtil.java │ │ │ └── ResultCheck.java │ └── resources │ │ ├── META-INF │ │ └── spring.factories │ │ ├── adminDb.sql │ │ ├── banner.txt │ │ ├── bootstrap.yaml │ │ ├── index │ │ └── index.html │ │ ├── logback-spring.xml │ │ └── static │ │ ├── cdn │ │ ├── jquery-3.6.0.slim.min.js │ │ └── polyfill.min.js │ │ ├── css │ │ └── sct.css │ │ ├── icon │ │ ├── api.svg │ │ ├── cafka.svg │ │ ├── cmq.svg │ │ ├── common.svg │ │ ├── config-hover.svg │ │ ├── config.svg │ │ ├── es.svg │ │ ├── favicon.ico │ │ ├── favicon_bac.ico │ │ ├── femas.svg │ │ ├── force.svg │ │ ├── guide-hover.svg │ │ ├── guide.svg │ │ ├── kafka.svg │ │ ├── log-hover.svg │ │ ├── log.svg │ │ ├── mongodb.svg │ │ ├── monitor-hover.svg │ │ ├── monitor.svg │ │ ├── msgw.svg │ │ ├── mysql.svg │ │ ├── namespace-hover.svg │ │ ├── namespace.svg │ │ ├── postgresql.svg │ │ ├── publish-hover.svg │ │ ├── publish.svg │ │ ├── redis.svg │ │ ├── registry-hover.svg │ │ ├── registry.svg │ │ ├── relationship.svg │ │ ├── rocketmq.svg │ │ ├── service-hover.svg │ │ ├── service.svg │ │ ├── tsf.svg │ │ └── user.svg │ │ ├── images │ │ └── login-bg.png │ │ ├── index.html │ │ ├── js │ │ └── sct.js │ │ └── sct │ │ ├── .babelrc │ │ ├── .eslintrc │ │ ├── README.md │ │ ├── build │ │ ├── copy-dist.js │ │ ├── webpack.base.conf.js │ │ ├── webpack.dev.conf.js │ │ └── webpack.prod.conf.js │ │ ├── package-lock.json │ │ ├── package.json │ │ ├── src │ │ ├── app │ │ │ ├── App.tsx │ │ │ ├── apm │ │ │ │ ├── model.ts │ │ │ │ ├── requestDetail │ │ │ │ │ ├── DynamicSubGridDuck.ts │ │ │ │ │ ├── Page.tsx │ │ │ │ │ ├── PageDuck.ts │ │ │ │ │ ├── detail │ │ │ │ │ │ ├── DetailGrid.tsx │ │ │ │ │ │ ├── DetailGridDuck.ts │ │ │ │ │ │ ├── DurationChart.tsx │ │ │ │ │ │ ├── SpanDetail.tsx │ │ │ │ │ │ └── SpanDetailDuck.ts │ │ │ │ │ ├── model.ts │ │ │ │ │ ├── types.ts │ │ │ │ │ └── utils.ts │ │ │ │ ├── spanGrid │ │ │ │ │ ├── Page.tsx │ │ │ │ │ ├── PageDuck.ts │ │ │ │ │ └── getColumns.tsx │ │ │ │ ├── topology │ │ │ │ │ ├── Page.tsx │ │ │ │ │ ├── PageDuck.ts │ │ │ │ │ ├── TraceGraphTooltip.ts │ │ │ │ │ ├── model.ts │ │ │ │ │ ├── types.ts │ │ │ │ │ └── util.tsx │ │ │ │ ├── types.ts │ │ │ │ └── utils.ts │ │ │ ├── config │ │ │ │ ├── Page.tsx │ │ │ │ ├── PageDuck.ts │ │ │ │ ├── detail │ │ │ │ │ ├── Page.tsx │ │ │ │ │ ├── PageDuck.ts │ │ │ │ │ ├── baseinfo │ │ │ │ │ │ ├── Page.tsx │ │ │ │ │ │ └── PageDuck.ts │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── types.ts │ │ │ │ │ └── version │ │ │ │ │ │ ├── Page.tsx │ │ │ │ │ │ ├── PageDuck.ts │ │ │ │ │ │ └── getColumns.tsx │ │ │ │ ├── getColumns.tsx │ │ │ │ ├── index.ts │ │ │ │ ├── model.ts │ │ │ │ ├── operations │ │ │ │ │ ├── create │ │ │ │ │ │ ├── Create.tsx │ │ │ │ │ │ ├── CreateDuck.ts │ │ │ │ │ │ ├── TagConfig.tsx │ │ │ │ │ │ └── index.ts │ │ │ │ │ └── modifyDesc │ │ │ │ │ │ ├── Page.tsx │ │ │ │ │ │ ├── PageDuck.ts │ │ │ │ │ │ └── index.ts │ │ │ │ └── types.ts │ │ │ ├── guide │ │ │ │ └── Page.tsx │ │ │ ├── namespace │ │ │ │ ├── Page.tsx │ │ │ │ ├── PageDuck.ts │ │ │ │ ├── components │ │ │ │ │ └── NamespaceSelectDuck.ts │ │ │ │ ├── getColumns.tsx │ │ │ │ ├── index.ts │ │ │ │ ├── model.ts │ │ │ │ ├── operations │ │ │ │ │ ├── create │ │ │ │ │ │ ├── Create.tsx │ │ │ │ │ │ ├── CreateDuck.ts │ │ │ │ │ │ └── index.ts │ │ │ │ │ └── remove.tsx │ │ │ │ └── types.ts │ │ │ ├── operation │ │ │ │ ├── Page.tsx │ │ │ │ ├── PageDuck.ts │ │ │ │ ├── getColumns.tsx │ │ │ │ ├── index.ts │ │ │ │ ├── model.ts │ │ │ │ └── types.ts │ │ │ ├── publish │ │ │ │ ├── Page.tsx │ │ │ │ ├── PageDuck.ts │ │ │ │ ├── index.ts │ │ │ │ ├── lane │ │ │ │ │ ├── Page.tsx │ │ │ │ │ ├── PageDuck.ts │ │ │ │ │ ├── detail │ │ │ │ │ │ ├── Page.tsx │ │ │ │ │ │ ├── PageDuck.ts │ │ │ │ │ │ ├── index.ts │ │ │ │ │ │ ├── monitorInfo │ │ │ │ │ │ │ ├── Page.tsx │ │ │ │ │ │ │ └── PageDuck.ts │ │ │ │ │ │ ├── serviceInfo │ │ │ │ │ │ │ ├── Page.tsx │ │ │ │ │ │ │ └── PageDuck.ts │ │ │ │ │ │ └── types.ts │ │ │ │ │ ├── getColumns.tsx │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── model.ts │ │ │ │ │ ├── operations │ │ │ │ │ │ ├── baseInfo │ │ │ │ │ │ │ └── StepOne.tsx │ │ │ │ │ │ ├── create │ │ │ │ │ │ │ ├── Create.tsx │ │ │ │ │ │ │ ├── CreateDuck.ts │ │ │ │ │ │ │ ├── index.ts │ │ │ │ │ │ │ └── types.ts │ │ │ │ │ │ └── goupInfo │ │ │ │ │ │ │ ├── GoupInfo.tsx │ │ │ │ │ │ │ ├── deploy │ │ │ │ │ │ │ ├── Deploy.tsx │ │ │ │ │ │ │ ├── DeployDuck.ts │ │ │ │ │ │ │ ├── index.ts │ │ │ │ │ │ │ ├── model.ts │ │ │ │ │ │ │ └── type.ts │ │ │ │ │ │ │ └── index.ts │ │ │ │ │ └── types.ts │ │ │ │ ├── lanerule │ │ │ │ │ ├── Page.tsx │ │ │ │ │ ├── PageDuck.ts │ │ │ │ │ ├── detail │ │ │ │ │ │ ├── Page.tsx │ │ │ │ │ │ ├── PageDuck.ts │ │ │ │ │ │ └── index.ts │ │ │ │ │ ├── getColumns.tsx │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── model.ts │ │ │ │ │ ├── operations │ │ │ │ │ │ ├── baseInfo │ │ │ │ │ │ │ └── index.tsx │ │ │ │ │ │ ├── create │ │ │ │ │ │ │ ├── Create.tsx │ │ │ │ │ │ │ ├── CreateDuck.ts │ │ │ │ │ │ │ ├── index.ts │ │ │ │ │ │ │ └── types.ts │ │ │ │ │ │ ├── paramInfo │ │ │ │ │ │ │ └── index.tsx │ │ │ │ │ │ └── targetInfo │ │ │ │ │ │ │ └── index.tsx │ │ │ │ │ └── types.ts │ │ │ │ └── types.ts │ │ │ ├── registry │ │ │ │ ├── Page.tsx │ │ │ │ ├── PageDuck.ts │ │ │ │ ├── components │ │ │ │ │ └── RegsitrySelectDuck.ts │ │ │ │ ├── detail │ │ │ │ │ ├── Page.tsx │ │ │ │ │ ├── PageDuck.ts │ │ │ │ │ ├── baseinfo │ │ │ │ │ │ ├── Page.tsx │ │ │ │ │ │ └── PageDuck.ts │ │ │ │ │ ├── index.ts │ │ │ │ │ └── types.ts │ │ │ │ ├── getColumns.tsx │ │ │ │ ├── index.ts │ │ │ │ ├── model.ts │ │ │ │ ├── operations │ │ │ │ │ ├── create │ │ │ │ │ │ ├── Create.tsx │ │ │ │ │ │ ├── CreateDuck.ts │ │ │ │ │ │ └── index.ts │ │ │ │ │ └── remove.tsx │ │ │ │ └── types.ts │ │ │ ├── service │ │ │ │ ├── Page.tsx │ │ │ │ ├── PageDuck.ts │ │ │ │ ├── components │ │ │ │ │ ├── Service.tsx │ │ │ │ │ └── ServiceSelectDuck.ts │ │ │ │ ├── detail │ │ │ │ │ ├── Page.tsx │ │ │ │ │ ├── PageDuck.ts │ │ │ │ │ ├── api │ │ │ │ │ │ ├── Page.tsx │ │ │ │ │ │ ├── PageDuck.ts │ │ │ │ │ │ ├── components │ │ │ │ │ │ │ ├── ApiSelect.tsx │ │ │ │ │ │ │ └── ApiSelectDuck.ts │ │ │ │ │ │ ├── getColumns.tsx │ │ │ │ │ │ └── types.ts │ │ │ │ │ ├── auth │ │ │ │ │ │ ├── Page.tsx │ │ │ │ │ │ ├── PageDuck.ts │ │ │ │ │ │ ├── create │ │ │ │ │ │ │ ├── Page.tsx │ │ │ │ │ │ │ ├── PageDuck.tsx │ │ │ │ │ │ │ └── index.ts │ │ │ │ │ │ ├── getColumns.tsx │ │ │ │ │ │ ├── model.ts │ │ │ │ │ │ └── types.ts │ │ │ │ │ ├── baseinfo │ │ │ │ │ │ ├── Page.tsx │ │ │ │ │ │ ├── PageDuck.ts │ │ │ │ │ │ └── getColumns.tsx │ │ │ │ │ ├── event │ │ │ │ │ │ ├── Page.tsx │ │ │ │ │ │ ├── PageDuck.ts │ │ │ │ │ │ ├── getColumns.tsx │ │ │ │ │ │ └── types.ts │ │ │ │ │ ├── fuse │ │ │ │ │ │ ├── Page.tsx │ │ │ │ │ │ ├── PageDuck.ts │ │ │ │ │ │ ├── create │ │ │ │ │ │ │ ├── ApiTableSelect.tsx │ │ │ │ │ │ │ ├── ApiTableSelectDuck.ts │ │ │ │ │ │ │ ├── FormDuck.ts │ │ │ │ │ │ │ ├── Page.tsx │ │ │ │ │ │ │ ├── PageDuck.ts │ │ │ │ │ │ │ └── index.ts │ │ │ │ │ │ ├── getColumns.tsx │ │ │ │ │ │ ├── model.ts │ │ │ │ │ │ └── types.ts │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── limit │ │ │ │ │ │ ├── Page.tsx │ │ │ │ │ │ ├── PageDuck.ts │ │ │ │ │ │ ├── create │ │ │ │ │ │ │ ├── Page.tsx │ │ │ │ │ │ │ ├── PageDuck.ts │ │ │ │ │ │ │ ├── index.ts │ │ │ │ │ │ │ └── validator.ts │ │ │ │ │ │ ├── getColumns.tsx │ │ │ │ │ │ ├── model.ts │ │ │ │ │ │ └── types.ts │ │ │ │ │ ├── route │ │ │ │ │ │ ├── Page.tsx │ │ │ │ │ │ ├── PageDuck.tsx │ │ │ │ │ │ ├── create │ │ │ │ │ │ │ ├── DynamicSelectDuck.ts │ │ │ │ │ │ │ ├── Form.tsx │ │ │ │ │ │ │ ├── Page.tsx │ │ │ │ │ │ │ ├── PageDuck.ts │ │ │ │ │ │ │ ├── TargetGrid.tsx │ │ │ │ │ │ │ ├── TargetGridDuck.ts │ │ │ │ │ │ │ ├── VersionSelect.tsx │ │ │ │ │ │ │ ├── VersionSelectDuck.ts │ │ │ │ │ │ │ ├── index.ts │ │ │ │ │ │ │ ├── types.ts │ │ │ │ │ │ │ └── validator.ts │ │ │ │ │ │ ├── getColumns.tsx │ │ │ │ │ │ ├── model.ts │ │ │ │ │ │ └── types.ts │ │ │ │ │ ├── tagTable │ │ │ │ │ │ ├── DynamicSelectDuck.ts │ │ │ │ │ │ ├── NamespaceServiceSelect.tsx │ │ │ │ │ │ ├── SearchSelect.tsx │ │ │ │ │ │ ├── SelectDuck.ts │ │ │ │ │ │ ├── ServiceSelect.tsx │ │ │ │ │ │ ├── TagTable.tsx │ │ │ │ │ │ ├── TagTableDuck.ts │ │ │ │ │ │ ├── cacheableModel.ts │ │ │ │ │ │ ├── types.ts │ │ │ │ │ │ └── validateUtil.ts │ │ │ │ │ ├── types.ts │ │ │ │ │ └── utils.tsx │ │ │ │ ├── getColumns.tsx │ │ │ │ ├── index.ts │ │ │ │ ├── model.ts │ │ │ │ └── types.ts │ │ │ ├── topology │ │ │ │ ├── Page.tsx │ │ │ │ ├── PageDuck.ts │ │ │ │ ├── TopoSettings.tsx │ │ │ │ ├── TopoTips.tsx │ │ │ │ └── index.ts │ │ │ └── trace │ │ │ │ ├── Page.tsx │ │ │ │ ├── PageDuck.ts │ │ │ │ ├── detail │ │ │ │ ├── Page.tsx │ │ │ │ ├── PageDuck.ts │ │ │ │ ├── SearchForm.tsx │ │ │ │ └── SearchFormDuck.ts │ │ │ │ ├── index.ts │ │ │ │ ├── model.ts │ │ │ │ ├── search │ │ │ │ ├── Page.tsx │ │ │ │ ├── PageDuck.ts │ │ │ │ ├── SearchForm.tsx │ │ │ │ ├── SearchFormDuck.ts │ │ │ │ ├── TagConfig.tsx │ │ │ │ └── getColumns.tsx │ │ │ │ └── types.ts │ │ ├── assets │ │ │ ├── css │ │ │ │ ├── index.css │ │ │ │ └── login.css │ │ │ ├── image │ │ │ │ └── login-bg.png │ │ │ ├── index.html │ │ │ └── index.tmplate │ │ ├── common │ │ │ ├── components │ │ │ │ ├── AutoComplete.tsx │ │ │ │ ├── BaseLayout.tsx │ │ │ │ ├── CodeMirrorBox.tsx │ │ │ │ ├── CodeMirrorDiff.tsx │ │ │ │ ├── CopyableText.tsx │ │ │ │ ├── SortList.tsx │ │ │ │ ├── TimeSelect.tsx │ │ │ │ ├── WithLoadingTip.tsx │ │ │ │ └── csv.ts │ │ │ ├── duckComponents │ │ │ │ ├── Confirm.tsx │ │ │ │ ├── DetailPage.tsx │ │ │ │ ├── Dialog.tsx │ │ │ │ ├── DispatchProvider.tsx │ │ │ │ ├── FieldManager.tsx │ │ │ │ ├── Grid.tsx │ │ │ │ ├── GridPageGrid.tsx │ │ │ │ ├── GridPagePagination.tsx │ │ │ │ ├── SearchableSelect.tsx │ │ │ │ ├── SearchableTableSelect.tsx │ │ │ │ ├── SearchableTeaSelect.tsx │ │ │ │ ├── form │ │ │ │ │ ├── Checkbox.tsx │ │ │ │ │ ├── CheckboxGroup.tsx │ │ │ │ │ ├── Control.tsx │ │ │ │ │ ├── Field.tsx │ │ │ │ │ ├── Input.tsx │ │ │ │ │ ├── InputNumber.tsx │ │ │ │ │ ├── Number.tsx │ │ │ │ │ ├── README.md │ │ │ │ │ ├── RadioGroup.tsx │ │ │ │ │ ├── Select.tsx │ │ │ │ │ └── Switch.tsx │ │ │ │ └── grid │ │ │ │ │ └── Action.tsx │ │ │ ├── ducks │ │ │ │ ├── AbstractSearchableList.ts │ │ │ │ ├── Confirm.tsx │ │ │ │ ├── DetailPage.ts │ │ │ │ ├── DialogPure.ts │ │ │ │ ├── DynamicDuck.ts │ │ │ │ ├── Fetcher.ts │ │ │ │ ├── Form.ts │ │ │ │ ├── FormDialog.ts │ │ │ │ ├── Grid.ts │ │ │ │ ├── GridPage.ts │ │ │ │ ├── Page.ts │ │ │ │ ├── Route.ts │ │ │ │ ├── SearchableList.ts │ │ │ │ ├── SearchableSelect.ts │ │ │ │ ├── SearchableTableSelectDuck.ts │ │ │ │ └── utils │ │ │ │ │ └── completer │ │ │ │ │ ├── Base.ts │ │ │ │ │ ├── combine.ts │ │ │ │ │ ├── filter.ts │ │ │ │ │ ├── getBufferUpdate.ts │ │ │ │ │ ├── index.ts │ │ │ │ │ └── wrapListUpdate.ts │ │ │ ├── helpers │ │ │ │ ├── cacheable.ts │ │ │ │ ├── index.tsx │ │ │ │ ├── insertCSS.ts │ │ │ │ ├── log.ts │ │ │ │ ├── saga.ts │ │ │ │ ├── showDialog.tsx │ │ │ │ ├── visibility.ts │ │ │ │ └── wait.ts │ │ │ ├── hooks │ │ │ │ ├── index.ts │ │ │ │ └── useControlled.ts │ │ │ ├── qcm-chart │ │ │ │ ├── core │ │ │ │ │ ├── axis │ │ │ │ │ │ └── axis.ts │ │ │ │ │ ├── chart │ │ │ │ │ │ ├── AxisBase.tsx │ │ │ │ │ │ ├── Base.tsx │ │ │ │ │ │ ├── bar │ │ │ │ │ │ │ ├── Bar.tsx │ │ │ │ │ │ │ └── index.ts │ │ │ │ │ │ ├── line │ │ │ │ │ │ │ ├── Line.tsx │ │ │ │ │ │ │ └── index.ts │ │ │ │ │ │ ├── pie │ │ │ │ │ │ │ ├── Pie.tsx │ │ │ │ │ │ │ └── index.ts │ │ │ │ │ │ ├── scatter │ │ │ │ │ │ │ ├── Scatter.tsx │ │ │ │ │ │ │ └── index.ts │ │ │ │ │ │ └── topology │ │ │ │ │ │ │ ├── Topology.tsx │ │ │ │ │ │ │ └── index.ts │ │ │ │ │ ├── lib │ │ │ │ │ │ ├── convert.worker.js │ │ │ │ │ │ ├── helper.ts │ │ │ │ │ │ ├── throttle.ts │ │ │ │ │ │ └── topology.ts │ │ │ │ │ ├── toolbar │ │ │ │ │ │ ├── icon.ts │ │ │ │ │ │ ├── toolbar.ts │ │ │ │ │ │ └── toolbarContent.ts │ │ │ │ │ └── tooltip │ │ │ │ │ │ └── Tooltip.ts │ │ │ │ ├── expose.ts │ │ │ │ ├── index.ts │ │ │ │ ├── theme │ │ │ │ │ └── theme.ts │ │ │ │ └── type │ │ │ │ │ ├── chart.ts │ │ │ │ │ └── topology.ts │ │ │ ├── types │ │ │ │ └── index.ts │ │ │ └── util │ │ │ │ ├── apiRequest.ts │ │ │ │ ├── check.ts │ │ │ │ ├── common.ts │ │ │ │ ├── formatDate.ts │ │ │ │ ├── resolvePath.ts │ │ │ │ ├── router.ts │ │ │ │ └── tips.tsx │ │ ├── config │ │ │ └── index.ts │ │ ├── index.tsx │ │ └── login │ │ │ ├── Login.tsx │ │ │ ├── LoginDuck.ts │ │ │ ├── LoginFormDuck.ts │ │ │ ├── index.ts │ │ │ └── model.ts │ │ ├── tsconfig.json │ │ └── yarn.lock │ └── test │ └── java │ └── com │ └── tencent │ └── tsf │ └── femas │ └── admin │ └── RocksDBJavaTest.java ├── femas-agent ├── femas-agent-core │ ├── pom.xml │ └── src │ │ ├── main │ │ └── java │ │ │ └── com │ │ │ └── tencent │ │ │ └── tsf │ │ │ └── femas │ │ │ └── agent │ │ │ ├── classloader │ │ │ ├── AgentClassLoader.java │ │ │ ├── AgentPackagePathScanner.java │ │ │ ├── CrossClassLoaderCache.java │ │ │ ├── InterceptorClassLoaderCache.java │ │ │ └── JvmMonitorClassloader.java │ │ │ ├── config │ │ │ ├── AgentContext.java │ │ │ ├── AtomicInterceptorPluginsLoader.java │ │ │ ├── Configuration.java │ │ │ ├── DefaultValues.java │ │ │ ├── InterceptPlugin.java │ │ │ ├── InterceptPluginConfig.java │ │ │ ├── MatcherType.java │ │ │ ├── MechaRuntimeConfiguration.java │ │ │ ├── MechaRuntimeModule.java │ │ │ ├── MechaRuntimePluginsSniffer.java │ │ │ ├── MethodType.java │ │ │ └── Verifier.java │ │ │ ├── exception │ │ │ ├── InterceptorInvalidConfigException.java │ │ │ └── InterceptorWrapperException.java │ │ │ ├── interceptor │ │ │ ├── ConstructorInterceptor.java │ │ │ ├── InstanceMethodsAroundInterceptor.java │ │ │ ├── OriginalInterceptor.java │ │ │ ├── StaticMethodsAroundInterceptor.java │ │ │ └── wrapper │ │ │ │ ├── ConstructorInterceptorWrapper.java │ │ │ │ ├── InstanceMethodsInterceptOverrideArgsWrapper.java │ │ │ │ ├── InstanceMethodsInterceptorWrapper.java │ │ │ │ ├── InterceptResult.java │ │ │ │ ├── OriginalInterceptorWrapper.java │ │ │ │ ├── OverrideArgsCallable.java │ │ │ │ ├── StaticMethodsInterceptOverrideArgsWrapper.java │ │ │ │ └── StaticMethodsInterceptorWrapper.java │ │ │ ├── server │ │ │ ├── MonitorServerBoot.java │ │ │ └── ServerBoot.java │ │ │ └── transformer │ │ │ ├── CompositeTransformer.java │ │ │ └── async │ │ │ ├── AgentCallable.java │ │ │ ├── AgentRunnable.java │ │ │ ├── AgentSyncTask.java │ │ │ ├── AgentTimerTask.java │ │ │ ├── ClassInfo.java │ │ │ ├── RunnableWrapper.java │ │ │ └── transformer │ │ │ ├── AbstractTransformer.java │ │ │ ├── ExecutorTransformer.java │ │ │ ├── ForkJoinTransformer.java │ │ │ └── TimerTaskTransformer.java │ │ └── test │ │ └── java │ │ └── com │ │ └── tencent │ │ └── tst │ │ └── femas │ │ └── agent │ │ └── core │ │ └── AgentCLassloaderTest.java ├── femas-agent-example │ ├── femas-agent-example-dubbo │ │ ├── femas-agent-example-apache-dubbo3-api │ │ │ ├── pom.xml │ │ │ └── src │ │ │ │ └── main │ │ │ │ └── java │ │ │ │ └── com │ │ │ │ └── femas │ │ │ │ └── agent │ │ │ │ └── example │ │ │ │ └── apache │ │ │ │ └── dubbo3 │ │ │ │ └── api │ │ │ │ └── AgentDubbo3ProviderApi.java │ │ ├── femas-agent-example-apache-dubbo3-consumer │ │ │ ├── pom.xml │ │ │ └── src │ │ │ │ └── main │ │ │ │ ├── java │ │ │ │ └── com │ │ │ │ │ └── femas │ │ │ │ │ └── agent │ │ │ │ │ └── example │ │ │ │ │ └── apache │ │ │ │ │ └── dubbo3 │ │ │ │ │ └── consumer │ │ │ │ │ └── AgentApacheDubbo3ConsumerExampleApplication.java │ │ │ │ └── resources │ │ │ │ └── application.properties │ │ ├── femas-agent-example-apache-dubbo3-provider │ │ │ ├── pom.xml │ │ │ └── src │ │ │ │ └── main │ │ │ │ ├── java │ │ │ │ └── com │ │ │ │ │ └── femas │ │ │ │ │ └── agent │ │ │ │ │ └── example │ │ │ │ │ └── apache │ │ │ │ │ └── dubbo3 │ │ │ │ │ └── provider │ │ │ │ │ ├── AgentApacheDubbo3ProviderExampleApplication.java │ │ │ │ │ └── impl │ │ │ │ │ └── AgentDubbo3ProviderApiImpl.java │ │ │ │ └── resources │ │ │ │ └── application.properties │ │ └── pom.xml │ ├── femas-agent-example-springcloud-consumer │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ ├── java │ │ │ └── com │ │ │ │ └── tencent │ │ │ │ └── tsf │ │ │ │ └── femas │ │ │ │ └── example │ │ │ │ └── agent │ │ │ │ ├── ConsumerApplication.java │ │ │ │ ├── ConsumerController.java │ │ │ │ ├── TestFilter.java │ │ │ │ └── service │ │ │ │ └── ProviderService.java │ │ │ └── resources │ │ │ ├── bootstrap.yaml │ │ │ └── logback-spring.xml │ ├── femas-agent-example-springcloud-provider │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ ├── java │ │ │ └── com │ │ │ │ └── tencent │ │ │ │ └── tsf │ │ │ │ └── femas │ │ │ │ └── example │ │ │ │ └── agent │ │ │ │ ├── ProviderApplication.java │ │ │ │ ├── ProviderController.java │ │ │ │ └── ProviderService.java │ │ │ └── resources │ │ │ ├── bootstrap.yaml │ │ │ └── logback-spring.xml │ └── pom.xml ├── femas-agent-jts │ ├── LICENSE │ ├── README.txt │ ├── lib │ │ ├── garbagecat_lib │ │ │ └── garbagecat.jar │ │ ├── native_libs │ │ │ ├── linux_aarch64 │ │ │ │ └── libasyncProfiler.so │ │ │ ├── linux_x86_64 │ │ │ │ └── libasyncProfiler.so │ │ │ └── macos_x86_64 │ │ │ │ └── libasyncProfiler.so │ │ ├── one │ │ │ └── profiler │ │ │ │ └── async-profiler │ │ │ │ └── 0.1 │ │ │ │ ├── async-profiler-0.1.jar │ │ │ │ └── async-profiler-0.1.pom │ │ └── org │ │ │ └── jmxtrans │ │ │ └── agent │ │ │ └── jmxtrans-agent │ │ │ └── 1.2.10-SNAPSHOT │ │ │ ├── jmxtrans-agent-1.2.10-SNAPSHOT.jar │ │ │ └── jmxtrans-agent-1.2.10-SNAPSHOT.pom │ ├── pom.xml │ ├── src │ │ └── main │ │ │ ├── java │ │ │ └── com │ │ │ │ └── tencent │ │ │ │ └── femas │ │ │ │ └── tencentcloudjvmmonitor │ │ │ │ ├── jvmmonitoragent │ │ │ │ ├── DeadLockInfo.java │ │ │ │ ├── FlameGraphArguments.java │ │ │ │ ├── FlameGraphQueryMetaInfo.java │ │ │ │ ├── GCLogAnalyzerArguments.java │ │ │ │ ├── HeapDumper.java │ │ │ │ ├── HeapDumperArguments.java │ │ │ │ ├── HotspotCommandProcessor.java │ │ │ │ ├── HotspotGeneralMetrics.java │ │ │ │ ├── HotspotRequestHandler.java │ │ │ │ ├── JTopArguments.java │ │ │ │ ├── JTopInfoEntry.java │ │ │ │ ├── JmapInfo.java │ │ │ │ ├── JmapInfoList.java │ │ │ │ ├── JvmMonitorAgentEntrance.java │ │ │ │ ├── JvmMonitorClassloader.java │ │ │ │ ├── KillPortServer.java │ │ │ │ ├── MethodDistData.java │ │ │ │ ├── MethodProfileMetaInfo.java │ │ │ │ ├── NativeStatData.java │ │ │ │ ├── PerThreadDrawData.java │ │ │ │ ├── TencentJvmMonitorAgent.java │ │ │ │ ├── ThreadGroupData.java │ │ │ │ ├── ThreadInfoArguments.java │ │ │ │ ├── ThreadInfoDrawData.java │ │ │ │ ├── ThreadInfoEntry.java │ │ │ │ ├── ThreadInfoEntryAndDrawData.java │ │ │ │ ├── ThreadInfoList.java │ │ │ │ ├── ThreadStateData.java │ │ │ │ ├── ThreadTraceGroupData.java │ │ │ │ └── TimePair.java │ │ │ │ └── utils │ │ │ │ ├── Command.java │ │ │ │ ├── DaemonThreadFactory.java │ │ │ │ ├── Decompressor.java │ │ │ │ ├── FlameGraphUtil.java │ │ │ │ ├── HttpSocketServer.java │ │ │ │ ├── JvmMonitorDummyClass.java │ │ │ │ ├── JvmMonitorHttpRequestHandler.java │ │ │ │ ├── JvmMonitorUtils.java │ │ │ │ ├── Logger.java │ │ │ │ ├── OSChecker.java │ │ │ │ ├── ResultInfo.java │ │ │ │ ├── ResultPackage.java │ │ │ │ ├── RpcServer.java │ │ │ │ ├── RpcSocketServer.java │ │ │ │ ├── TaskInfo.java │ │ │ │ ├── TaskStatus.java │ │ │ │ └── TaskStatusInfo.java │ │ │ └── resources │ │ │ ├── cmdline_config.properties │ │ │ ├── tsf_monitor_config.xml │ │ │ └── tsf_monitor_config_bk.xml │ └── test │ │ └── run.sh ├── femas-agent-plugin │ ├── femas-apache-dubbo3-plugin │ │ ├── femas-apache-dubbo3-nacos-plugin │ │ │ ├── pom.xml │ │ │ └── src │ │ │ │ └── main │ │ │ │ ├── java │ │ │ │ └── com │ │ │ │ │ └── tencent │ │ │ │ │ └── tsf │ │ │ │ │ └── femas │ │ │ │ │ └── agent │ │ │ │ │ └── apache │ │ │ │ │ └── dubbo │ │ │ │ │ └── nacos │ │ │ │ │ └── instrument │ │ │ │ │ ├── AgentDubboRouterChainInterceptor.java │ │ │ │ │ ├── FilterChainBuilderInterceptor.java │ │ │ │ │ ├── NacosNameSpaceInitUtilsInterceptor.java │ │ │ │ │ ├── NacosRegistryInterceptor.java │ │ │ │ │ ├── NacosServiceDisocveryInterceptor.java │ │ │ │ │ ├── filter │ │ │ │ │ ├── ApacheDubboConsumerAgentFilter.java │ │ │ │ │ └── ApacheDubboProviderAgentFilter.java │ │ │ │ │ └── router │ │ │ │ │ ├── ApacheDubboAgentRouter.java │ │ │ │ │ └── ApacheDubboAgentRouterFactory.java │ │ │ │ └── resources │ │ │ │ ├── META-INF │ │ │ │ └── services │ │ │ │ │ ├── org.apache.dubbo.rpc.Filter │ │ │ │ │ └── org.apache.dubbo.rpc.cluster.RouterFactory │ │ │ │ └── plugin.yaml │ │ ├── femas-apache-dubbo3-plugin-common │ │ │ ├── pom.xml │ │ │ └── src │ │ │ │ └── main │ │ │ │ └── java │ │ │ │ └── com │ │ │ │ └── tencent │ │ │ │ └── tsf │ │ │ │ └── femas │ │ │ │ └── agent │ │ │ │ └── dubbo │ │ │ │ └── common │ │ │ │ └── util │ │ │ │ ├── ApachDubboRequestMetaUtils.java │ │ │ │ └── CommonUtils.java │ │ └── pom.xml │ ├── femas-core-dependency-bom-plugin │ │ └── pom.xml │ ├── femas-dubbo-2.6.x-plugin │ │ └── pom.xml │ ├── femas-springcloud-2020-plugin │ │ └── pom.xml │ ├── femas-springcloud-greenwich-plugin │ │ ├── femas-springcloud-greenwich-consul-plugin │ │ │ ├── pom.xml │ │ │ └── src │ │ │ │ └── main │ │ │ │ ├── java │ │ │ │ └── com │ │ │ │ │ └── tencent │ │ │ │ │ └── tsf │ │ │ │ │ └── femas │ │ │ │ │ └── agent │ │ │ │ │ └── consul │ │ │ │ │ └── instrument │ │ │ │ │ └── ConsulServiceRegistryInterceptor.java │ │ │ │ └── resources │ │ │ │ └── plugin.yaml │ │ ├── femas-springcloud-greenwich-eureka-plugin │ │ │ ├── pom.xml │ │ │ └── src │ │ │ │ └── main │ │ │ │ ├── java │ │ │ │ └── com │ │ │ │ │ └── tencent │ │ │ │ │ └── tsf │ │ │ │ │ └── femas │ │ │ │ │ └── agent │ │ │ │ │ └── eureka │ │ │ │ │ └── instrument │ │ │ │ │ └── EurekaServiceRegistryInterceptor.java │ │ │ │ └── resources │ │ │ │ └── plugin.yaml │ │ ├── femas-springcloud-greenwich-feign-plugin │ │ │ ├── pom.xml │ │ │ └── src │ │ │ │ └── main │ │ │ │ ├── java │ │ │ │ └── com │ │ │ │ │ └── tencent │ │ │ │ │ └── tsf │ │ │ │ │ └── femas │ │ │ │ │ └── agent │ │ │ │ │ └── feign │ │ │ │ │ └── instrument │ │ │ │ │ ├── FeignRequestHeaderInterceptor.java │ │ │ │ │ ├── FeignRequestInterceptor.java │ │ │ │ │ ├── LoadBalancerFeignClientOriginalInterceptor.java │ │ │ │ │ └── RequestContextFilterOriginalInterceptor.java │ │ │ │ └── resources │ │ │ │ └── plugin.yaml │ │ ├── femas-springcloud-greenwich-loadbalance-plugin │ │ │ ├── pom.xml │ │ │ └── src │ │ │ │ └── main │ │ │ │ ├── java │ │ │ │ └── com │ │ │ │ │ └── tencent │ │ │ │ │ └── tsf │ │ │ │ │ └── femas │ │ │ │ │ └── agent │ │ │ │ │ └── loadbalance │ │ │ │ │ └── instrument │ │ │ │ │ ├── BaseLoadBalancerInterceptor.java │ │ │ │ │ ├── FemasRibbonRouteLoadbalancer.java │ │ │ │ │ ├── FemasServiceFilterLoadBalancer.java │ │ │ │ │ ├── RibbonRouteLoadbalancerFactory.java │ │ │ │ │ └── ZoneAwareLoadBalancerInterceptor.java │ │ │ │ └── resources │ │ │ │ └── plugin.yaml │ │ ├── femas-springcloud-greenwich-nacos-plugin │ │ │ ├── pom.xml │ │ │ └── src │ │ │ │ └── main │ │ │ │ ├── java │ │ │ │ └── com │ │ │ │ │ └── tencent │ │ │ │ │ └── tsf │ │ │ │ │ └── femas │ │ │ │ │ └── agent │ │ │ │ │ └── nacos │ │ │ │ │ └── instrument │ │ │ │ │ ├── NacosNameSpaceInitUtilsInterceptor.java │ │ │ │ │ └── NacosServiceRegistryInterceptor.java │ │ │ │ └── resources │ │ │ │ └── plugin.yaml │ │ ├── femas-springcloud-plugin-common │ │ │ ├── pom.xml │ │ │ └── src │ │ │ │ └── main │ │ │ │ └── java │ │ │ │ └── com │ │ │ │ └── tencent │ │ │ │ └── tsf │ │ │ │ └── femas │ │ │ │ └── agent │ │ │ │ └── common │ │ │ │ ├── BaseDiscoveryServerConverter.java │ │ │ │ ├── HttpServletHeaderUtils.java │ │ │ │ └── discovery │ │ │ │ ├── ConsulServerConverter.java │ │ │ │ ├── DiscoveryServerConverter.java │ │ │ │ ├── EurekaServerConverter.java │ │ │ │ ├── FemasConsulServerList.java │ │ │ │ └── NacosServerConverter.java │ │ └── pom.xml │ └── pom.xml ├── femas-agent-starter │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── com │ │ │ └── tencent │ │ │ └── tsf │ │ │ └── femas │ │ │ └── agent │ │ │ └── FemasAgent.java │ │ └── resources │ │ └── femas.yaml ├── femas-agent-tools │ ├── pom.xml │ └── src │ │ ├── main │ │ └── java │ │ │ └── com │ │ │ └── tencent │ │ │ └── tsf │ │ │ └── femas │ │ │ └── agent │ │ │ └── tools │ │ │ ├── AgentExecutor.java │ │ │ ├── AgentLogger.java │ │ │ ├── CacheProxy.java │ │ │ ├── DateRollingLogger.java │ │ │ ├── FemasRuntimeException.java │ │ │ ├── JvmRuntimeInfo.java │ │ │ ├── Logger.java │ │ │ └── ReflectionUtils.java │ │ └── test │ │ └── java │ │ └── com │ │ └── tencent │ │ └── tsf │ │ └── femas │ │ └── agent │ │ └── tools │ │ └── AgentLoggerTets.java └── pom.xml ├── femas-api ├── pom.xml └── src │ ├── main │ └── java │ │ └── com │ │ └── tencent │ │ └── tsf │ │ └── femas │ │ └── api │ │ ├── CommonExtensionLayer.java │ │ ├── ExtensionManager.java │ │ └── IExtensionLayer.java │ └── test │ └── java │ └── com │ └── tencent │ └── tsf │ └── femas │ └── api │ └── CommonExtensionLayerTest.java ├── femas-benchmark ├── pom.xml └── src │ └── test │ └── java │ └── com │ └── tencent │ └── tsf │ └── femas │ └── benchmark │ └── ClientBenchMark.java ├── femas-common ├── pom.xml └── src │ ├── main │ └── java │ │ └── com │ │ └── tencent │ │ └── tsf │ │ └── femas │ │ └── common │ │ ├── annotation │ │ ├── AdaptorComponent.java │ │ ├── SPI.java │ │ ├── ThreadSafe.java │ │ └── VisibleForTesting.java │ │ ├── base │ │ ├── Destroyable.java │ │ ├── Initializable.java │ │ ├── ReferenceCounted.java │ │ └── Sortable.java │ │ ├── callback │ │ ├── FemasCallback.java │ │ └── SendableResponseCallback.java │ │ ├── codec │ │ └── EscapeNonAsciiWriter.java │ │ ├── constant │ │ └── FemasConstant.java │ │ ├── context │ │ ├── AgentConfig.java │ │ ├── Context.java │ │ ├── ContextConstant.java │ │ ├── RpcContext.java │ │ ├── RpcInfo.java │ │ ├── RpcInfoEnum.java │ │ ├── ThreadLocalContext.java │ │ ├── TracingContext.java │ │ └── factory │ │ │ └── ContextFactory.java │ │ ├── entity │ │ ├── Endpoint.java │ │ ├── EndpointStatus.java │ │ ├── ErrorStatus.java │ │ ├── Request.java │ │ ├── RequestBase.java │ │ ├── Response.java │ │ ├── Service.java │ │ └── ServiceInstance.java │ │ ├── exception │ │ ├── ErrorCode.java │ │ ├── FemasRegisterDescribeException.java │ │ └── FemasRuntimeException.java │ │ ├── header │ │ └── AbstractRequestMetaUtils.java │ │ ├── httpclient │ │ ├── ApacheHttpClientHolder.java │ │ ├── FemasApacheClientHttpResponse.java │ │ ├── HttpClientRequest.java │ │ ├── HttpClientResponse.java │ │ ├── HttpLongPollingConnectorManager.java │ │ ├── HttpStatus.java │ │ ├── client │ │ │ ├── AbstractHttpClient.java │ │ │ ├── FemasApacheHttpRestClient.java │ │ │ ├── FemasHttpClient.java │ │ │ ├── HttpClientConfig.java │ │ │ ├── HttpRequestEntity.java │ │ │ └── LongPullingApacheHttpRestClient.java │ │ ├── factory │ │ │ ├── ApacheDefaultHttpClientFactory.java │ │ │ ├── ApacheLongPollingHttpClientFactory.java │ │ │ └── HttpClientFactory.java │ │ └── wrapper │ │ │ ├── Body2StringResultWrapper.java │ │ │ └── ResultWrapper.java │ │ ├── invoke │ │ └── Invoker.java │ │ ├── kubernetes │ │ ├── EndpointSubsetNS.java │ │ ├── KubernetesClientProperties.java │ │ ├── KubernetesClientServicesFunction.java │ │ ├── KubernetesDiscoveryProperties.java │ │ ├── KubernetesProperties.java │ │ ├── KubernetesServiceInstance.java │ │ └── ServicePortSecureResolver.java │ │ ├── monitor │ │ └── Endpoint.java │ │ ├── rule │ │ ├── AbstractRuleManager.java │ │ └── Rule.java │ │ ├── serialize │ │ ├── JSONSerializer.java │ │ └── Serializer.java │ │ ├── spi │ │ ├── SpiExtensionClass.java │ │ └── SpiService.java │ │ ├── statistic │ │ ├── AbstractAggregation.java │ │ ├── FixedSizeSlidingWindowMetrics.java │ │ ├── Measurement.java │ │ ├── Metrics.java │ │ ├── PartialAggregation.java │ │ ├── SecondsSlidingTimeWindowMetrics.java │ │ ├── SlidingTimeWindowMetrics.java │ │ ├── Snapshot.java │ │ ├── SnapshotImpl.java │ │ └── TotalAggregation.java │ │ ├── struct │ │ └── ScheduledService.java │ │ ├── tag │ │ ├── Tag.java │ │ ├── TagExpression.java │ │ ├── TagRule.java │ │ ├── TagRuleGroup.java │ │ ├── constant │ │ │ └── TagConstant.java │ │ ├── engine │ │ │ └── TagEngine.java │ │ └── exception │ │ │ └── TagEngineException.java │ │ ├── util │ │ ├── AddressUtils.java │ │ ├── BytesUtil.java │ │ ├── ClassLoaderUtils.java │ │ ├── ClassTypeUtils.java │ │ ├── ClassUtils.java │ │ ├── CollectionUtil.java │ │ ├── CommonUtils.java │ │ ├── ConfigUtils.java │ │ ├── ErrorStackTraceUtil.java │ │ ├── FemasGzipUtil.java │ │ ├── FileUtils.java │ │ ├── GsonUtil.java │ │ ├── HttpElement.java │ │ ├── HttpHeaderKeys.java │ │ ├── HttpResult.java │ │ ├── IOTinyUtils.java │ │ ├── IOUtils.java │ │ ├── IPUtils.java │ │ ├── MD5Util.java │ │ ├── NamedThreadFactory.java │ │ ├── PositiveAtomicCounter.java │ │ ├── PropertiesUtil.java │ │ ├── ReflectCache.java │ │ ├── ReflectUtils.java │ │ ├── Result.java │ │ ├── StringUtils.java │ │ ├── TimeUtil.java │ │ ├── Utils.java │ │ ├── backport │ │ │ ├── LongAdder.java │ │ │ └── Striped64.java │ │ ├── id │ │ │ ├── GeneratorEnum.java │ │ │ ├── HostNameKeyGenerator.java │ │ │ ├── IPKeyGenerator.java │ │ │ ├── IPSectionKeyGenerator.java │ │ │ ├── KeyGenerator.java │ │ │ ├── KeyGeneratorFactory.java │ │ │ ├── SnowflakeIdWorker.java │ │ │ └── UIdGenerator.java │ │ └── thread │ │ │ ├── FemasCallable.java │ │ │ ├── FemasExecutors.java │ │ │ ├── FemasRunnale.java │ │ │ ├── FemasScheduledThreadPoolExecutor.java │ │ │ └── FemasThreadPoolExecutor.java │ │ ├── version │ │ └── Version.java │ │ └── yaml │ │ ├── AbstractResource.java │ │ ├── ByteArrayResource.java │ │ ├── Resource.java │ │ ├── YamlMapFactoryBean.java │ │ ├── YamlProcessor.java │ │ └── YamlPropertiesFactoryBean.java │ └── test │ └── java │ └── com │ └── tencent │ └── tsf │ └── femas │ └── common │ ├── context │ └── AgentConfigTest.java │ ├── entity │ └── ErrorStatusTest.java │ ├── monitor │ └── EndpointTest.java │ └── statistic │ ├── SecondsSlidingTimeWindowMetricsTest.java │ ├── SlidingTimeWindowMetricsTest.java │ └── SlidingWindowMetricsBenchmark.java ├── femas-config-impl ├── femas-config-consul │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── com │ │ │ │ └── tencent │ │ │ │ └── tsf │ │ │ │ └── femas │ │ │ │ └── config │ │ │ │ └── impl │ │ │ │ └── consul │ │ │ │ ├── ConsulConfig.java │ │ │ │ ├── ConsulConfigFactory.java │ │ │ │ └── ConsulConstants.java │ │ └── resources │ │ │ └── META-INF │ │ │ └── services │ │ │ └── com.tencent.tsf.femas.config.ConfigFactory │ │ └── test │ │ └── java │ │ └── com │ │ └── tencent │ │ └── tsf │ │ └── femas │ │ └── config │ │ └── impl │ │ └── consul │ │ └── ConsulConfigTest.java ├── femas-config-nacos │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── com │ │ │ │ └── tencent │ │ │ │ └── tsf │ │ │ │ └── femas │ │ │ │ └── config │ │ │ │ └── impl │ │ │ │ └── nacos │ │ │ │ ├── FemasNacosConfig.java │ │ │ │ ├── FemasNacosConfigFactory.java │ │ │ │ ├── FemasNacosConfigManager.java │ │ │ │ └── SpringApplicationContextUtil.java │ │ └── resources │ │ │ └── META-INF │ │ │ └── services │ │ │ ├── com.tencent.tsf.femas.config.ConfigFactory │ │ │ └── com.tencent.tsf.femas.config.FemasConfigManager │ │ └── test │ │ └── java │ │ └── com │ │ └── tencent │ │ └── tsf │ │ └── femas │ │ └── config │ │ └── nacos │ │ └── NacosConfigTest.java ├── femas-config-paas │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── com │ │ │ │ └── tencent │ │ │ │ └── tsf │ │ │ │ └── femas │ │ │ │ └── config │ │ │ │ └── impl │ │ │ │ └── paas │ │ │ │ ├── GetValue.java │ │ │ │ ├── PaasConfig.java │ │ │ │ ├── PaasConfigFactory.java │ │ │ │ └── PaasConstants.java │ │ └── resources │ │ │ └── META-INF │ │ │ └── services │ │ │ └── com.tencent.tsf.femas.config.ConfigFactory │ │ └── test │ │ └── java │ │ └── com │ │ └── tencent │ │ └── tsf │ │ └── femas │ │ └── config │ │ └── impl │ │ └── paas │ │ └── package-info.java └── pom.xml ├── femas-config ├── pom.xml └── src │ ├── main │ ├── java │ │ └── com │ │ │ └── tencent │ │ │ └── tsf │ │ │ └── femas │ │ │ └── config │ │ │ ├── AbstractConfigHttpClientManager.java │ │ │ ├── AbstractConfigHttpClientManagerFactory.java │ │ │ ├── Config.java │ │ │ ├── ConfigChangeListener.java │ │ │ ├── ConfigFactory.java │ │ │ ├── ConfigName.java │ │ │ ├── ConfigService.java │ │ │ ├── FemasConfig.java │ │ │ ├── FemasConfigManager.java │ │ │ ├── FemasConfigManagerFactory.java │ │ │ ├── config │ │ │ ├── FinalConfig.java │ │ │ └── type │ │ │ │ ├── DefaultConfig.java │ │ │ │ ├── EnvConfig.java │ │ │ │ └── LocalConfig.java │ │ │ ├── enums │ │ │ ├── FemasConfigTypeEnum.java │ │ │ └── PropertyChangeType.java │ │ │ ├── exception │ │ │ └── FemasConfigException.java │ │ │ ├── grpc │ │ │ └── paas │ │ │ │ ├── GrpcHepler.java │ │ │ │ ├── InitNamespaceRequest.java │ │ │ │ ├── InitNamespaceRequestOrBuilder.java │ │ │ │ ├── LongPollingServer.java │ │ │ │ ├── PaasPollingGrpc.java │ │ │ │ ├── PollingResult.java │ │ │ │ ├── PollingResultOrBuilder.java │ │ │ │ ├── ReportEventRequest.java │ │ │ │ ├── ReportEventRequestOrBuilder.java │ │ │ │ ├── ServiceApiRequest.java │ │ │ │ ├── ServiceApiRequestOrBuilder.java │ │ │ │ ├── SimpleParam.java │ │ │ │ └── SimpleParamOrBuilder.java │ │ │ ├── internals │ │ │ ├── AbstractConfig.java │ │ │ └── AbstractStringConfig.java │ │ │ ├── model │ │ │ └── ConfigChangeEvent.java │ │ │ └── util │ │ │ ├── function │ │ │ └── Functions.java │ │ │ └── parser │ │ │ ├── ParserException.java │ │ │ └── Parsers.java │ └── resources │ │ ├── femas-default.conf │ │ └── proto │ │ └── PaasPolling.proto │ └── test │ └── java │ └── com │ └── tencent │ └── tsf │ └── femas │ └── config │ └── ConfigServiceTest.java ├── femas-dependencies-bom └── pom.xml ├── femas-example ├── feams-example-springcloud-hoxton │ ├── feams-example-springcloud-hoxton-consumer │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ ├── java │ │ │ └── com │ │ │ │ └── tencent │ │ │ │ └── tsf │ │ │ │ └── femas │ │ │ │ └── example │ │ │ │ └── springcloud │ │ │ │ └── hoxton │ │ │ │ ├── ConsumerApplication.java │ │ │ │ ├── ConsumerController.java │ │ │ │ ├── TestFilter.java │ │ │ │ └── proxy │ │ │ │ └── service │ │ │ │ └── ProviderService.java │ │ │ └── resources │ │ │ ├── bootstrap.yaml │ │ │ ├── femas.yaml │ │ │ ├── logback-spring.xml │ │ │ └── nacos │ │ │ ├── bootstrap.yaml │ │ │ └── pom.xml │ ├── feams-example-springcloud-hoxton-provider │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ ├── java │ │ │ └── com │ │ │ │ └── tencent │ │ │ │ └── tsf │ │ │ │ └── femas │ │ │ │ └── example │ │ │ │ └── springcloud │ │ │ │ └── hoxton │ │ │ │ ├── ProviderApplication.java │ │ │ │ ├── ProviderController.java │ │ │ │ └── ProviderService.java │ │ │ └── resources │ │ │ ├── bootstrap.yaml │ │ │ ├── femas.yaml │ │ │ ├── logback-spring.xml │ │ │ └── nacos │ │ │ ├── bootstrap.yaml │ │ │ └── pom.xml │ └── pom.xml ├── femas-example-alibaba-dubbo-consumer │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── com │ │ │ └── tencent │ │ │ └── tsf │ │ │ └── femas │ │ │ └── example │ │ │ └── alibaba │ │ │ └── dubbo │ │ │ ├── AliDubboConsumer.java │ │ │ └── DemoService.java │ │ └── resources │ │ ├── application.yaml │ │ ├── femas.yaml │ │ └── spring │ │ └── dubbo-consumer.xml ├── femas-example-alibaba-dubbo-provider │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── com │ │ │ └── tencent │ │ │ └── tsf │ │ │ └── femas │ │ │ └── example │ │ │ └── alibaba │ │ │ └── dubbo │ │ │ ├── AliDubboProvider.java │ │ │ ├── DemoService.java │ │ │ └── DemoServiceImpl.java │ │ └── resources │ │ ├── application.yaml │ │ ├── femas.yaml │ │ └── spring │ │ └── dubbo-provider.xml ├── femas-example-apache-dubbo3 │ ├── femas-example-apache-dubbo3-api │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ └── java │ │ │ └── com │ │ │ └── tencent │ │ │ └── tsf │ │ │ └── femas │ │ │ └── example │ │ │ └── apache │ │ │ └── dubbo │ │ │ └── api │ │ │ └── ApacheDubboExampleService.java │ ├── femas-example-apache-dubbo3-consumer │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ ├── java │ │ │ └── com │ │ │ │ └── tencent │ │ │ │ └── tsf │ │ │ │ └── femas │ │ │ │ └── example │ │ │ │ └── apache │ │ │ │ └── dubbo │ │ │ │ └── ApacheDubboConsumerApp.java │ │ │ └── resources │ │ │ ├── application.properties │ │ │ └── femas.yaml │ ├── femas-example-apache-dubbo3-provider │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ ├── java │ │ │ └── com │ │ │ │ └── tencent │ │ │ │ └── tsf │ │ │ │ └── femas │ │ │ │ └── example │ │ │ │ └── apache │ │ │ │ └── dubbo │ │ │ │ ├── ApacheDubboProviderApp.java │ │ │ │ ├── ApacheDubboV2ProviderApp.java │ │ │ │ └── provider │ │ │ │ ├── ApacheDubboProvider.java │ │ │ │ └── ApacheDubboV2Provider.java │ │ │ └── resources │ │ │ ├── application-v1.properties │ │ │ ├── application-v2.properties │ │ │ └── femas.yaml │ └── pom.xml ├── femas-example-springcloud-2020-consumer │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── com │ │ │ └── femas │ │ │ └── example │ │ │ └── springcloud2020 │ │ │ └── consumer │ │ │ ├── ConsumerApplication.java │ │ │ ├── ConsumerController.java │ │ │ ├── TestFilter.java │ │ │ └── proxy │ │ │ └── service │ │ │ └── ProviderService.java │ │ └── resources │ │ ├── bootstrap.yaml │ │ ├── consul │ │ ├── bootstrap.yaml │ │ └── pom.xml │ │ ├── femas.yaml │ │ └── nacos │ │ ├── bootstrap.yaml │ │ └── pom.xml ├── femas-example-springcloud-2020-provider │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── com │ │ │ └── femas │ │ │ └── example │ │ │ └── springcloud2020 │ │ │ └── provider │ │ │ ├── ProviderApplication.java │ │ │ ├── ProviderController.java │ │ │ └── ProviderService.java │ │ └── resources │ │ ├── bootstrap.yaml │ │ ├── consul │ │ ├── bootstrap.yaml │ │ └── pom.xml │ │ ├── femas.yaml │ │ └── nacos │ │ ├── bootstrap.yaml │ │ └── pom.xml ├── femas-example-springcloud-discovery │ ├── README.md │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── com │ │ │ └── tencent │ │ │ └── tsf │ │ │ └── femas │ │ │ └── examples │ │ │ └── FemasExampleSpringcloudDiscoveryApplication.java │ │ └── resources │ │ └── application.properties ├── femas-example-springcloud-greenwich-consumer │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── com │ │ │ └── tencent │ │ │ └── tsf │ │ │ └── femas │ │ │ └── example │ │ │ └── springcloud │ │ │ ├── ConsumerApplication.java │ │ │ ├── ConsumerController.java │ │ │ ├── TestFilter.java │ │ │ └── proxy │ │ │ └── service │ │ │ └── ProviderService.java │ │ └── resources │ │ ├── bootstrap.yaml │ │ ├── consul │ │ ├── bootstrap.yaml │ │ └── pom.xml │ │ ├── femas.yaml │ │ ├── logback-spring.xml │ │ └── nacos │ │ ├── bootstrap.yaml │ │ └── pom.xml ├── femas-example-springcloud-greenwich-gateway │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── com │ │ │ └── tencent │ │ │ └── tsf │ │ │ └── femas │ │ │ └── example │ │ │ └── gateway │ │ │ └── springcloud │ │ │ ├── GatewayApplication.java │ │ │ └── filter │ │ │ └── TestFilter.java │ │ └── resources │ │ ├── bootstrap.yaml │ │ ├── femas.yaml │ │ └── logback-spring.xml ├── femas-example-springcloud-greenwich-provider │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── com │ │ │ └── tencent │ │ │ └── tsf │ │ │ └── femas │ │ │ └── example │ │ │ └── springcloud │ │ │ ├── ProviderApplication.java │ │ │ ├── ProviderController.java │ │ │ └── ProviderService.java │ │ └── resources │ │ ├── bootstrap.yaml │ │ ├── consul │ │ ├── bootstrap.yaml │ │ └── pom.xml │ │ ├── eureka │ │ ├── bootstrap.yaml │ │ └── pom.xml │ │ ├── femas.yaml │ │ ├── logback-spring.xml │ │ └── nacos │ │ ├── bootstrap.yaml │ │ └── pom.xml ├── femas-example-springcloud-greenwich-zuul │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── com │ │ │ └── tencent │ │ │ └── tsf │ │ │ └── femas │ │ │ └── example │ │ │ └── gateway │ │ │ └── zuul │ │ │ ├── ZuulApplication.java │ │ │ └── filter │ │ │ └── TestFilter.java │ │ └── resources │ │ ├── bootstrap.yaml │ │ ├── femas.yaml │ │ └── logback-spring.xml ├── femas-gray-example-springcloud-consumer │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── com │ │ │ │ └── tencent │ │ │ │ └── tsf │ │ │ │ └── femas │ │ │ │ └── gray │ │ │ │ └── example │ │ │ │ └── springcloud │ │ │ │ ├── FemasGrayConsumerServiceC1.java │ │ │ │ ├── FemasGrayConsumerServiceC2.java │ │ │ │ ├── feign │ │ │ │ └── FemasFeignClient.java │ │ │ │ └── rest │ │ │ │ └── FemaGrayConsumerController.java │ │ └── resources │ │ │ ├── bootstrap-c1.yaml │ │ │ ├── bootstrap-c2.yaml │ │ │ └── femas.yaml │ │ └── test │ │ └── java │ │ └── com │ │ └── tencent │ │ └── tsf │ │ └── femas │ │ └── gray │ │ └── example │ │ └── springcloud │ │ ├── ArrayWeightRandom.java │ │ ├── ArrayWeightRandomTest.java │ │ ├── FemasGrayRunTests.java │ │ └── MapWeightRandomLoadBalanceTest.java ├── femas-gray-example-springcloud-provider │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── com │ │ │ └── tencent │ │ │ └── tsf │ │ │ └── femas │ │ │ └── gray │ │ │ └── example │ │ │ └── springcloud │ │ │ ├── FemasGrayPrviderServiceP1.java │ │ │ ├── FemasGrayPrviderServiceP2.java │ │ │ └── rest │ │ │ └── GrayExampleController.java │ │ └── resources │ │ ├── bootstrap-p1.yaml │ │ ├── bootstrap-p2.yaml │ │ └── femas.yaml └── pom.xml ├── femas-extensions ├── femas-extension-dubbo │ ├── femas-extension-alibaba-dubbo │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ ├── java │ │ │ └── com │ │ │ │ ├── alibaba │ │ │ │ └── dubbo │ │ │ │ │ └── registry │ │ │ │ │ └── support │ │ │ │ │ └── FemasServiceNotifyListener.java │ │ │ │ └── tencent │ │ │ │ └── tsf │ │ │ │ └── femas │ │ │ │ └── extensions │ │ │ │ └── dubbo │ │ │ │ ├── filter │ │ │ │ ├── FemasConsumerFilter.java │ │ │ │ └── FemasProviderFilter.java │ │ │ │ ├── registry │ │ │ │ ├── FemasDubboRegistry.java │ │ │ │ └── FemasDubboRegistryFactory.java │ │ │ │ ├── router │ │ │ │ ├── FemasRouter.java │ │ │ │ └── FemasRouterFactory.java │ │ │ │ └── util │ │ │ │ ├── CommonUtils.java │ │ │ │ └── DubboAttachmentUtils.java │ │ │ └── resources │ │ │ └── META-INF │ │ │ └── services │ │ │ ├── com.alibaba.dubbo.registry.RegistryFactory │ │ │ ├── com.alibaba.dubbo.rpc.Filter │ │ │ └── com.alibaba.dubbo.rpc.cluster.RouterFactory │ ├── femas-extension-apache-dubbo3 │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ ├── java │ │ │ ├── com │ │ │ │ └── tencent │ │ │ │ │ └── tsf │ │ │ │ │ └── femas │ │ │ │ │ └── extensions │ │ │ │ │ └── dubbo │ │ │ │ │ ├── discovery │ │ │ │ │ ├── FemasServiceDiscovery.java │ │ │ │ │ └── FemasServiceDiscoveryFactory.java │ │ │ │ │ ├── filter │ │ │ │ │ ├── FemasConsumerFilter.java │ │ │ │ │ └── FemasProviderFilter.java │ │ │ │ │ ├── registry │ │ │ │ │ ├── FemasApacheDubboRegistry.java │ │ │ │ │ └── FemasApacheDubboRegistryFactory.java │ │ │ │ │ ├── router │ │ │ │ │ ├── FemasApacheDubboRouter.java │ │ │ │ │ └── FemasApacheDubboRouterFactory.java │ │ │ │ │ └── util │ │ │ │ │ ├── ApacheDubboAttachmentUtils.java │ │ │ │ │ └── CommonUtils.java │ │ │ └── org │ │ │ │ └── apache │ │ │ │ └── dubbo │ │ │ │ └── registry │ │ │ │ └── support │ │ │ │ └── FemasServiceNotifyListener.java │ │ │ └── resources │ │ │ └── META-INF │ │ │ └── services │ │ │ ├── org.apache.dubbo.registry.RegistryFactory │ │ │ ├── org.apache.dubbo.registry.client.ServiceDiscoveryFactory │ │ │ ├── org.apache.dubbo.rpc.Filter │ │ │ └── org.apache.dubbo.rpc.cluster.RouterFactory │ └── pom.xml ├── femas-extension-springcloud │ ├── femas-extension-springcloud-2020.0-ilford │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ ├── java │ │ │ └── com │ │ │ │ └── tencent │ │ │ │ └── tsf │ │ │ │ └── femas │ │ │ │ └── extension │ │ │ │ └── springcloud │ │ │ │ └── ilford │ │ │ │ ├── common │ │ │ │ └── config │ │ │ │ │ └── FemasContextConfiguration.java │ │ │ │ └── discovery │ │ │ │ ├── FemasDiscoveryAutoConfiguration.java │ │ │ │ ├── FemasFeignInterceptorAutoConfiguration.java │ │ │ │ ├── consul │ │ │ │ └── ConsulServerConverter.java │ │ │ │ ├── kubernetes │ │ │ │ ├── FemasKubernetesDiscoveryClient.java │ │ │ │ └── KubernetesServerConverter.java │ │ │ │ ├── loadbalancer │ │ │ │ ├── DiscoveryServerConverter.java │ │ │ │ ├── FemasRouteLoadBalancer.java │ │ │ │ ├── FemasServiceFilterLoadBalancer.java │ │ │ │ ├── FemasServiceFilterRouteLoadBalancer.java │ │ │ │ └── config │ │ │ │ │ ├── FemasLoadBalancerAutoConfiguration.java │ │ │ │ │ └── FemasLoadBalancerClientConfiguration.java │ │ │ │ ├── nacos │ │ │ │ └── NacosServerConverter.java │ │ │ │ └── polaris │ │ │ │ └── PolarisServerConverter.java │ │ │ └── resources │ │ │ └── META-INF │ │ │ └── spring.factories │ ├── femas-extension-springcloud-common │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ └── java │ │ │ └── com │ │ │ └── tencent │ │ │ └── tsf │ │ │ └── femas │ │ │ └── extension │ │ │ └── springcloud │ │ │ └── common │ │ │ ├── discovery │ │ │ ├── FemasDiscoveryCommonAutoConfiguration.java │ │ │ ├── consul │ │ │ │ └── FemasConsulRegistrationCustomizer.java │ │ │ ├── eureka │ │ │ │ └── FemasEurekaRegistrationCustomizer.java │ │ │ ├── loadbalancer │ │ │ │ └── BaseDiscoveryServerConverter.java │ │ │ └── nacos │ │ │ │ ├── FemasNacosRegistrationCustomizer.java │ │ │ │ └── NacosEnv.java │ │ │ └── instrumentation │ │ │ ├── config │ │ │ └── FemasGovernanceAutoConfiguration.java │ │ │ ├── feign │ │ │ ├── FeignHeaderInterceptor.java │ │ │ ├── FeignHeaderUtils.java │ │ │ └── FemasFeignClientWrapper.java │ │ │ ├── filter │ │ │ ├── FemasGovernanceFilter.java │ │ │ └── HttpServletHeaderUtils.java │ │ │ ├── metrics │ │ │ ├── PrometheusConfig.java │ │ │ └── PrometheusController.java │ │ │ ├── restapi │ │ │ ├── FemasApiMetadataGrapher.java │ │ │ ├── FemasSwaggerApplicationListener.java │ │ │ ├── FemasSwaggerAutoConfiguration.java │ │ │ ├── PackageScanFilter.java │ │ │ └── SwaggerContext.java │ │ │ └── resttemplate │ │ │ ├── FemasRestTemplateInterceptor.java │ │ │ └── RestTemplateHeaderUtils.java │ ├── femas-extension-springcloud-greenwich-gateway │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ ├── java │ │ │ └── com │ │ │ │ └── tencent │ │ │ │ └── tsf │ │ │ │ └── femas │ │ │ │ └── springcloud │ │ │ │ └── gateway │ │ │ │ ├── config │ │ │ │ ├── FemasDiscoveryAutoConfiguration.java │ │ │ │ └── GatewayAutoConfiguration.java │ │ │ │ ├── discovery │ │ │ │ ├── DiscoveryServerConverter.java │ │ │ │ └── nacos │ │ │ │ │ └── NacosServerConverter.java │ │ │ │ ├── exception │ │ │ │ └── GatewayException.java │ │ │ │ ├── filter │ │ │ │ ├── AbstractGlobalFilter.java │ │ │ │ ├── FemasGatewayGovernanceFilter.java │ │ │ │ ├── FemasGatewayMetricsFilter.java │ │ │ │ ├── FemasReactiveLoadBalancerClientFilter.java │ │ │ │ └── GatewayHeaderUtils.java │ │ │ │ └── loadbalancer │ │ │ │ └── FemasRouteLoadBalancer.java │ │ │ └── resources │ │ │ └── META-INF │ │ │ └── spring.factories │ ├── femas-extension-springcloud-greenwich-zuul │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ ├── java │ │ │ └── com │ │ │ │ └── tencent │ │ │ │ └── tsf │ │ │ │ └── femas │ │ │ │ └── extension │ │ │ │ ├── springcloud │ │ │ │ └── instrumentation │ │ │ │ │ └── zuul │ │ │ │ │ └── ZuultHeaderUtils.java │ │ │ │ └── zuul │ │ │ │ └── filter │ │ │ │ └── FemasRibbonRoutingFilter.java │ │ │ └── resources │ │ │ └── META-INF │ │ │ └── spring.factories │ ├── femas-extension-springcloud-greenwich │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ ├── java │ │ │ └── com │ │ │ │ └── tencent │ │ │ │ └── tsf │ │ │ │ └── femas │ │ │ │ └── extension │ │ │ │ └── springcloud │ │ │ │ ├── discovery │ │ │ │ ├── FemasDiscoveryAutoConfiguration.java │ │ │ │ ├── consul │ │ │ │ │ ├── ConsulServerConverter.java │ │ │ │ │ └── FemasConsulServerList.java │ │ │ │ ├── eureka │ │ │ │ │ └── EurekaServerConverter.java │ │ │ │ ├── nacos │ │ │ │ │ └── NacosServerConverter.java │ │ │ │ └── ribbon │ │ │ │ │ ├── AbstractDiscoveryServerConverter.java │ │ │ │ │ ├── DiscoveryServerConverter.java │ │ │ │ │ ├── FemasRibbonLoadbalancer.java │ │ │ │ │ ├── FemasServiceFilterLoadBalancer.java │ │ │ │ │ ├── LongPollingServerListUpdater.java │ │ │ │ │ └── config │ │ │ │ │ ├── FemasRibbonAutoConfiguration.java │ │ │ │ │ └── FemasRibbonClientConfiguration.java │ │ │ │ └── instrumentation │ │ │ │ ├── feign │ │ │ │ └── FemasFeignInterceptorAutoConfiguration.java │ │ │ │ └── route │ │ │ │ └── FemasRibbonRouteLoadbalancer.java │ │ │ └── resources │ │ │ └── META-INF │ │ │ └── spring.factories │ ├── femas-extension-springcloud-hoxton │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ ├── java │ │ │ └── com │ │ │ │ └── tencent │ │ │ │ └── tsf │ │ │ │ └── femas │ │ │ │ └── extension │ │ │ │ └── springcloud │ │ │ │ └── hoxton │ │ │ │ ├── discovery │ │ │ │ ├── FemasDiscoveryAutoConfiguration.java │ │ │ │ ├── consul │ │ │ │ │ ├── ConsulServerConverter.java │ │ │ │ │ └── FemasConsulServerList.java │ │ │ │ ├── eureka │ │ │ │ │ └── EurekaServerConverter.java │ │ │ │ ├── nacos │ │ │ │ │ └── NacosServerConverter.java │ │ │ │ └── ribbon │ │ │ │ │ ├── AbstractDiscoveryServerConverter.java │ │ │ │ │ ├── DiscoveryServerConverter.java │ │ │ │ │ ├── FemasRibbonLoadbalancer.java │ │ │ │ │ ├── FemasServiceFilterLoadBalancer.java │ │ │ │ │ ├── LongPollingServerListUpdater.java │ │ │ │ │ └── config │ │ │ │ │ ├── FemasRibbonAutoConfiguration.java │ │ │ │ │ └── FemasRibbonClientConfiguration.java │ │ │ │ └── instrumentation │ │ │ │ ├── feign │ │ │ │ └── FemasFeignInterceptorAutoConfiguration.java │ │ │ │ └── route │ │ │ │ └── FemasRibbonRouteLoadbalancer.java │ │ │ └── resources │ │ │ └── META-INF │ │ │ └── spring.factories │ └── pom.xml └── pom.xml ├── femas-governance-impl ├── pom.xml └── src │ ├── main │ ├── java │ │ └── com │ │ │ └── tencent │ │ │ └── tsf │ │ │ └── femas │ │ │ └── governance │ │ │ ├── api │ │ │ └── entity │ │ │ │ ├── OpenApiEntity.java │ │ │ │ ├── OpenApiParameters.java │ │ │ │ ├── OpenApiPath.java │ │ │ │ ├── OpenApiResponse.java │ │ │ │ ├── ServiceApi.java │ │ │ │ └── ServiceApiRequest.java │ │ │ ├── auth │ │ │ ├── Authentication.java │ │ │ └── AuthorizationManager.java │ │ │ ├── circuitbreaker │ │ │ ├── core │ │ │ │ ├── CallNotPermittedException.java │ │ │ │ ├── CircuitBreaker.java │ │ │ │ ├── CircuitBreakerConfig.java │ │ │ │ ├── CircuitBreakerFactory.java │ │ │ │ ├── IllegalStateTransitionException.java │ │ │ │ ├── StateTransitionCallback.java │ │ │ │ ├── internal │ │ │ │ │ ├── CircuitBreakerMetrics.java │ │ │ │ │ ├── CircuitBreakerStateMachine.java │ │ │ │ │ └── SchedulerFactory.java │ │ │ │ └── utils │ │ │ │ │ ├── CircuitBreakerUtil.java │ │ │ │ │ └── MetricNames.java │ │ │ └── service │ │ │ │ ├── ApiCircuitBreakerService.java │ │ │ │ ├── CircuitBreakerAPITrie.java │ │ │ │ ├── CircuitBreakerService.java │ │ │ │ ├── InstanceCircuitBreakerService.java │ │ │ │ ├── ServiceCircuitBreakerService.java │ │ │ │ └── SingleFemasCircuitBreakerService.java │ │ │ ├── event │ │ │ ├── AuthEventCollector.java │ │ │ ├── EventCollector.java │ │ │ ├── EventTypeEnum.java │ │ │ ├── FemasEventData.java │ │ │ ├── LimitEventCollector.java │ │ │ └── RouterEventCollector.java │ │ │ ├── lane │ │ │ ├── LaneService.java │ │ │ ├── MockLaneFilter.java │ │ │ └── entity │ │ │ │ └── LaneRule.java │ │ │ ├── loadbalance │ │ │ ├── LoadbalancerManager.java │ │ │ ├── exception │ │ │ │ └── FemasNoAvailableInstanceException.java │ │ │ └── impl │ │ │ │ ├── AbstractLoadbalancer.java │ │ │ │ ├── RandomLoadbalancer.java │ │ │ │ ├── RoundRobinLoadbalancer.java │ │ │ │ └── TagBasedLoadbalancer.java │ │ │ ├── metrics │ │ │ └── micrometer │ │ │ │ ├── CompositeMetricsData.java │ │ │ │ ├── EndPointMetricsContext.java │ │ │ │ ├── MetricsMonitor.java │ │ │ │ ├── MicroMeterExporter.java │ │ │ │ ├── MicrometerMeterRegistry.java │ │ │ │ ├── ModuleEnum.java │ │ │ │ ├── exporter │ │ │ │ ├── PaasMeterExporter.java │ │ │ │ ├── PrometheusMeterExporter.java │ │ │ │ ├── PrometheusPropertiesConfigAdapter.java │ │ │ │ └── logger │ │ │ │ │ ├── LoggerFormatter.java │ │ │ │ │ ├── LoggerMeterExporter.java │ │ │ │ │ ├── LoggerMeterRegistry.java │ │ │ │ │ └── LoggerRegistryConfig.java │ │ │ │ ├── meter │ │ │ │ ├── MicroCounter.java │ │ │ │ ├── MicroDistributionSummary.java │ │ │ │ ├── MicroLongTaskTimer.java │ │ │ │ ├── MicroMeter.java │ │ │ │ └── MicroTimer.java │ │ │ │ ├── registry │ │ │ │ ├── GovernanceMeterRegistry.java │ │ │ │ ├── JmxMeterRegistry.java │ │ │ │ └── RpcMeterRegistry.java │ │ │ │ └── transformer │ │ │ │ ├── FemasMetricsTransformer.java │ │ │ │ └── MicroMeterTransformer.java │ │ │ ├── ratelimit │ │ │ ├── RateLimiterManager.java │ │ │ └── impl │ │ │ │ ├── AccessTokenClusterRateLimiter.java │ │ │ │ ├── AdaptiveRateLimiter.java │ │ │ │ ├── AssignTokenClusterRateLimiter.java │ │ │ │ ├── LeakBucketRateLimiter.java │ │ │ │ ├── SemaphoreBasedRateLimiter.java │ │ │ │ ├── SlidingWindowRateLimiter.java │ │ │ │ ├── TokenBucketRateLimiter.java │ │ │ │ └── WarmUpSlidingWindowRateLimiter.java │ │ │ ├── route │ │ │ ├── FemasDefaultRouteRuleRouter.java │ │ │ ├── RouterManager.java │ │ │ └── RouterRuleManager.java │ │ │ ├── timeout │ │ │ └── AdaptiveTimeoutManager.java │ │ │ └── trace │ │ │ └── TraceAdapter.java │ └── resources │ │ └── META-INF │ │ └── services │ │ ├── com.tencent.tsf.femas.governance.auth.IAuthentication │ │ ├── com.tencent.tsf.femas.governance.circuitbreaker.ICircuitBreakerService │ │ ├── com.tencent.tsf.femas.governance.lane.LaneFilter │ │ ├── com.tencent.tsf.femas.governance.loadbalance.Loadbalancer │ │ ├── com.tencent.tsf.femas.governance.metrics.IMeterRegistry │ │ ├── com.tencent.tsf.femas.governance.metrics.MetricsExporter │ │ ├── com.tencent.tsf.femas.governance.metrics.MetricsTransformer │ │ ├── com.tencent.tsf.femas.governance.ratelimit.RateLimiter │ │ └── com.tencent.tsf.femas.governance.route.Router │ └── test │ └── java │ └── com │ └── tencent │ └── tsf │ └── femas │ └── governance │ ├── auth │ └── AuthTest.java │ ├── circuitbreaker │ └── core │ │ ├── CallNotPermittedExceptionTest.java │ │ ├── CircuitBreakerConfigTest.java │ │ ├── CircuitBreakerOpenExceptionTest.java │ │ ├── IllegalStateTransitionExceptionTest.java │ │ ├── internal │ │ ├── CircuitBreakerAutoTransitionStateMachineTest.java │ │ ├── CircuitBreakerExceptionHandlingTest.java │ │ ├── CircuitBreakerMetricsTest.java │ │ ├── CircuitBreakerStateMachineTest.java │ │ └── SchedulerFactoryTest.java │ │ ├── mockservice │ │ ├── AsyncHelloWorldService.java │ │ ├── HelloWorldException.java │ │ └── HelloWorldService.java │ │ └── utils │ │ ├── CircuitBreakerUtilIsCallPermittedTest.java │ │ └── CircuitBreakerUtilTest.java │ ├── loadbalance │ └── TagBasedLoadbalancerTest.java │ ├── metrics │ └── micrometer │ │ └── EndPointMetricsContextTest.java │ ├── ratelimit │ └── RateLimiterManagerTest.java │ └── route │ └── RouteRuleRouterTest.java ├── femas-governance ├── pom.xml └── src │ ├── main │ └── java │ │ └── com │ │ └── tencent │ │ └── tsf │ │ └── femas │ │ └── governance │ │ ├── auth │ │ └── IAuthentication.java │ │ ├── circuitbreaker │ │ ├── FemasCircuitBreakerIsolationLevelEnum.java │ │ └── ICircuitBreakerService.java │ │ ├── connector │ │ └── server │ │ │ └── ServerConnectorManager.java │ │ ├── lane │ │ └── LaneFilter.java │ │ ├── loadbalance │ │ └── Loadbalancer.java │ │ ├── metrics │ │ ├── Counter.java │ │ ├── DistributionSummary.java │ │ ├── IMeterRegistry.java │ │ ├── LongTaskTimer.java │ │ ├── Meter.java │ │ ├── MeterEnum.java │ │ ├── MetricsConstant.java │ │ ├── MetricsExporter.java │ │ ├── MetricsTag.java │ │ ├── MetricsTransformer.java │ │ ├── TagPair.java │ │ └── Timer.java │ │ ├── ratelimit │ │ └── RateLimiter.java │ │ └── route │ │ └── Router.java │ └── test │ └── java │ └── com │ └── tencent │ └── tsf │ └── femas │ └── governance │ └── PluginLoaderTest.java ├── femas-helm ├── .helmignore ├── Chart.yaml ├── templates │ ├── NOTES.txt │ ├── _helpers.tpl │ ├── deployment.yaml │ ├── hpa.yaml │ ├── ingress.yaml │ ├── service.yaml │ ├── serviceaccount.yaml │ └── tests │ │ └── test-connection.yaml └── values.yaml ├── femas-plugin-impl ├── pom.xml └── src │ └── main │ ├── java │ └── com │ │ └── tencent │ │ └── tsf │ │ └── femas │ │ └── plugin │ │ └── impl │ │ ├── ConfigurationImpl.java │ │ ├── FemasConfigProviders.java │ │ ├── FemasPluginContext.java │ │ ├── FemasTypeProviders.java │ │ ├── SPIPluginType.java │ │ └── config │ │ ├── AuthenticateConfigImpl.java │ │ ├── CircuitBreakerConfigImpl.java │ │ ├── GlobalConfigImpl.java │ │ ├── LaneConfigImpl.java │ │ ├── LoadBalanceConfigImpl.java │ │ ├── MetricsConfigImpl.java │ │ ├── MetricsExporterConfigImpl.java │ │ ├── MetricsTransformerConfigImpl.java │ │ ├── RateLimitConfigImpl.java │ │ ├── ServerConnectorConfigImpl.java │ │ ├── ServiceRouterConfigImpl.java │ │ ├── SystemConfigImpl.java │ │ └── rule │ │ ├── auth │ │ ├── AuthConstant.java │ │ ├── AuthRuleConfig.java │ │ └── AuthRuleGroup.java │ │ ├── circuitbreaker │ │ ├── CircuitBreakerApi.java │ │ ├── CircuitBreakerRule.java │ │ ├── CircuitBreakerStrategy.java │ │ └── FemasCircuitBreakerConstant.java │ │ ├── ratelimit │ │ ├── InitLimitRule.java │ │ ├── RateLimitRuleConfig.java │ │ ├── RateLimiterConstant.java │ │ ├── RateLimiterRule.java │ │ └── RateLimiterRuleGroup.java │ │ └── router │ │ ├── RouteDest.java │ │ ├── RouteRule.java │ │ ├── RouteRuleGroup.java │ │ └── RouterType.java │ └── resources │ └── META-INF │ └── services │ ├── com.tencent.tsf.femas.plugin.ConfigProvider │ └── com.tencent.tsf.femas.plugin.PluginProvider ├── femas-plugin ├── pom.xml └── src │ └── main │ └── java │ └── com │ └── tencent │ └── tsf │ └── femas │ └── plugin │ ├── Attribute.java │ ├── ConfigProvider.java │ ├── DefaultConfigurablePluginHolder.java │ ├── Lifecycle.java │ ├── Plugin.java │ ├── PluginDefinitionReader.java │ ├── PluginFactory.java │ ├── PluginProvider.java │ ├── config │ ├── ConfigHandler.java │ ├── ConfigHandlerFactory.java │ ├── ConfigHandlerUtils.java │ ├── Configuration.java │ ├── PluginConfig.java │ ├── PluginConfigImpl.java │ ├── enums │ │ └── ConfigHandlerTypeEnum.java │ ├── global │ │ ├── GlobalConfig.java │ │ ├── ServerConnectorConfig.java │ │ ├── ServerConnectorEnum.java │ │ └── SystemConfig.java │ ├── gov │ │ ├── AuthenticateConfig.java │ │ ├── CircuitBreakerConfig.java │ │ ├── LaneConfig.java │ │ ├── LoadBalanceConfig.java │ │ ├── MetricsConfig.java │ │ ├── MetricsExporterConfig.java │ │ ├── MetricsTransformerConfig.java │ │ ├── RateLimitConfig.java │ │ └── ServiceRouterConfig.java │ └── verify │ │ ├── DefaultValues.java │ │ └── Verifier.java │ └── context │ ├── AbstractSDKContext.java │ ├── ConfigContext.java │ ├── ConfigRefreshableContext.java │ └── ContextAware.java ├── femas-registry-impl ├── femas-registry-consul │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── com │ │ │ │ └── tencent │ │ │ │ └── tsf │ │ │ │ └── femas │ │ │ │ └── registry │ │ │ │ └── impl │ │ │ │ └── consul │ │ │ │ ├── ConsulConstants.java │ │ │ │ ├── config │ │ │ │ ├── ConsulConfig.java │ │ │ │ └── ConsulHealthCheckConfig.java │ │ │ │ ├── discovery │ │ │ │ ├── ConsulServiceDiscoveryClient.java │ │ │ │ └── ConsulServiceDiscoveryFactory.java │ │ │ │ ├── serviceregistry │ │ │ │ ├── ConsulServiceRegistry.java │ │ │ │ ├── ConsulServiceRegistryFactory.java │ │ │ │ └── HeartbeatScheduler.java │ │ │ │ └── util │ │ │ │ └── NormalizeUtil.java │ │ └── resources │ │ │ └── META-INF │ │ │ └── services │ │ │ ├── com.tencent.tsf.femas.common.discovery.ServiceDiscoveryFactory │ │ │ └── com.tencent.tsf.femas.common.serviceregistry.ServiceRegistryFactory │ │ └── test │ │ └── java │ │ └── com │ │ └── tencent │ │ └── tsf │ │ └── femas │ │ └── registry │ │ └── impl │ │ └── consul │ │ ├── config │ │ ├── ConsulConfigTest.java │ │ └── ConsulHealthCheckConfigTest.java │ │ ├── discovery │ │ ├── ConsulServiceDiscoveryClientTest.java │ │ └── ConsulServiceDiscoveryFactoryTest.java │ │ └── serviceregistry │ │ ├── ConsulServiceRegistryFactoryTest.java │ │ └── ConsulServiceRegistryTest.java ├── femas-registry-etcd │ ├── pom.xml │ └── src │ │ ├── main │ │ └── java │ │ │ └── com │ │ │ └── tencent │ │ │ └── tsf │ │ │ └── femas │ │ │ └── registry │ │ │ └── impl │ │ │ └── etcd │ │ │ ├── discovery │ │ │ ├── EtcdServiceDiscoveryClient.java │ │ │ └── EtcdServiceDiscoveryFactory.java │ │ │ └── serviceregistry │ │ │ ├── EtcdServiceRegistry.java │ │ │ └── EtcdServiceRegistryFactory.java │ │ └── test │ │ └── java │ │ └── com │ │ └── tencent │ │ └── tsf │ │ └── femas │ │ └── registry │ │ └── etcd │ │ └── EtcdRegistryTest.java ├── femas-registry-eureka │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── com │ │ │ │ └── tencent │ │ │ │ └── tsf │ │ │ │ └── femas │ │ │ │ └── registry │ │ │ │ └── impl │ │ │ │ └── eureka │ │ │ │ ├── EurekaRegistryBuilder.java │ │ │ │ ├── discovery │ │ │ │ ├── EurekaServiceDiscoveryClient.java │ │ │ │ └── EurekaServiceDiscoveryFactory.java │ │ │ │ ├── naming │ │ │ │ └── EurekaNamingService.java │ │ │ │ └── serviceregistry │ │ │ │ ├── EurekaBeatReactor.java │ │ │ │ ├── EurekaServiceRegistry.java │ │ │ │ └── EurekaServiceRegistryFactory.java │ │ └── resources │ │ │ └── META-INF │ │ │ └── services │ │ │ ├── com.tencent.tsf.femas.common.discovery.ServiceDiscoveryFactory │ │ │ └── com.tencent.tsf.femas.common.serviceregistry.ServiceRegistryFactory │ │ └── test │ │ └── java │ │ └── com │ │ └── tencent │ │ └── tsf │ │ └── femas │ │ └── registry │ │ └── eureka │ │ └── EurekaRegistryTest.java ├── femas-registry-k8s │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── com │ │ │ │ └── tencent │ │ │ │ └── tsf │ │ │ │ └── femas │ │ │ │ └── registry │ │ │ │ └── impl │ │ │ │ └── k8s │ │ │ │ ├── K8sRegistryBuilder.java │ │ │ │ ├── discovery │ │ │ │ ├── K8sServiceDiscoveryClient.java │ │ │ │ └── K8sServiceDiscoveryFactory.java │ │ │ │ └── serviceregistry │ │ │ │ ├── K8sServiceRegistry.java │ │ │ │ └── K8sServiceRegistryFactory.java │ │ └── resources │ │ │ └── META-INF │ │ │ └── services │ │ │ ├── com.tencent.tsf.femas.common.discovery.ServiceDiscoveryFactory │ │ │ └── com.tencent.tsf.femas.common.serviceregistry.ServiceRegistryFactory │ │ └── test │ │ └── java │ │ └── com │ │ └── tencent │ │ └── tsf │ │ └── femas │ │ └── regisrty │ │ └── k8s │ │ └── K8sRegistryTest.java ├── femas-registry-nacos │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── com │ │ │ │ └── tencent │ │ │ │ └── tsf │ │ │ │ └── femas │ │ │ │ └── registry │ │ │ │ └── impl │ │ │ │ └── nacos │ │ │ │ ├── NacosRegistryBuilder.java │ │ │ │ ├── discovery │ │ │ │ ├── NacosServiceDiscoveryClient.java │ │ │ │ └── NacosServiceDiscoveryFactory.java │ │ │ │ └── serviceregistry │ │ │ │ ├── NacosServiceRegistry.java │ │ │ │ └── NacosServiceRegistryFactory.java │ │ └── resources │ │ │ └── META-INF │ │ │ └── services │ │ │ ├── com.tencent.tsf.femas.common.discovery.ServiceDiscoveryFactory │ │ │ └── com.tencent.tsf.femas.common.serviceregistry.ServiceRegistryFactory │ │ └── test │ │ ├── java │ │ └── com │ │ │ └── tencent │ │ │ └── tsf │ │ │ └── femas │ │ │ └── registry │ │ │ └── nacos │ │ │ └── NacosRegistryTest.java │ │ └── resources │ │ └── META-INF │ │ └── services │ │ └── com.tencent.tsf.femas.common.context.ContextConstant ├── femas-registry-polaris │ ├── pom.xml │ └── src │ │ ├── main │ │ └── java │ │ │ └── com │ │ │ └── tencent │ │ │ └── tsf │ │ │ └── femas │ │ │ └── registry │ │ │ └── impl │ │ │ └── polaris │ │ │ ├── discovery │ │ │ ├── PolarisServiceDiscoveryClient.java │ │ │ └── PolarisServiceDiscoveryFactory.java │ │ │ └── serviceregistry │ │ │ ├── PolarisBeatReactor.java │ │ │ ├── PolarisServiceRegistry.java │ │ │ └── PolarisServiceRegistryFactory.java │ │ └── test │ │ └── java │ │ └── com │ │ └── tencent │ │ └── tsf │ │ └── femas │ │ └── registry │ │ └── polaris │ │ └── PolarisRegistryTest.java ├── femas-registry-zookeeper │ ├── pom.xml │ └── src │ │ └── main │ │ └── java │ │ └── com │ │ └── tencent │ │ └── tsf │ │ └── femas │ │ └── registry │ │ └── impl │ │ └── zookeeper │ │ ├── discovery │ │ └── ZookeeperServiceDiscoveryClient.java │ │ └── serviceregistry │ │ └── ZookeeperServiceRegistry.java └── pom.xml ├── femas-registry ├── pom.xml └── src │ ├── main │ └── java │ │ └── com │ │ └── tencent │ │ └── tsf │ │ └── femas │ │ └── common │ │ ├── AbstractRegistryBuilder.java │ │ ├── RegistryBuilder.java │ │ ├── RegistryConstants.java │ │ ├── RegistryEnum.java │ │ ├── discovery │ │ ├── AbstractServiceDiscoveryClient.java │ │ ├── DiscoveryService.java │ │ ├── SchedulePollingServerListUpdater.java │ │ ├── ServerUpdater.java │ │ ├── ServiceDiscoveryClient.java │ │ ├── ServiceDiscoveryFactory.java │ │ └── ServiceNotifyListener.java │ │ └── serviceregistry │ │ ├── AbstractServiceRegistry.java │ │ ├── AbstractServiceRegistryMetadata.java │ │ ├── AbstractServiceRegistryMetadataFactory.java │ │ ├── CompositeServiceRegistry.java │ │ ├── RegistryService.java │ │ ├── ServiceRegistry.java │ │ └── ServiceRegistryFactory.java │ └── test │ └── java │ └── com │ └── tencent │ └── tsf │ └── femas │ └── registry │ └── RegistryServiceTest.java ├── femas-starters ├── femas-dubbo-starters │ ├── femas-alibaba-dubbo-starter │ │ └── pom.xml │ ├── femas-apache-dubbo3-starter │ │ └── pom.xml │ └── pom.xml ├── femas-springcloud-starters │ ├── femas-springcloud-2020.0-ilford-starter │ │ └── pom.xml │ ├── femas-springcloud-discovery-starter │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ ├── java │ │ │ └── com │ │ │ │ └── tencent │ │ │ │ └── tsf │ │ │ │ └── femas │ │ │ │ └── springcloud │ │ │ │ └── discovery │ │ │ │ └── starter │ │ │ │ └── discovery │ │ │ │ ├── ConditionalOnFemasDiscoveryEnabled.java │ │ │ │ ├── FemasDiscoveryProperties.java │ │ │ │ ├── discovery │ │ │ │ ├── FemasDiscoveryAutoConfiguration.java │ │ │ │ ├── FemasDiscoveryClient.java │ │ │ │ ├── FemasDiscoveryClientConfiguration.java │ │ │ │ ├── FemasServiceDiscovery.java │ │ │ │ ├── consul │ │ │ │ │ ├── ConsulServerConverter.java │ │ │ │ │ └── FemasConsulServerList.java │ │ │ │ ├── eureka │ │ │ │ │ └── EurekaServerConverter.java │ │ │ │ ├── nacos │ │ │ │ │ └── NacosServerConverter.java │ │ │ │ ├── reactive │ │ │ │ │ ├── FemasReactiveDiscoveryClient.java │ │ │ │ │ └── FemasReactiveDiscoveryClientConfiguration.java │ │ │ │ └── ribbo │ │ │ │ │ └── DiscoveryServerConverter.java │ │ │ │ ├── entity │ │ │ │ └── FemasServiceInstance.java │ │ │ │ ├── registry │ │ │ │ ├── FemasAutoServiceRegistration.java │ │ │ │ ├── FemasRegistration.java │ │ │ │ ├── FemasServiceRegistry.java │ │ │ │ └── FemasServiceRegistryAutoConfiguration.java │ │ │ │ └── ribbon │ │ │ │ ├── ConditionalOnRibbonFemas.java │ │ │ │ ├── FemasRibbonClientConfiguration.java │ │ │ │ ├── FemasServer.java │ │ │ │ ├── FemasServerIntrospector.java │ │ │ │ ├── FemasServerList.java │ │ │ │ └── RibbonFemasAutoConfiguration.java │ │ │ └── resources │ │ │ └── META-INF │ │ │ ├── additional-spring-configuration-metadata.json │ │ │ └── spring.factories │ ├── femas-springcloud-greenwich-gateway-starter │ │ └── pom.xml │ ├── femas-springcloud-greenwich-starter │ │ └── pom.xml │ ├── femas-springcloud-greenwich-zuul-starter │ │ └── pom.xml │ ├── femas-springcloud-hoxton-starter │ │ └── pom.xml │ └── pom.xml └── pom.xml ├── jacoco-aggregate └── pom.xml ├── pom.xml └── settings-all.xml /.devcontainer/devcontainer.json: -------------------------------------------------------------------------------- 1 | { 2 | "image": "mcr.microsoft.com/devcontainers/universal:2", 3 | "features": { 4 | "ghcr.io/devcontainers/features/java:1": { 5 | "version": "8", 6 | "installGradle": true 7 | } 8 | } 9 | } -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # IntelliJ project files 2 | .factorypath 3 | .idea/ 4 | *.iml 5 | out 6 | gen 7 | 8 | # Maven 9 | target/ 10 | pom.xml.tag 11 | pom.xml.releaseBackup 12 | pom.xml.versionsBackup 13 | pom.xml.next 14 | release.properties 15 | dependency-reduced-pom.xml 16 | buildNumber.properties 17 | .mvn/timing.properties 18 | !/.mvn/wrapper/maven-wrapper.jar 19 | */.flattened-pom.xml 20 | .flattened-pom.xml 21 | 22 | # Eclipse 23 | .classpath 24 | .settings/ 25 | .project 26 | 27 | /logs 28 | */logs 29 | *.log 30 | 31 | env.sh 32 | 33 | # System related 34 | *.DS_Store 35 | Thumbs.db 36 | 37 | 38 | # Atom console 39 | node_modules 40 | dist 41 | .vscode 42 | 43 | # femas-agent jar file 44 | femas-agent/femas-agent -------------------------------------------------------------------------------- /Code-of-Conduct-zh.md: -------------------------------------------------------------------------------- 1 | # Femas社区行为准则 2 | 3 | **Femas社区成员和参与其中的每个人都遵守[CNCF行为准则](https://github.com/cncf/foundation/blob/master/code-of-conduct.md)。** 4 | 5 | 如果遇到辱骂、骚扰或其他不可接受的行为,可以通过电子邮件联系 Femas 行为准则委员会报告, 6 | 邮箱地址:femas_community@qq.com -------------------------------------------------------------------------------- /Code-of-Conduct.md: -------------------------------------------------------------------------------- 1 | # Femas Community Code of Conduct 2 | 3 | **Femas and everyone participating in it follows the [CNCF Code of Conduct](https://github.com/cncf/foundation/blob/master/code-of-conduct.md).** 4 | 5 | Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the Femas Code of Conduct Committee via email:femas_community@qq.com -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:20.04 2 | 3 | #LABEL maintainer "minghhou " 4 | # 5 | #ENV BUILD_MODE="docker" 6 | # 7 | #RUN sed -i 's/archive.ubuntu.com/mirrors.tencent.com/g' /etc/apt/sources.list && \ 8 | # sed -i 's/security.ubuntu.com/mirrors.tencent.com/g' /etc/apt/sources.list 9 | # 10 | #RUN apt update && apt install openjdk-8-jdk maven iproute2 -y 11 | 12 | COPY ./femas-admin-starter/target/femas-admin-starter-*/* /usr/local/src/femas 13 | 14 | #RUN echo "start build docker" && cd /usr/local/src/femas && mvn -Dmaven.test.skip=true clean install -U 15 | 16 | #COPY ./entrypoint.sh /entrypoint.sh 17 | 18 | #RUN chmod +x /entrypoint.sh 19 | 20 | RUN chmod +x /usr/local/src/femas/bin/startup.sh 21 | 22 | ENTRYPOINT ["/usr/local/src/femas/bin/startup.sh"] -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | 2 | REG ?= registry.tce.com 3 | 4 | PROJECT_NAME := femas 5 | 6 | APP_NAME := all 7 | 8 | TAG = $(shell git rev-parse --short HEAD) 9 | 10 | PORT ?= 8708 11 | 12 | VERSION ?= $(TAG) 13 | 14 | build-image: 15 | docker build -f Dockerfile -t ${REG}/${PROJECT_NAME}/${APP_NAME}:${VERSION} . 16 | 17 | push-image: 18 | docker push ${REG}/${PROJECT_NAME}/${APP_NAME}:${VERSION} 19 | 20 | run-image: 21 | docker run -d --name femas-runner -w /usr/local/src/femas \ 22 | -p ${PORT}:8080 \ 23 | -e VERSION=${VERSION} \ 24 | -v $(shell pwd)/logs:/usr/local/src/femas/femas-admin-starter/target/femas-admin-starter-0.3.0-${VERSION}/femas-admin/logs ${REG}/${PROJECT_NAME}/${APP_NAME}:${VERSION} 25 | 26 | run-helm: 27 | helm install femas-helm ./femas-helm 28 | 29 | reset-helm: 30 | helm uninstall femas-helm 31 | -------------------------------------------------------------------------------- /PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | ## What is the purpose of the change 2 | 3 | XXXXX 4 | 5 | ## Brief changelog 6 | 7 | XX 8 | 9 | ## Verifying this change 10 | 11 | XXXX -------------------------------------------------------------------------------- /doc/grafana面板数据图表配置.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TencentFemas/femas/e5c4bd68683a0989697da21a75b957534258390a/doc/grafana面板数据图表配置.zip -------------------------------------------------------------------------------- /entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | cd /usr/local/src/femas 5 | BOOTSTRAP=$(find /usr/local/src/femas -regex ".*/femas-admin-starter-.*/startup.sh$") 6 | bash ${BOOTSTRAP} 7 | tail -f $(dirname ${BOOTSTRAP})/../logs/*.log 8 | -------------------------------------------------------------------------------- /femas-adaptor/femas-adaptor-opensource-admin/src/main/java/com/tencent/tsf/femas/adaptor/paas/governance/circuitbreaker/event/EventResponse.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.adaptor.paas.governance.circuitbreaker.event; 2 | 3 | public class EventResponse { 4 | 5 | private Integer retCode; 6 | private String retMsg; 7 | 8 | public Integer getRetCode() { 9 | return retCode; 10 | } 11 | 12 | public void setRetCode(Integer retCode) { 13 | this.retCode = retCode; 14 | } 15 | 16 | public String getRetMsg() { 17 | return retMsg; 18 | } 19 | 20 | public void setRetMsg(String retMsg) { 21 | this.retMsg = retMsg; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /femas-adaptor/femas-adaptor-opensource-admin/src/main/java/com/tencent/tsf/femas/adaptor/paas/governance/lane/RuleTagRelationship.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.adaptor.paas.governance.lane; 2 | 3 | /** 4 | * User: MackZhang 5 | * Date: 2020/2/12 6 | */ 7 | public enum RuleTagRelationship { 8 | /** 9 | * 与 10 | */ 11 | RELEATION_AND, 12 | 13 | /** 14 | * 或 15 | */ 16 | RELEATION_OR; 17 | } 18 | -------------------------------------------------------------------------------- /femas-adaptor/femas-adaptor-opensource-admin/src/main/java/com/tencent/tsf/femas/adaptor/paas/logger/ConverterBase.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.adaptor.paas.logger; 2 | 3 | public interface ConverterBase { 4 | 5 | /** 6 | * MDC Map为空时的默认值 7 | */ 8 | String DEFAULT_VALUE = "[,,,]"; 9 | 10 | /** 11 | * value为空时的默认值 12 | */ 13 | String DEFAULT_SINGLE_VALUE = ""; 14 | 15 | /** 16 | * MDC中获取traceid、spanid、span-export的key 17 | */ 18 | String[] MDC_KEYS = new String[]{"X-B3-TraceId", "X-B3-SpanId", "X-Span-Export"}; 19 | } 20 | -------------------------------------------------------------------------------- /femas-adaptor/femas-adaptor-opensource-admin/src/main/resources/META-INF/services/com.tencent.tsf.femas.common.context.Context: -------------------------------------------------------------------------------- 1 | com.tencent.tsf.femas.common.context.FemasContext -------------------------------------------------------------------------------- /femas-adaptor/femas-adaptor-opensource-admin/src/main/resources/META-INF/services/com.tencent.tsf.femas.common.context.ContextConstant: -------------------------------------------------------------------------------- 1 | com.tencent.tsf.femas.common.constant.FemasConstant -------------------------------------------------------------------------------- /femas-adaptor/femas-adaptor-opensource-admin/src/main/resources/META-INF/services/com.tencent.tsf.femas.common.serviceregistry.AbstractServiceRegistryMetadata: -------------------------------------------------------------------------------- 1 | com.tencent.tsf.femas.adaptor.paas.registry.FemasRegistry -------------------------------------------------------------------------------- /femas-adaptor/femas-adaptor-opensource-admin/src/main/resources/META-INF/services/com.tencent.tsf.femas.governance.connector.server.ServerConnectorManager: -------------------------------------------------------------------------------- 1 | com.tencent.tsf.femas.adaptor.paas.config.FemasConfigHttpClientManager 2 | com.tencent.tsf.femas.adaptor.paas.config.FemasConfigGrpcClientManager -------------------------------------------------------------------------------- /femas-adaptor/femas-adaptor-opensource-admin/src/main/resources/META-INF/services/com.tencent.tsf.femas.governance.lane.LaneFilter: -------------------------------------------------------------------------------- 1 | com.tencent.tsf.femas.adaptor.paas.governance.lane.FemasLaneFilter -------------------------------------------------------------------------------- /femas-adaptor/femas-adaptor-opensource-admin/src/main/resources/META-INF/services/com.tencent.tsf.femas.governance.ratelimit.RateLimiter: -------------------------------------------------------------------------------- 1 | com.tencent.tsf.femas.adaptor.paas.governance.ratelimiter.FemasRateLimiter -------------------------------------------------------------------------------- /femas-adaptor/femas-adaptor-opensource-admin/src/main/resources/META-INF/services/com.tencent.tsf.femas.plugin.config.ConfigHandler: -------------------------------------------------------------------------------- 1 | com.tencent.tsf.femas.adaptor.paas.governance.auth.FemasAuthHandler 2 | com.tencent.tsf.femas.adaptor.paas.governance.circuitbreaker.FemasCircuitBreakerHandler 3 | com.tencent.tsf.femas.adaptor.paas.governance.loadbalance.FemasLoadBalancerHandler 4 | com.tencent.tsf.femas.adaptor.paas.governance.ratelimiter.FemasRateLimiterHandler 5 | com.tencent.tsf.femas.adaptor.paas.governance.router.FemasRouterHandler 6 | com.tencent.tsf.femas.adaptor.paas.governance.lane.FemasLaneHandler -------------------------------------------------------------------------------- /femas-admin-starter/bin/shutdown.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | if not exist "%JAVA_HOME%\bin\jps.exe" echo Please set the JAVA_HOME variable in your environment, We need java(x64)! jdk8 or later is better! & EXIT /B 1 4 | 5 | setlocal 6 | 7 | set "PATH=%JAVA_HOME%\bin;%PATH%" 8 | 9 | echo killing nacos server 10 | 11 | for /f "tokens=1" %%i in ('jps -m ^| find "fames.fames"') do ( taskkill /F /PID %%i ) 12 | 13 | echo Done! 14 | -------------------------------------------------------------------------------- /femas-admin-starter/bin/shutdown.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | pid=`ps ax | grep -i 'femas-admin' |grep java | grep -v grep | awk '{print $1}'` 5 | if [ -z "$pid" ]; then 6 | echo "No femas-admin process found." 7 | exit -1; 8 | fi 9 | 10 | echo "The femas-admin($pid) is running..." 11 | 12 | kill $pid 13 | 14 | echo "Send shutdown request to femas-admin($pid) success..." -------------------------------------------------------------------------------- /femas-admin/src/main/java/com/tencent/tsf/femas/constant/IgnorePrefix.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.constant; 2 | 3 | import java.lang.annotation.ElementType; 4 | import java.lang.annotation.Retention; 5 | import java.lang.annotation.RetentionPolicy; 6 | import java.lang.annotation.Target; 7 | 8 | /** 9 | * @author Cody 10 | * @date 2021 2021/9/28 11:30 上午 11 | * 去除接口公共前缀 12 | */ 13 | @Target({ElementType.TYPE}) 14 | @Retention(RetentionPolicy.RUNTIME) 15 | public @interface IgnorePrefix { 16 | 17 | } 18 | -------------------------------------------------------------------------------- /femas-admin/src/main/java/com/tencent/tsf/femas/constant/ModuleConstants.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.constant; 2 | 3 | import java.util.HashMap; 4 | 5 | public class ModuleConstants { 6 | 7 | 8 | public static HashMap map; 9 | 10 | static { 11 | map = new HashMap<>(); 12 | map.put("NamespaceManageEndpoint", "命名空间"); 13 | map.put("RegistryManageEndpoint", "注册中心"); 14 | map.put("AuthEndpoint", "服务鉴权"); 15 | map.put("BreakerEndpoint", "服务熔断"); 16 | map.put("LimitEndpoint", "服务限流"); 17 | map.put("RouteEndpoint", "服务路由"); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /femas-admin/src/main/java/com/tencent/tsf/femas/constant/PromConstants.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.constant; 2 | 3 | /** 4 | * @author Cody 5 | * @date 2021 2021/8/11 3:55 下午 6 | */ 7 | public class PromConstants { 8 | 9 | /** 10 | * prometheus-查询SUCCESS 11 | */ 12 | public static final String SUCCESS = "success"; 13 | 14 | 15 | /** 16 | * prometheus-查询参数 17 | */ 18 | public static final String QUERY = "query"; 19 | 20 | public static final String REMOTE_VERSION_TAG = "remote_version"; 21 | public static final String LOCAL_VERSION_TAG = "local_version"; 22 | 23 | } -------------------------------------------------------------------------------- /femas-admin/src/main/java/com/tencent/tsf/femas/constant/Types.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.constant; 2 | 3 | /** 4 | * @author hongweizhu 5 | */ 6 | public class Types { 7 | 8 | /** 9 | * ID类型:Hash ID 10 | */ 11 | public static final String HASH_ID_KEY = "femas/increment/hashId"; 12 | } 13 | -------------------------------------------------------------------------------- /femas-admin/src/main/java/com/tencent/tsf/femas/endpoint/adaptor/AbstractBaseEndpoint.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.endpoint.adaptor; 2 | 3 | 4 | import com.tencent.tsf.femas.context.ApplicationContextHelper; 5 | 6 | /** 7 | * @author leo 8 | */ 9 | public abstract class AbstractBaseEndpoint { 10 | 11 | protected final ControllerExecutorTemplate executor; 12 | 13 | public AbstractBaseEndpoint() { 14 | executor = ApplicationContextHelper.getBean(ControllerExecutorTemplate.class); 15 | } 16 | 17 | } -------------------------------------------------------------------------------- /femas-admin/src/main/java/com/tencent/tsf/femas/endpoint/adaptor/Processor.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.endpoint.adaptor; 2 | 3 | 4 | /** 5 | * @author leo 6 | */ 7 | public interface Processor { 8 | 9 | T execute(); 10 | 11 | // boolean checkParams(Object var); 12 | 13 | // void afterProcess(Object var); 14 | 15 | } 16 | -------------------------------------------------------------------------------- /femas-admin/src/main/java/com/tencent/tsf/femas/endpoint/configlisten/ConfigEndpoint.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.endpoint.configlisten; 2 | 3 | import com.tencent.tsf.femas.endpoint.adaptor.AbstractBaseEndpoint; 4 | import org.springframework.web.bind.annotation.RequestMapping; 5 | import org.springframework.web.bind.annotation.RestController; 6 | 7 | /** 8 | * @Author leoziltong 9 | * @Description //TODO 10 | * @Date: 2021/4/16 14:57 11 | * @Version 1.0 12 | */ 13 | @RestController 14 | @RequestMapping("/atom/config") 15 | public class ConfigEndpoint extends AbstractBaseEndpoint { 16 | 17 | // @PostMapping("/DescribeNamespaces") 18 | // public IPage describeNamespaces(@RequestBody Map param) { 19 | // return executor.process(()->{ 20 | // 21 | // }); 22 | // } 23 | 24 | 25 | } -------------------------------------------------------------------------------- /femas-admin/src/main/java/com/tencent/tsf/femas/endpoint/index/IndexController.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.endpoint.index; 2 | 3 | import com.tencent.tsf.femas.util.EnvUtil; 4 | import com.tencent.tsf.femas.util.ResourceFileReadUtil; 5 | import org.springframework.web.bind.annotation.RequestMapping; 6 | import org.springframework.web.bind.annotation.RestController; 7 | 8 | /** 9 | * @author Cody 10 | * @date 2021 2021/9/23 2:23 下午 11 | */ 12 | @RestController 13 | public class IndexController { 14 | 15 | @RequestMapping(value = "/index") 16 | public String index() { 17 | String FEMAS_BASE_PATH = EnvUtil.getFemasPrefix(); 18 | String template = ResourceFileReadUtil.getResourceAsString("index/index.html"); 19 | return template.replace("${FEMAS_BASE_PATH}", FEMAS_BASE_PATH); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /femas-admin/src/main/java/com/tencent/tsf/femas/endpoint/metircs/package-info.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.endpoint.metircs; -------------------------------------------------------------------------------- /femas-admin/src/main/java/com/tencent/tsf/femas/entity/IdModel.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.entity; 2 | 3 | public class IdModel { 4 | 5 | private String id; 6 | 7 | 8 | public IdModel() { 9 | } 10 | 11 | public String getId() { 12 | return id; 13 | } 14 | 15 | public void setId(String id) { 16 | this.id = id; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /femas-admin/src/main/java/com/tencent/tsf/femas/entity/KVEntity.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.entity; 2 | 3 | /** 4 | * @author Cody 5 | * @date 2021 2021/8/6 3:20 下午 6 | */ 7 | public class KVEntity { 8 | 9 | private String key; 10 | 11 | private String value; 12 | 13 | public KVEntity(String key, String value) { 14 | this.key = key; 15 | this.value = value; 16 | } 17 | 18 | public KVEntity() { 19 | } 20 | 21 | public String getKey() { 22 | return key; 23 | } 24 | 25 | public void setKey(String key) { 26 | this.key = key; 27 | } 28 | 29 | public String getValue() { 30 | return value; 31 | } 32 | 33 | public void setValue(String value) { 34 | this.value = value; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /femas-admin/src/main/java/com/tencent/tsf/femas/entity/Page.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.entity; 2 | 3 | import io.swagger.annotations.ApiModelProperty; 4 | 5 | public class Page { 6 | 7 | @ApiModelProperty("页码") 8 | private Integer pageNo = 1; 9 | @ApiModelProperty("页面大小") 10 | private Integer pageSize = 20; 11 | 12 | 13 | public Integer getPageNo() { 14 | return pageNo; 15 | } 16 | 17 | public void setPageNo(Integer pageNo) { 18 | this.pageNo = pageNo; 19 | } 20 | 21 | public Integer getPageSize() { 22 | return pageSize; 23 | } 24 | 25 | public void setPageSize(Integer pageSize) { 26 | this.pageSize = pageSize; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /femas-admin/src/main/java/com/tencent/tsf/femas/entity/PageModel.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.entity; 2 | 3 | public class PageModel { 4 | 5 | private String id; 6 | private Integer pageNo; 7 | private Integer pageSize; 8 | 9 | 10 | public PageModel() { 11 | } 12 | 13 | public Integer getPageNo() { 14 | return pageNo; 15 | } 16 | 17 | public void setPageNo(Integer pageNo) { 18 | this.pageNo = pageNo; 19 | } 20 | 21 | public Integer getPageSize() { 22 | return pageSize; 23 | } 24 | 25 | public void setPageSize(Integer pageSize) { 26 | this.pageSize = pageSize; 27 | } 28 | 29 | public String getId() { 30 | return id; 31 | } 32 | 33 | public void setId(String id) { 34 | this.id = id; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /femas-admin/src/main/java/com/tencent/tsf/femas/entity/PageService.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.entity; 2 | 3 | import java.util.List; 4 | 5 | public class PageService { 6 | 7 | private List data; 8 | private Integer count; 9 | 10 | public PageService(List data, Integer count) { 11 | this.data = data; 12 | this.count = count; 13 | } 14 | 15 | public PageService() { 16 | } 17 | 18 | public List getData() { 19 | return data; 20 | } 21 | 22 | public void setData(List data) { 23 | this.data = data; 24 | } 25 | 26 | public Integer getCount() { 27 | return count; 28 | } 29 | 30 | public void setCount(Integer count) { 31 | this.count = count; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /femas-admin/src/main/java/com/tencent/tsf/femas/entity/metrix/TimeSeries.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.entity.metrix; 2 | 3 | /** 4 | * @author Cody 5 | * @date 2021 2021/8/15 9:58 下午 6 | */ 7 | public class TimeSeries { 8 | 9 | private Long time; 10 | 11 | private String value; 12 | 13 | public TimeSeries() { 14 | } 15 | 16 | public TimeSeries(Long time, String value) { 17 | this.time = time; 18 | this.value = value; 19 | } 20 | 21 | public String getValue() { 22 | return value; 23 | } 24 | 25 | public void setValue(String value) { 26 | this.value = value; 27 | } 28 | 29 | public Long getTime() { 30 | return time; 31 | } 32 | 33 | public void setTime(Long time) { 34 | this.time = time; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /femas-admin/src/main/java/com/tencent/tsf/femas/entity/metrix/model/ServiceMetricModel.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.entity.metrix.model; 2 | 3 | import com.tencent.tsf.femas.common.entity.Service; 4 | import java.util.List; 5 | 6 | /** 7 | * @author Cody 8 | * @date 2021 2021/8/15 9:53 下午 9 | */ 10 | public class ServiceMetricModel { 11 | 12 | private List services; 13 | 14 | public List getServices() { 15 | return services; 16 | } 17 | 18 | public void setServices(List services) { 19 | this.services = services; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /femas-admin/src/main/java/com/tencent/tsf/femas/entity/metrix/prom/PromDataInfo.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.entity.metrix.prom; 2 | 3 | import java.util.List; 4 | 5 | /** 6 | * @author Cody 7 | * @date 2021 2021/8/12 11:04 上午 8 | */ 9 | public class PromDataInfo { 10 | 11 | /** 12 | * "matrix" | "vector" | "scalar" | "string" 13 | */ 14 | private String resultType; 15 | 16 | private List result; 17 | 18 | public String getResultType() { 19 | return resultType; 20 | } 21 | 22 | public void setResultType(String resultType) { 23 | this.resultType = resultType; 24 | } 25 | 26 | public List getResult() { 27 | return result; 28 | } 29 | 30 | public void setResult(List result) { 31 | this.result = result; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /femas-admin/src/main/java/com/tencent/tsf/femas/entity/namespace/NamespaceIdModel.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.entity.namespace; 2 | 3 | public class NamespaceIdModel { 4 | 5 | private String namespaceId; 6 | 7 | public String getNamespaceId() { 8 | return namespaceId; 9 | } 10 | 11 | public void setNamespaceId(String namespaceId) { 12 | this.namespaceId = namespaceId; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /femas-admin/src/main/java/com/tencent/tsf/femas/entity/namespace/NamespacePageModel.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.entity.namespace; 2 | 3 | import com.tencent.tsf.femas.entity.Page; 4 | import io.swagger.annotations.ApiModelProperty; 5 | 6 | public class NamespacePageModel extends Page { 7 | 8 | @ApiModelProperty("注册中中心id") 9 | private String registryId; 10 | 11 | @ApiModelProperty("命名空间名称、id过滤") 12 | private String name; 13 | 14 | public String getName() { 15 | return name; 16 | } 17 | 18 | public void setName(String name) { 19 | this.name = name; 20 | } 21 | 22 | public String getRegistryId() { 23 | return registryId; 24 | } 25 | 26 | public void setRegistryId(String registryId) { 27 | this.registryId = registryId; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /femas-admin/src/main/java/com/tencent/tsf/femas/entity/pass/circuitbreaker/FemasCircuitBreakerIsolationLevelEnum.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.entity.pass.circuitbreaker; 2 | 3 | /** 4 | * 熔断级别 5 | * 6 | * @author zhixinzxliu 7 | */ 8 | public enum FemasCircuitBreakerIsolationLevelEnum { 9 | // 服务级别熔断 10 | SERVICE, 11 | 12 | // API级别熔断 13 | API, 14 | 15 | // 实例级别熔断 16 | INSTANCE 17 | } 18 | -------------------------------------------------------------------------------- /femas-admin/src/main/java/com/tencent/tsf/femas/entity/registry/RegistryConfigModel.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.entity.registry; 2 | 3 | import io.swagger.annotations.ApiModelProperty; 4 | 5 | public class RegistryConfigModel { 6 | 7 | @ApiModelProperty("注册中心状态 1:运行中 2:异常") 8 | private Integer status; 9 | 10 | @ApiModelProperty("实例数") 11 | private Integer instanceCount; 12 | 13 | public Integer getInstanceCount() { 14 | return instanceCount; 15 | } 16 | 17 | public void setInstanceCount(Integer instanceCount) { 18 | this.instanceCount = instanceCount; 19 | } 20 | 21 | public Integer getStatus() { 22 | return status; 23 | } 24 | 25 | public void setStatus(Integer status) { 26 | this.status = status; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /femas-admin/src/main/java/com/tencent/tsf/femas/entity/registry/RegistryIdModel.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.entity.registry; 2 | 3 | public class RegistryIdModel { 4 | 5 | private String registryId; 6 | 7 | public String getRegistryId() { 8 | return registryId; 9 | } 10 | 11 | public void setRegistryId(String registryId) { 12 | this.registryId = registryId; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /femas-admin/src/main/java/com/tencent/tsf/femas/entity/registry/RegistrySearch.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.entity.registry; 2 | 3 | import io.swagger.annotations.ApiModelProperty; 4 | 5 | public class RegistrySearch { 6 | 7 | @ApiModelProperty(value = "注册中心类型,ex:consul") 8 | private String registryType; 9 | 10 | @ApiModelProperty("注册中心状态 1:运行中 2:异常") 11 | private String status; 12 | 13 | public String getRegistryType() { 14 | return registryType; 15 | } 16 | 17 | public void setRegistryType(String registryType) { 18 | this.registryType = registryType; 19 | } 20 | 21 | public String getStatus() { 22 | return status; 23 | } 24 | 25 | public void setStatus(String status) { 26 | this.status = status; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /femas-admin/src/main/java/com/tencent/tsf/femas/entity/registry/RegistryStatus.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.entity.registry; 2 | 3 | public enum RegistryStatus { 4 | 5 | RUNNING(1, "运行中"), 6 | DOWN(2, "异常"); 7 | Integer code; 8 | String status; 9 | 10 | RegistryStatus(Integer code, String status) { 11 | this.code = code; 12 | this.status = status; 13 | } 14 | 15 | public Integer getCode() { 16 | return code; 17 | } 18 | 19 | public void setCode(Integer code) { 20 | this.code = code; 21 | } 22 | 23 | public String getStatus() { 24 | return status; 25 | } 26 | 27 | public void setStatus(String status) { 28 | this.status = status; 29 | } 30 | } -------------------------------------------------------------------------------- /femas-admin/src/main/java/com/tencent/tsf/femas/entity/registry/eureka/EurekaService.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.entity.registry.eureka; 2 | 3 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 4 | import java.util.List; 5 | 6 | /** 7 | * @author Leo 8 | */ 9 | @JsonIgnoreProperties(ignoreUnknown = true) 10 | public class EurekaService { 11 | 12 | private String name; 13 | 14 | private List instance; 15 | 16 | public String getName() { 17 | return name; 18 | } 19 | 20 | public void setName(String name) { 21 | this.name = name; 22 | } 23 | 24 | public List getInstance() { 25 | return instance; 26 | } 27 | 28 | public void setInstance(List instance) { 29 | this.instance = instance; 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /femas-admin/src/main/java/com/tencent/tsf/femas/entity/rocks/RocksModel.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.entity.rocks; 2 | 3 | public class RocksModel { 4 | 5 | private String key; 6 | 7 | private String value; 8 | 9 | public String getKey() { 10 | return key; 11 | } 12 | 13 | public void setKey(String key) { 14 | this.key = key; 15 | } 16 | 17 | public String getValue() { 18 | return value; 19 | } 20 | 21 | public void setValue(String value) { 22 | this.value = value; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /femas-admin/src/main/java/com/tencent/tsf/femas/entity/rule/DestTag.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.entity.rule; 2 | 3 | import io.swagger.annotations.ApiModelProperty; 4 | 5 | public class DestTag { 6 | 7 | @ApiModelProperty("服务版本") 8 | private String serviceVersion; 9 | @ApiModelProperty("权重") 10 | private Integer weight; 11 | 12 | public String getServiceVersion() { 13 | return serviceVersion; 14 | } 15 | 16 | public void setServiceVersion(String serviceVersion) { 17 | this.serviceVersion = serviceVersion; 18 | } 19 | 20 | public Integer getWeight() { 21 | return weight; 22 | } 23 | 24 | public void setWeight(Integer weight) { 25 | this.weight = weight; 26 | } 27 | } -------------------------------------------------------------------------------- /femas-admin/src/main/java/com/tencent/tsf/femas/entity/rule/FemasEventDataPair.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.entity.rule; 2 | 3 | public class FemasEventDataPair { 4 | 5 | private String key; 6 | private String value; 7 | 8 | public FemasEventDataPair(String key, String value) { 9 | this.key = key; 10 | this.value = value; 11 | } 12 | 13 | public FemasEventDataPair() { 14 | } 15 | 16 | public String getKey() { 17 | return key; 18 | } 19 | 20 | public void setKey(String key) { 21 | this.key = key; 22 | } 23 | 24 | public String getValue() { 25 | return value; 26 | } 27 | 28 | public void setValue(String value) { 29 | this.value = value; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /femas-admin/src/main/java/com/tencent/tsf/femas/entity/rule/FemasEventList.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.entity.rule; 2 | 3 | import java.util.List; 4 | 5 | public class FemasEventList { 6 | 7 | List eventData; 8 | 9 | public List getEventData() { 10 | return eventData; 11 | } 12 | 13 | public void setEventData(List eventData) { 14 | this.eventData = eventData; 15 | } 16 | 17 | @Override 18 | public String toString() { 19 | return "FemasEventList{" + 20 | "eventData=" + eventData + 21 | '}'; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /femas-admin/src/main/java/com/tencent/tsf/femas/entity/rule/ServiceSearch.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.entity.rule; 2 | 3 | import io.swagger.annotations.ApiModelProperty; 4 | 5 | public class ServiceSearch { 6 | 7 | @ApiModelProperty("命名空间id") 8 | private String namespaceId; 9 | 10 | @ApiModelProperty("服务名称") 11 | private String serviceName; 12 | 13 | public String getNamespaceId() { 14 | return namespaceId; 15 | } 16 | 17 | public void setNamespaceId(String namespaceId) { 18 | this.namespaceId = namespaceId; 19 | } 20 | 21 | public String getServiceName() { 22 | return serviceName; 23 | } 24 | 25 | public void setServiceName(String serviceName) { 26 | this.serviceName = serviceName; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /femas-admin/src/main/java/com/tencent/tsf/femas/entity/rule/auth/AuthRuleModel.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.entity.rule.auth; 2 | 3 | import com.tencent.tsf.femas.entity.ServiceModel; 4 | import io.swagger.annotations.ApiModelProperty; 5 | 6 | /** 7 | * @author Cody 8 | * @date 2021 2021/9/23 7:35 下午 9 | */ 10 | public class AuthRuleModel extends ServiceModel { 11 | 12 | @ApiModelProperty("规则名搜索") 13 | private String keyword; 14 | 15 | public String getKeyword() { 16 | return keyword; 17 | } 18 | 19 | public void setKeyword(String keyword) { 20 | this.keyword = keyword; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /femas-admin/src/main/java/com/tencent/tsf/femas/entity/rule/auth/RuleTypeEnum.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.entity.rule.auth; 2 | 3 | 4 | public enum RuleTypeEnum { 5 | 6 | /** 7 | * 关闭状态 8 | */ 9 | CLOSE, 10 | 11 | /** 12 | * 白名单 13 | */ 14 | WHITE, 15 | 16 | /** 17 | * 黑名单 18 | */ 19 | BLACK, 20 | 21 | } 22 | -------------------------------------------------------------------------------- /femas-admin/src/main/java/com/tencent/tsf/femas/entity/rule/lane/GrayTypeEnum.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.entity.rule.lane; 2 | 3 | /** 4 | * @Author: cody 5 | * @Date: 2022/8/21 6 | * @Descriptioin 7 | */ 8 | public enum GrayTypeEnum { 9 | 10 | /** 11 | * 蓝绿 12 | */ 13 | TAG, 14 | /** 15 | * 金丝雀 16 | */ 17 | CANARY, 18 | } 19 | -------------------------------------------------------------------------------- /femas-admin/src/main/java/com/tencent/tsf/femas/entity/rule/lane/PriorityModel.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.entity.rule.lane; 2 | 3 | /** 4 | * @Author: cody 5 | * @Date: 2022/9/4 6 | * @Descriptioin 7 | */ 8 | public class PriorityModel { 9 | 10 | String laneId; 11 | 12 | String targetLaneId; 13 | 14 | 15 | public String getLaneId() { 16 | return laneId; 17 | } 18 | 19 | public void setLaneId(String laneId) { 20 | this.laneId = laneId; 21 | } 22 | 23 | 24 | public String getTargetLaneId() { 25 | return targetLaneId; 26 | } 27 | 28 | public void setTargetLaneId(String targetLaneId) { 29 | this.targetLaneId = targetLaneId; 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /femas-admin/src/main/java/com/tencent/tsf/femas/entity/rule/lane/RuleTagRelationship.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.entity.rule.lane; 2 | 3 | /** 4 | * @Author: cody 5 | * @Date: 2022/7/26 6 | * @Descriptioin 7 | */ 8 | public enum RuleTagRelationship { 9 | /** 10 | * 与 11 | */ 12 | RELEATION_AND, 13 | 14 | /** 15 | * 或 16 | */ 17 | RELEATION_OR; 18 | } 19 | -------------------------------------------------------------------------------- /femas-admin/src/main/java/com/tencent/tsf/femas/entity/service/EventTypeEnum.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.entity.service; 2 | 3 | 4 | public enum EventTypeEnum { 5 | 6 | 7 | /** 8 | * 熔断事件 9 | */ 10 | CIRCUITBREAKER("熔断事件"), 11 | 12 | /** 13 | * 限流事件 14 | */ 15 | RATELIMIT("限流事件"), 16 | 17 | /** 18 | * 鉴权事件 19 | */ 20 | AUTH("鉴权事件"), 21 | 22 | /** 23 | * 路由事件 24 | */ 25 | ROUTER("路由事件"); 26 | 27 | public String name; 28 | 29 | EventTypeEnum(String name) { 30 | this.name = name; 31 | } 32 | 33 | public String getName() { 34 | return name; 35 | } 36 | 37 | public void setName(String name) { 38 | this.name = name; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /femas-admin/src/main/java/com/tencent/tsf/femas/enums/LogModuleEnum.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.enums; 2 | 3 | /** 4 | * 日志根据模块查询枚举 5 | */ 6 | public enum LogModuleEnum { 7 | 8 | 9 | NAMESPACE("命名空间"), 10 | 11 | REGISTRY("注册中心"), 12 | 13 | AUTH("服务鉴权"), 14 | 15 | BREAKER("服务熔断"), 16 | 17 | LIMIT("服务限流"), 18 | 19 | ROUTE("服务路由"); 20 | 21 | private String name; 22 | 23 | LogModuleEnum(String name) { 24 | this.name = name; 25 | } 26 | 27 | public String getName() { 28 | return name; 29 | } 30 | 31 | public void setName(String name) { 32 | this.name = name; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /femas-admin/src/main/java/com/tencent/tsf/femas/event/ConfigDataChangedListener.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.event; 2 | 3 | /** 4 | * @author mroccyen 5 | */ 6 | public interface ConfigDataChangedListener { 7 | /** 8 | * 配置数据变更监听器 9 | * 10 | * @param key 配置的key 11 | * @param updateData 更新的数据 12 | */ 13 | default void onChanged(String key, String updateData) { 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /femas-admin/src/main/java/com/tencent/tsf/femas/event/ConfigUpdateEvent.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.event; 2 | 3 | import org.springframework.context.ApplicationEvent; 4 | 5 | /** 6 | * @Author leoziltong 7 | * @Description //TODO 8 | * @Date: 2021/4/16 17:14 9 | * @Version 1.0 10 | */ 11 | public class ConfigUpdateEvent extends ApplicationEvent { 12 | 13 | private final String key; 14 | 15 | public ConfigUpdateEvent(String key, String updateData) { 16 | super(updateData); 17 | this.key = key; 18 | } 19 | 20 | @Override 21 | public String getSource() { 22 | return (String) super.getSource(); 23 | } 24 | 25 | public String getKey() { 26 | return key; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /femas-admin/src/main/java/com/tencent/tsf/femas/service/MetricService.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.service; 2 | 3 | import com.tencent.tsf.femas.common.util.Result; 4 | import com.tencent.tsf.femas.entity.metrix.model.MetricModel; 5 | import com.tencent.tsf.femas.entity.metrix.view.RateLimitMetricVo; 6 | import com.tencent.tsf.femas.entity.metrix.view.RouteMetricVo; 7 | 8 | 9 | /** 10 | * @author Cody 11 | * @date 2021 2021/8/15 5:58 下午 12 | */ 13 | public interface MetricService { 14 | 15 | /** 16 | * 限流指标统计 17 | * 18 | * @return 19 | */ 20 | Result fetchRateLimitMetric(MetricModel metricModel); 21 | 22 | /** 23 | * 路由指标统计 24 | * 25 | * @param metricModel 26 | * @return 27 | */ 28 | Result fetchRouteMetric(MetricModel metricModel); 29 | } 30 | -------------------------------------------------------------------------------- /femas-admin/src/main/java/com/tencent/tsf/femas/storage/rocksdb/Lifecycle.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.storage.rocksdb; 2 | 3 | /** 4 | * @Author leoziltong 5 | * @Date: 2021/4/19 17:19 6 | * @Version 1.0 7 | */ 8 | public interface Lifecycle { 9 | 10 | /** 11 | * 根据配置初始化配置 12 | * 13 | * @param conf 14 | * @throws Exception 15 | */ 16 | void init(final T conf) throws Exception; 17 | 18 | /** 19 | * 释放资源 20 | * 21 | * @throws Exception 22 | */ 23 | void close() throws Exception; 24 | 25 | } 26 | -------------------------------------------------------------------------------- /femas-admin/src/main/java/com/tencent/tsf/femas/util/EnvUtil.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.util; 2 | 3 | import com.tencent.tsf.femas.common.util.StringUtils; 4 | import com.tencent.tsf.femas.constant.AdminConstants; 5 | 6 | /** 7 | * @author Cody 8 | * @date 2021 2021/9/26 11:12 上午 9 | */ 10 | public class EnvUtil { 11 | 12 | // 获取路由前缀 13 | public static String getFemasPrefix() { 14 | String FEMAS_BASE_PATH = System.getProperty(AdminConstants.FEMAS_BASE_PATH); 15 | if (FEMAS_BASE_PATH == null) { 16 | FEMAS_BASE_PATH = ""; 17 | } 18 | if (!StringUtils.isEmpty(FEMAS_BASE_PATH) && FEMAS_BASE_PATH.charAt(0) != '/') { 19 | FEMAS_BASE_PATH = '/' + FEMAS_BASE_PATH; 20 | } 21 | return FEMAS_BASE_PATH; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /femas-admin/src/main/java/com/tencent/tsf/femas/util/ResultCheck.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.util; 2 | 3 | /** 4 | * @author Cody 5 | * @date 2021 2021/7/29 11:01 上午 6 | */ 7 | public class ResultCheck { 8 | 9 | private static int CONFIGURE_CHECK_SUCCESS_COUNT = 1; 10 | 11 | public static boolean checkCount(int optionCount) { 12 | if (optionCount == CONFIGURE_CHECK_SUCCESS_COUNT) { 13 | return true; 14 | } else { 15 | return false; 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /femas-admin/src/main/resources/META-INF/spring.factories: -------------------------------------------------------------------------------- 1 | org.springframework.boot.SpringApplicationRunListener=\ 2 | com.tencent.tsf.femas.listener.SpringBootStartListener 3 | -------------------------------------------------------------------------------- /femas-admin/src/main/resources/banner.txt: -------------------------------------------------------------------------------- 1 | 2 | _____ 3 | _/ ____\____ _____ _____ ______ 4 | \ __\/ __ \ / \\__ \ / ___/ 5 | | | \ ___/| Y Y \/ __ \_\___ \ 6 | |__| \___ >__|_| (____ /____ > 7 | \/ \/ \/ \/ 8 | 9 | Femas ${application.version} starting ... 10 | Use ${dbType} memory 11 | Pid: ${pid} 12 | Web Console: http://${local.ip}:${server.port}/ 13 | Website: http://femas.io 14 | 15 | -------------------------------------------------------------------------------- /femas-admin/src/main/resources/static/icon/config-hover.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | -------------------------------------------------------------------------------- /femas-admin/src/main/resources/static/icon/config.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | -------------------------------------------------------------------------------- /femas-admin/src/main/resources/static/icon/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TencentFemas/femas/e5c4bd68683a0989697da21a75b957534258390a/femas-admin/src/main/resources/static/icon/favicon.ico -------------------------------------------------------------------------------- /femas-admin/src/main/resources/static/icon/favicon_bac.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TencentFemas/femas/e5c4bd68683a0989697da21a75b957534258390a/femas-admin/src/main/resources/static/icon/favicon_bac.ico -------------------------------------------------------------------------------- /femas-admin/src/main/resources/static/icon/log-hover.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | -------------------------------------------------------------------------------- /femas-admin/src/main/resources/static/icon/log.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | -------------------------------------------------------------------------------- /femas-admin/src/main/resources/static/icon/monitor-hover.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | -------------------------------------------------------------------------------- /femas-admin/src/main/resources/static/icon/monitor.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | -------------------------------------------------------------------------------- /femas-admin/src/main/resources/static/icon/publish-hover.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /femas-admin/src/main/resources/static/icon/publish.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /femas-admin/src/main/resources/static/images/login-bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TencentFemas/femas/e5c4bd68683a0989697da21a75b957534258390a/femas-admin/src/main/resources/static/images/login-bg.png -------------------------------------------------------------------------------- /femas-admin/src/main/resources/static/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Femas 8 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | -------------------------------------------------------------------------------- /femas-admin/src/main/resources/static/sct/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | "@babel/preset-env", 4 | "@babel/preset-react", 5 | "@babel/preset-typescript" 6 | ] 7 | } 8 | -------------------------------------------------------------------------------- /femas-admin/src/main/resources/static/sct/README.md: -------------------------------------------------------------------------------- 1 | # Atom Console Web UI 2 | > Atom 控制台 WebUI 构建结果会打包到 ***atom-console*** 模块中 3 | 4 | ## 前端框架选型 5 | 6 | - [React](https://reactjs.org/) 7 | - [tea-components](https://tea-design.github.io/component) 8 | - [Redux](https://redux.js.org/) 9 | - [Redux-saga](https://redux-saga.js.org/) 10 | - [Saga-duck](https://cyrilluce.gitbook.io/saga-duck/) 11 | 12 | 13 | -------------------------------------------------------------------------------- /femas-admin/src/main/resources/static/sct/build/webpack.prod.conf.js: -------------------------------------------------------------------------------- 1 | const base = require('./webpack.base.conf'); 2 | const UglifyJsPlugin = require('uglifyjs-webpack-plugin'); 3 | const {CleanWebpackPlugin} = require('clean-webpack-plugin'); 4 | const MiniCssExtractPlugin = require('mini-css-extract-plugin'); 5 | 6 | module.exports = Object.assign({}, base, { 7 | optimization: { 8 | minimizer: [ 9 | new UglifyJsPlugin({ 10 | cache: true, 11 | parallel: true, 12 | sourceMap: true, 13 | }), 14 | ], 15 | }, 16 | plugins: [ 17 | new CleanWebpackPlugin(), 18 | new MiniCssExtractPlugin({ 19 | filename: `./css/sct.css`, 20 | }), 21 | ...base.plugins, 22 | ], 23 | mode: 'production', 24 | }); 25 | -------------------------------------------------------------------------------- /femas-admin/src/main/resources/static/sct/src/app/apm/model.ts: -------------------------------------------------------------------------------- 1 | import { apiRequest, APIRequestOption } from '@src/common/util/apiRequest'; 2 | 3 | export async function metricRequest(options: APIRequestOption) { 4 | const res = await apiRequest({ 5 | ...options, 6 | serviceType: 'metric', 7 | }); 8 | return res; 9 | } 10 | 11 | export async function fetchMetricGrafanaAddress() { 12 | return metricRequest({ 13 | action: 'fetchMetricGrafanaAddress', 14 | data: {}, 15 | }); 16 | } 17 | -------------------------------------------------------------------------------- /femas-admin/src/main/resources/static/sct/src/app/apm/requestDetail/DynamicSubGridDuck.ts: -------------------------------------------------------------------------------- 1 | import DynamicDuck from '@src/common/ducks/DynamicDuck'; 2 | import DetailGridDuck from './detail/DetailGridDuck'; 3 | 4 | export default class DynamicSubGridDuck extends DynamicDuck { 5 | get ProtoDuck() { 6 | return DetailGridDuck; 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /femas-admin/src/main/resources/static/sct/src/app/apm/topology/model.ts: -------------------------------------------------------------------------------- 1 | import { traceRequest } from '@src/app/trace/model'; 2 | import { changeLetterLowCase } from '@src/common/util/common'; 3 | import moment from 'moment'; 4 | 5 | export async function getTopologyGraph(params) { 6 | const { startTime, endTime, namespaceId } = params; 7 | if (!startTime || !endTime || !namespaceId) { 8 | return []; 9 | } 10 | const result = await traceRequest({ 11 | action: 'describeServiceTopology', 12 | data: { 13 | namespaceId, 14 | queryDuration: { 15 | start: moment(startTime).valueOf(), 16 | end: moment(endTime).valueOf(), 17 | }, 18 | }, 19 | }); 20 | return changeLetterLowCase(result); 21 | } 22 | -------------------------------------------------------------------------------- /femas-admin/src/main/resources/static/sct/src/app/config/detail/index.ts: -------------------------------------------------------------------------------- 1 | import { connectWithDuck } from '@src/common/helpers/'; 2 | import DetailPage from './Page'; 3 | import DetailPageDuck from './PageDuck'; 4 | 5 | export default connectWithDuck(DetailPage, DetailPageDuck); 6 | -------------------------------------------------------------------------------- /femas-admin/src/main/resources/static/sct/src/app/config/detail/types.ts: -------------------------------------------------------------------------------- 1 | export enum TAB { 2 | BaseInfo = 'baseinfo', 3 | Version = 'version', 4 | } 5 | 6 | export const TAB_LABLES = { 7 | [TAB.BaseInfo]: '基本信息', 8 | [TAB.Version]: '配置版本', 9 | }; 10 | 11 | export interface ComposedId { 12 | namespaceId: string; 13 | configId: string; 14 | } 15 | -------------------------------------------------------------------------------- /femas-admin/src/main/resources/static/sct/src/app/config/index.ts: -------------------------------------------------------------------------------- 1 | import { connectWithDuck } from 'saga-duck'; 2 | import ConfigPage from './Page'; 3 | import ConfigPageDuck from './PageDuck'; 4 | 5 | export default connectWithDuck(ConfigPage, ConfigPageDuck); 6 | -------------------------------------------------------------------------------- /femas-admin/src/main/resources/static/sct/src/app/config/operations/create/index.ts: -------------------------------------------------------------------------------- 1 | import { showDialog } from '@src/common/helpers/showDialog'; 2 | import Create from './Create'; 3 | import CreateDuck, { DialogOptions, Values } from './CreateDuck'; 4 | 5 | export default function create(instance: Values, options: DialogOptions) { 6 | return new Promise(resolve => { 7 | showDialog(Create, CreateDuck, function*(duck: CreateDuck) { 8 | try { 9 | resolve(yield* duck.execute(instance, options)); 10 | } finally { 11 | resolve(false); 12 | } 13 | }); 14 | }); 15 | } 16 | -------------------------------------------------------------------------------- /femas-admin/src/main/resources/static/sct/src/app/config/operations/modifyDesc/index.ts: -------------------------------------------------------------------------------- 1 | import { showDialog } from '@src/common/helpers/showDialog'; 2 | import Page from './Page'; 3 | import PageDuck, { DialogOptions, Values } from './PageDuck'; 4 | 5 | export default function create(instance: Values, options: DialogOptions) { 6 | return new Promise(resolve => { 7 | showDialog(Page, PageDuck, function*(duck: PageDuck) { 8 | try { 9 | resolve(yield* duck.execute(instance, options)); 10 | } finally { 11 | resolve(false); 12 | } 13 | }); 14 | }); 15 | } 16 | -------------------------------------------------------------------------------- /femas-admin/src/main/resources/static/sct/src/app/namespace/index.ts: -------------------------------------------------------------------------------- 1 | import { connectWithDuck } from '@src/common/helpers'; 2 | import NamespacePage from './Page'; 3 | import NamespacePageDuck from './PageDuck'; 4 | 5 | export default connectWithDuck(NamespacePage, NamespacePageDuck); 6 | -------------------------------------------------------------------------------- /femas-admin/src/main/resources/static/sct/src/app/namespace/operations/create/index.ts: -------------------------------------------------------------------------------- 1 | import { showDialog } from '@src/common/helpers/showDialog'; 2 | import Create from './Create'; 3 | import CreateDuck, { DialogOptions, Values } from './CreateDuck'; 4 | 5 | export default function create(instance: Values, options: DialogOptions) { 6 | return new Promise(resolve => { 7 | showDialog(Create, CreateDuck, function*(duck: CreateDuck) { 8 | try { 9 | resolve(yield* duck.execute(instance, options)); 10 | } finally { 11 | resolve(false); 12 | } 13 | }); 14 | }); 15 | } 16 | -------------------------------------------------------------------------------- /femas-admin/src/main/resources/static/sct/src/app/namespace/operations/remove.tsx: -------------------------------------------------------------------------------- 1 | import { NamespaceItem } from '../types'; 2 | import { Modal } from 'tea-component'; 3 | import { deleteNamespace } from '../model'; 4 | 5 | export default async function remove(instance: NamespaceItem): Promise { 6 | let successed = false; 7 | await Modal.confirm({ 8 | message: '确认删除当前所选命名空间?', 9 | description: `命名空间删除后,该命名空间(${instance.name})下的所有配置将会被清空,且无法恢复。`, 10 | okText: '删除', 11 | cancelText: '取消', 12 | onOk: async () => { 13 | try { 14 | await deleteNamespace({ 15 | namespaceId: instance.namespaceId, 16 | }); 17 | successed = true; 18 | } catch (e) {} 19 | }, 20 | }); 21 | 22 | return successed; 23 | } 24 | -------------------------------------------------------------------------------- /femas-admin/src/main/resources/static/sct/src/app/namespace/types.ts: -------------------------------------------------------------------------------- 1 | import { RegistryItem } from './../registry/types'; 2 | 3 | export interface NamespaceItem { 4 | id: string; 5 | desc: string; 6 | name: string; 7 | namespaceId: string; 8 | registry: Array; 9 | registryId: string; 10 | serviceCount: number; 11 | } 12 | -------------------------------------------------------------------------------- /femas-admin/src/main/resources/static/sct/src/app/operation/index.ts: -------------------------------------------------------------------------------- 1 | import { connectWithDuck } from '@src/common/helpers'; 2 | import OperationPage from './Page'; 3 | import OperationDuck from './PageDuck'; 4 | 5 | export default connectWithDuck(OperationPage, OperationDuck); 6 | -------------------------------------------------------------------------------- /femas-admin/src/main/resources/static/sct/src/app/operation/types.ts: -------------------------------------------------------------------------------- 1 | export interface OperationItem { 2 | id: string; 3 | detail: string; 4 | module: string; 5 | status: boolean; 6 | time: number; 7 | type: string; 8 | user: string; 9 | } 10 | -------------------------------------------------------------------------------- /femas-admin/src/main/resources/static/sct/src/app/publish/index.ts: -------------------------------------------------------------------------------- 1 | import { connectWithDuck } from "saga-duck"; 2 | import PublishPage from "./Page"; 3 | import PublishPageDuck from "./PageDuck"; 4 | 5 | export default connectWithDuck(PublishPage, PublishPageDuck); 6 | -------------------------------------------------------------------------------- /femas-admin/src/main/resources/static/sct/src/app/publish/lane/detail/index.ts: -------------------------------------------------------------------------------- 1 | import { connectWithDuck } from "@src/common/helpers/"; 2 | import LaneDetailPage from "./Page"; 3 | import LaneDetailDuck from "./PageDuck"; 4 | 5 | export default connectWithDuck(LaneDetailPage, LaneDetailDuck); 6 | -------------------------------------------------------------------------------- /femas-admin/src/main/resources/static/sct/src/app/publish/lane/detail/types.ts: -------------------------------------------------------------------------------- 1 | export enum TAB { 2 | GROUP = "group", 3 | MOMITOR = "monitor", 4 | } 5 | 6 | export const TAB_LABLES = { 7 | [TAB.GROUP]: "部署组管理", 8 | [TAB.MOMITOR]: "泳道监控", 9 | }; 10 | -------------------------------------------------------------------------------- /femas-admin/src/main/resources/static/sct/src/app/publish/lane/index.ts: -------------------------------------------------------------------------------- 1 | import { connectWithDuck } from "saga-duck"; 2 | import LaneRulePage from "./Page"; 3 | import LaneRulePageDuck from "./PageDuck"; 4 | 5 | export default connectWithDuck(LaneRulePage, LaneRulePageDuck); 6 | -------------------------------------------------------------------------------- /femas-admin/src/main/resources/static/sct/src/app/publish/lane/operations/create/index.ts: -------------------------------------------------------------------------------- 1 | import { showDialog } from "@src/common/helpers/showDialog"; 2 | import CreateDuck, { DialogOptions } from "./CreateDuck"; 3 | import Create from "./Create"; 4 | import { LaneItem } from "../../types"; 5 | 6 | export default function create(instance: LaneItem, options: DialogOptions) { 7 | return new Promise((resolve) => { 8 | showDialog(Create, CreateDuck, function*(duck: CreateDuck) { 9 | try { 10 | resolve(yield* duck.execute(instance, options)); 11 | } finally { 12 | resolve(false); 13 | } 14 | }); 15 | }); 16 | } 17 | -------------------------------------------------------------------------------- /femas-admin/src/main/resources/static/sct/src/app/publish/lane/operations/create/types.ts: -------------------------------------------------------------------------------- 1 | // TODO 2 | export enum STEPS { 3 | BASE = "base", 4 | NAMESPACE = "namespace", 5 | } 6 | export const STEPS_LABLES = { 7 | [STEPS.BASE]: "基本配置", 8 | [STEPS.NAMESPACE]: "部署组配置", 9 | }; 10 | -------------------------------------------------------------------------------- /femas-admin/src/main/resources/static/sct/src/app/publish/lane/operations/goupInfo/deploy/index.ts: -------------------------------------------------------------------------------- 1 | import { connectWithDuck } from "saga-duck"; 2 | import Deploy from "./Deploy"; 3 | import DeployDuck from "./DeployDuck"; 4 | 5 | export default connectWithDuck(Deploy, DeployDuck); 6 | -------------------------------------------------------------------------------- /femas-admin/src/main/resources/static/sct/src/app/publish/lane/operations/goupInfo/deploy/type.ts: -------------------------------------------------------------------------------- 1 | export interface ServiceInfo { 2 | entrance: boolean; 3 | namespaceId: string; 4 | namespaceName: string; 5 | serviceName: string; 6 | version: string; 7 | } 8 | -------------------------------------------------------------------------------- /femas-admin/src/main/resources/static/sct/src/app/publish/lane/operations/goupInfo/index.ts: -------------------------------------------------------------------------------- 1 | import { purify, DuckCmpProps } from "saga-duck"; 2 | import CreateDuck, { DialogOptions } from "../create/CreateDuck"; 3 | import { LaneItem } from "../../types"; 4 | import { showDialog } from "@src/common/helpers/showDialog"; 5 | import { GroupInfo } from "./GoupInfo"; 6 | 7 | export function create(instance: LaneItem, options: DialogOptions) { 8 | return new Promise((resolve) => { 9 | showDialog(GroupInfo, CreateDuck, function*(duck: CreateDuck) { 10 | try { 11 | resolve(yield* duck.execute(instance, options)); 12 | } finally { 13 | resolve(false); 14 | } 15 | }); 16 | }); 17 | } 18 | -------------------------------------------------------------------------------- /femas-admin/src/main/resources/static/sct/src/app/publish/lane/types.ts: -------------------------------------------------------------------------------- 1 | import { ServiceInfo } from "./operations/goupInfo/deploy/type"; 2 | 3 | export interface LaneItem { 4 | laneId: string; 5 | laneName: string; 6 | remark: string; 7 | createTime: number; 8 | updateTime: number; 9 | laneServiceList: Array; 10 | stableServiceList: Array; 11 | } 12 | -------------------------------------------------------------------------------- /femas-admin/src/main/resources/static/sct/src/app/publish/lanerule/detail/index.ts: -------------------------------------------------------------------------------- 1 | import { connectWithDuck } from "@src/common/helpers/"; 2 | import LaneDetailPage from "./Page"; 3 | import LaneDetailDuck from "./PageDuck"; 4 | 5 | export default connectWithDuck(LaneDetailPage, LaneDetailDuck); 6 | -------------------------------------------------------------------------------- /femas-admin/src/main/resources/static/sct/src/app/publish/lanerule/index.ts: -------------------------------------------------------------------------------- 1 | import { connectWithDuck } from "saga-duck"; 2 | import LaneRulePage from "./Page"; 3 | import LaneRulePageDuck from "./PageDuck"; 4 | 5 | export default connectWithDuck(LaneRulePage, LaneRulePageDuck); 6 | -------------------------------------------------------------------------------- /femas-admin/src/main/resources/static/sct/src/app/publish/lanerule/operations/create/types.ts: -------------------------------------------------------------------------------- 1 | export enum STEPS { 2 | BASE = "base", 3 | PARAM = "param", 4 | TARGET = "target", 5 | } 6 | export const STEPS_LABLES = { 7 | [STEPS.BASE]: "基本配置", 8 | [STEPS.PARAM]: "请求参数规则配置", 9 | [STEPS.TARGET]: "发布目的地配置", 10 | }; 11 | -------------------------------------------------------------------------------- /femas-admin/src/main/resources/static/sct/src/app/publish/types.ts: -------------------------------------------------------------------------------- 1 | export enum TAB { 2 | LANERULE = "laneRule", 3 | LANE = "lane", 4 | } 5 | export const TAB_LABLES = { 6 | [TAB.LANERULE]: "灰度发布", 7 | [TAB.LANE]: "泳道配置", 8 | }; 9 | -------------------------------------------------------------------------------- /femas-admin/src/main/resources/static/sct/src/app/registry/detail/index.ts: -------------------------------------------------------------------------------- 1 | import { connectWithDuck } from '@src/common/helpers/'; 2 | import RegistryDetailPage from './Page'; 3 | import RegistryDetailPageDuck from './PageDuck'; 4 | 5 | export default connectWithDuck(RegistryDetailPage, RegistryDetailPageDuck); 6 | -------------------------------------------------------------------------------- /femas-admin/src/main/resources/static/sct/src/app/registry/detail/types.ts: -------------------------------------------------------------------------------- 1 | export enum TAB { 2 | BaseInfo = 'baseinfo', 3 | } 4 | 5 | export const TAB_LABLES = { 6 | [TAB.BaseInfo]: '基本信息', 7 | }; 8 | 9 | export interface ComposedId { 10 | registryId: string; 11 | } 12 | -------------------------------------------------------------------------------- /femas-admin/src/main/resources/static/sct/src/app/registry/index.ts: -------------------------------------------------------------------------------- 1 | import { connectWithDuck } from 'saga-duck'; 2 | import RegistryPage from './Page'; 3 | import RegistryPageDuck from './PageDuck'; 4 | 5 | export default connectWithDuck(RegistryPage, RegistryPageDuck); 6 | -------------------------------------------------------------------------------- /femas-admin/src/main/resources/static/sct/src/app/registry/operations/create/index.ts: -------------------------------------------------------------------------------- 1 | import { showDialog } from '@src/common/helpers/showDialog'; 2 | import Create from './Create'; 3 | import CreateDuck, { DialogOptions, Values } from './CreateDuck'; 4 | 5 | export default function create(instance: Values, options: DialogOptions) { 6 | return new Promise(resolve => { 7 | showDialog(Create, CreateDuck, function*(duck: CreateDuck) { 8 | try { 9 | resolve(yield* duck.execute(instance, options)); 10 | } finally { 11 | resolve(false); 12 | } 13 | }); 14 | }); 15 | } 16 | -------------------------------------------------------------------------------- /femas-admin/src/main/resources/static/sct/src/app/registry/operations/remove.tsx: -------------------------------------------------------------------------------- 1 | import { RegistryItem } from '../types'; 2 | import { Modal } from 'tea-component'; 3 | import { deleteRegistryCluster } from '../model'; 4 | 5 | export default async function remove(instance: RegistryItem): Promise { 6 | let successed = false; 7 | await Modal.confirm({ 8 | message: '确认删除当前所选注册中心?', 9 | description: `注册中心删除后,该注册中心(${instance.registryName})下的所有配置将会被清空,且无法恢复。`, 10 | okText: '删除', 11 | cancelText: '取消', 12 | onOk: async () => { 13 | try { 14 | await deleteRegistryCluster({ 15 | registryId: instance.registryId, 16 | }); 17 | successed = true; 18 | } catch (e) {} 19 | }, 20 | }); 21 | 22 | return successed; 23 | } 24 | -------------------------------------------------------------------------------- /femas-admin/src/main/resources/static/sct/src/app/service/detail/api/types.ts: -------------------------------------------------------------------------------- 1 | export interface InterfaceItem { 2 | id: string; 3 | path: string; 4 | method: string; 5 | status: string; 6 | namespaceId: string; 7 | lastUpdateTime: number; 8 | serviceVersion: string; 9 | } 10 | 11 | export enum STATUS { 12 | UP = '1', 13 | DOWN = '2', 14 | } 15 | 16 | export const STATUS_MAP = { 17 | [STATUS.UP]: '在线', 18 | [STATUS.DOWN]: '离线', 19 | }; 20 | 21 | export const STATUS_THEME_MAP = { 22 | [STATUS.UP]: 'success', 23 | [STATUS.DOWN]: 'danger', 24 | }; 25 | -------------------------------------------------------------------------------- /femas-admin/src/main/resources/static/sct/src/app/service/detail/auth/create/index.ts: -------------------------------------------------------------------------------- 1 | import { connectWithDuck } from '@src/common/helpers/'; 2 | import AuthDetailPage from './Page'; 3 | import AuthDetailPageDuck from './PageDuck'; 4 | 5 | export default connectWithDuck(AuthDetailPage, AuthDetailPageDuck); 6 | -------------------------------------------------------------------------------- /femas-admin/src/main/resources/static/sct/src/app/service/detail/event/types.ts: -------------------------------------------------------------------------------- 1 | export interface EventItem { 2 | id: string; 3 | instanceId: string; 4 | eventType: string; 5 | startTime: number; 6 | endTime: number; 7 | detail: string; 8 | quality: string; 9 | createTime: number; 10 | } 11 | -------------------------------------------------------------------------------- /femas-admin/src/main/resources/static/sct/src/app/service/detail/fuse/create/index.ts: -------------------------------------------------------------------------------- 1 | import { connectWithDuck } from '@src/common/helpers/'; 2 | import FuseCreatePage from './Page'; 3 | import FuseCreatePageDuck from './PageDuck'; 4 | 5 | export default connectWithDuck(FuseCreatePage, FuseCreatePageDuck); 6 | -------------------------------------------------------------------------------- /femas-admin/src/main/resources/static/sct/src/app/service/detail/index.ts: -------------------------------------------------------------------------------- 1 | import { connectWithDuck } from '@src/common/helpers/'; 2 | import ServiceDetailPage from './Page'; 3 | import ServiceDetailPageDuck from './PageDuck'; 4 | 5 | export default connectWithDuck(ServiceDetailPage, ServiceDetailPageDuck); 6 | -------------------------------------------------------------------------------- /femas-admin/src/main/resources/static/sct/src/app/service/detail/limit/create/index.ts: -------------------------------------------------------------------------------- 1 | import { connectWithDuck } from '@src/common/helpers/'; 2 | import LimitDetailPage from './Page'; 3 | import LimitDetailPageDuck from './PageDuck'; 4 | 5 | export default connectWithDuck(LimitDetailPage, LimitDetailPageDuck); 6 | -------------------------------------------------------------------------------- /femas-admin/src/main/resources/static/sct/src/app/service/detail/route/create/DynamicSelectDuck.ts: -------------------------------------------------------------------------------- 1 | import DynamicDuck from '@src/common/ducks/DynamicDuck'; 2 | import VersionSelectDuck from './VersionSelectDuck'; 3 | 4 | export class DynamicVersionSelectDuck extends DynamicDuck { 5 | get ProtoDuck() { 6 | return VersionSelectDuck; 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /femas-admin/src/main/resources/static/sct/src/app/service/detail/route/create/index.ts: -------------------------------------------------------------------------------- 1 | import { connectWithDuck } from '@src/common/helpers/'; 2 | import RouteDetailPage from './Page'; 3 | import RouteDetailPageDuck from './PageDuck'; 4 | 5 | export default connectWithDuck(RouteDetailPage, RouteDetailPageDuck); 6 | -------------------------------------------------------------------------------- /femas-admin/src/main/resources/static/sct/src/app/service/detail/route/create/types.ts: -------------------------------------------------------------------------------- 1 | export enum TARGET_TYPE { 2 | VERSION = 'TSF_PROG_VERSION', 3 | } 4 | 5 | export const TARGET_TYPE_NAME = [{ value: TARGET_TYPE.VERSION, name: '版本号' }]; 6 | 7 | export interface SearchParams { 8 | namespaceId: string; 9 | serviceName: string; 10 | } 11 | -------------------------------------------------------------------------------- /femas-admin/src/main/resources/static/sct/src/app/service/detail/route/create/validator.ts: -------------------------------------------------------------------------------- 1 | import { nameTipMessage } from '@src/common/types'; 2 | 3 | export const validator = { 4 | // eslint-disable-next-line prettier/prettier 5 | ruleName: function (v) { 6 | if (!v) { 7 | return '路由规则名称不能为空。' + nameTipMessage; 8 | } 9 | if (v?.length > 60 || !/^[a-z0-9]([-_a-z0-9]*[a-z0-9])?$/.test(v)) { 10 | return nameTipMessage; 11 | } 12 | }, 13 | }; 14 | -------------------------------------------------------------------------------- /femas-admin/src/main/resources/static/sct/src/app/service/detail/tagTable/DynamicSelectDuck.ts: -------------------------------------------------------------------------------- 1 | import DynamicDuck from '@src/common/ducks/DynamicDuck'; 2 | import SelectDuck from './SelectDuck'; 3 | 4 | export default class DynamicSelectDuck extends DynamicDuck { 5 | get ProtoDuck() { 6 | return SelectDuck; 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /femas-admin/src/main/resources/static/sct/src/app/service/detail/tagTable/cacheableModel.ts: -------------------------------------------------------------------------------- 1 | import { once, ttl } from '@src/common/helpers/cacheable'; 2 | import { fetchAllInterfaceList, fetchAllServiceList } from '../../model'; 3 | import { fetchAllNamespaceList } from '@src/app/namespace/model'; 4 | 5 | export const describeApiList = once(fetchAllInterfaceList, ttl(30 * 1000)); 6 | export const describeNamespaceList = once(fetchAllNamespaceList, ttl(30 * 1000)); 7 | export const describeServiceList = once(fetchAllServiceList, ttl(30 * 1000)); 8 | -------------------------------------------------------------------------------- /femas-admin/src/main/resources/static/sct/src/app/service/detail/types.ts: -------------------------------------------------------------------------------- 1 | export enum TAB { 2 | BaseInfo = 'baseinfo', 3 | Api = 'api', 4 | Event = 'event', 5 | Auth = 'auth', 6 | Limit = 'limit', 7 | Route = 'route', 8 | Fuse = 'fuse', 9 | } 10 | 11 | export const TAB_LABLES = { 12 | [TAB.BaseInfo]: '服务概览', 13 | [TAB.Api]: '接口列表', 14 | [TAB.Auth]: '服务鉴权', 15 | [TAB.Limit]: '服务限流', 16 | [TAB.Route]: '服务路由', 17 | [TAB.Fuse]: '服务熔断', 18 | [TAB.Event]: '服务事件', 19 | }; 20 | 21 | export interface ComposedId { 22 | registryId: string; 23 | serviceName: string; 24 | namespaceId: string; 25 | versions?: Array; 26 | ruleId?: string; 27 | } 28 | -------------------------------------------------------------------------------- /femas-admin/src/main/resources/static/sct/src/app/service/index.ts: -------------------------------------------------------------------------------- 1 | import { connectWithDuck } from 'saga-duck'; 2 | import ServicePage from './Page'; 3 | import ServicePageDuck from './PageDuck'; 4 | 5 | export default connectWithDuck(ServicePage, ServicePageDuck); 6 | -------------------------------------------------------------------------------- /femas-admin/src/main/resources/static/sct/src/app/topology/index.ts: -------------------------------------------------------------------------------- 1 | import { connectWithDuck } from 'saga-duck'; 2 | import Page from './Page'; 3 | import PageDuck from './PageDuck'; 4 | 5 | export default connectWithDuck(Page, PageDuck); 6 | -------------------------------------------------------------------------------- /femas-admin/src/main/resources/static/sct/src/app/trace/index.ts: -------------------------------------------------------------------------------- 1 | import { connectWithDuck } from 'saga-duck'; 2 | import Page from './Page'; 3 | import PageDuck from './PageDuck'; 4 | 5 | export default connectWithDuck(Page, PageDuck); 6 | -------------------------------------------------------------------------------- /femas-admin/src/main/resources/static/sct/src/app/trace/model.ts: -------------------------------------------------------------------------------- 1 | import { apiRequest, APIRequestOption } from '@src/common/util/apiRequest'; 2 | import { Instance } from '../apm/requestDetail/types'; 3 | 4 | export async function traceRequest(options: APIRequestOption) { 5 | const res = await apiRequest({ 6 | ...options, 7 | serviceType: 'trace', 8 | }); 9 | return res; 10 | } 11 | 12 | export async function describeSpans(params) { 13 | const result = await traceRequest<{ 14 | total: number; 15 | traces: Array; 16 | }>({ 17 | action: 'describeBasicTraces', 18 | data: params, 19 | }); 20 | return { 21 | list: result?.traces || [], 22 | totalCount: result?.total || 0, 23 | }; 24 | } 25 | -------------------------------------------------------------------------------- /femas-admin/src/main/resources/static/sct/src/assets/image/login-bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TencentFemas/femas/e5c4bd68683a0989697da21a75b957534258390a/femas-admin/src/main/resources/static/sct/src/assets/image/login-bg.png -------------------------------------------------------------------------------- /femas-admin/src/main/resources/static/sct/src/common/components/WithLoadingTip.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | import { LoadingTip } from 'tea-component'; 3 | import { purify } from 'saga-duck'; 4 | 5 | type WithLoadingTipProps = { 6 | loading: boolean; 7 | children?: JSX.Element; 8 | }; 9 | 10 | class WithLoadingTip extends React.Component> { 11 | render() { 12 | const { loading, children } = this.props; 13 | if (loading) { 14 | return ; 15 | } 16 | return children; 17 | } 18 | } 19 | 20 | export default purify(WithLoadingTip); 21 | -------------------------------------------------------------------------------- /femas-admin/src/main/resources/static/sct/src/common/duckComponents/DispatchProvider.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | import { connect } from 'react-redux'; 3 | import { Dispatch } from 'redux'; 4 | 5 | export interface Props { 6 | dispatch?: Dispatch; 7 | children?: (dispatch: Dispatch) => JSX.Element; 8 | } 9 | 10 | /** 11 | * 用于获取dispatch方法,使得部分逻辑可以移到duck中实现(例如列配置) 12 | * 但需要注意的是,当前的Dialog实现很暴力,可能会有影响,建议谨慎使用 13 | */ 14 | @connect(null, dispatch => ({ dispatch })) 15 | export default class DispatchProvider extends React.Component { 16 | render() { 17 | const props = this.props; 18 | return props.children(props.dispatch); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /femas-admin/src/main/resources/static/sct/src/common/duckComponents/form/CheckboxGroup.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | import { CheckboxGroup, CheckboxGroupProps } from 'tea-component'; 3 | import { FieldAPI } from '../../ducks/Form'; 4 | 5 | interface Props extends Omit { 6 | field: FieldAPI; 7 | } 8 | 9 | // eslint-disable-next-line prettier/prettier 10 | export default function (props: Props) { 11 | const { field, ...rest } = props; 12 | 13 | return ( 14 | { 17 | field.setValue(value); 18 | field.setTouched(); 19 | }} 20 | {...rest} 21 | /> 22 | ); 23 | } 24 | -------------------------------------------------------------------------------- /femas-admin/src/main/resources/static/sct/src/common/duckComponents/form/InputNumber.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | import { FieldAPI } from '../../ducks/Form'; 3 | import { InputNumber as TeaInputNumber, InputNumberProps } from 'tea-component'; 4 | 5 | interface Props extends Omit { 6 | field: FieldAPI; 7 | } 8 | 9 | function InputNumber(props: Props) { 10 | const { field, ...rest } = props; 11 | const value = field.getValue(); 12 | 13 | return ( 14 | { 17 | field.setValue(+value || 0); 18 | field.setTouched(); 19 | }} 20 | {...rest} 21 | /> 22 | ); 23 | } 24 | 25 | InputNumber['defaultLabelAlign'] = 'middle'; 26 | export default InputNumber; 27 | -------------------------------------------------------------------------------- /femas-admin/src/main/resources/static/sct/src/common/duckComponents/form/README.md: -------------------------------------------------------------------------------- 1 | 切换 tea2,表单部分请使用 duckComponents/teaform 下组件,用法如下: 2 | 3 | ```jsx 4 | import { Form } from "@tencent/tea-component"; 5 | import FormField from "../duckComponents/teaform/Field"; 6 | import Input from "../duckComponents/teaform/Input"; 7 |
8 | 9 | 10 | 11 |
; 12 | ``` 13 | 14 | 与旧版对比,有以下差异: 15 | 16 | - 各组件不再包含`form-unit`包装,不再处理校验信息,仅封装对应 tea2 组件的受控属性(value & onChange) 17 | - 校验交由 `teaform/Field` 组件处理,它是 tea2 的 `Form.Item` 封装 18 | 19 | 另为了更灵活使用组件,现在 `FieldAPI` 支持 `map` 属性进行类型转换,这样就可以让数字 FieldAPI 简单用于`Switch`组件上 20 | 21 | ```jsx 22 | !!v, 25 | (v) => (v ? 1 : 0) 26 | )} 27 | /> 28 | ``` 29 | -------------------------------------------------------------------------------- /femas-admin/src/main/resources/static/sct/src/common/duckComponents/form/RadioGroup.tsx: -------------------------------------------------------------------------------- 1 | /* eslint-disable prettier/prettier */ 2 | import * as React from 'react'; 3 | import {RadioGroup, RadioGroupProps} from 'tea-component'; 4 | import {FieldAPI} from '../../ducks/Form'; 5 | 6 | interface Props extends Omit { 7 | field: FieldAPI; 8 | } 9 | 10 | export default function (props: Props) { 11 | const {field, ...rest} = props; 12 | 13 | return ( 14 | { 17 | field.setValue(value); 18 | field.setTouched(); 19 | }} 20 | {...rest} 21 | /> 22 | ); 23 | } 24 | -------------------------------------------------------------------------------- /femas-admin/src/main/resources/static/sct/src/common/ducks/SearchableList.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * 可搜索列表,有以下功能 3 | * 4 | * 1. 关键字搜索/输入自动搜索 5 | * 2. 加载更多 6 | */ 7 | 8 | import Base, { SearchParam as BaseSearchParam } from './AbstractSearchableList'; 9 | 10 | export interface SearchParam extends BaseSearchParam { 11 | keyword?: string; 12 | } 13 | 14 | export default abstract class SearchableSelect extends Base { 15 | LocalParam: string; 16 | 17 | get defaultLocalParam() { 18 | return ''; 19 | } 20 | 21 | getParam(base: this['Param'], local: this['LocalParam'], paging: BaseSearchParam): this['Param'] & SearchParam { 22 | return { 23 | ...base, 24 | ...paging, 25 | keyword: local, 26 | }; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /femas-admin/src/main/resources/static/sct/src/common/ducks/utils/completer/index.ts: -------------------------------------------------------------------------------- 1 | export * from './Base'; 2 | export * from './combine'; 3 | export * from './filter'; 4 | export * from './getBufferUpdate'; 5 | export * from './wrapListUpdate'; 6 | -------------------------------------------------------------------------------- /femas-admin/src/main/resources/static/sct/src/common/ducks/utils/completer/wrapListUpdate.ts: -------------------------------------------------------------------------------- 1 | import { UPDATE } from './Base'; 2 | 3 | /** 4 | * 将列表更新(updateList)包装为UPDATE方法,支持列表更新或按索引更新 5 | * @param updateList 6 | */ 7 | export function wrapListUpdate(updateList: (list: T[]) => any): UPDATE { 8 | return function update(index: number | T[], data?: any) { 9 | if (arguments.length <= 1) { 10 | return updateList(index as T[]); 11 | } else { 12 | const list = []; 13 | list[index as number] = data; 14 | return updateList(list); 15 | } 16 | }; 17 | } 18 | -------------------------------------------------------------------------------- /femas-admin/src/main/resources/static/sct/src/common/helpers/insertCSS.ts: -------------------------------------------------------------------------------- 1 | const prefix = 'dynamic-inserted-css-'; 2 | 3 | /** 4 | * insert css to the current page 5 | * */ 6 | export default function insertCSS(id: string, cssText: string) { 7 | let style: HTMLStyleElement; 8 | style = document.getElementById(prefix + id) as HTMLStyleElement; 9 | if (!style) { 10 | style = document.createElement('style'); 11 | style.id = prefix + id; 12 | 13 | // IE8/9 can not use document.head 14 | document.getElementsByTagName('head')[0].appendChild(style); 15 | } 16 | if (style.textContent !== cssText) { 17 | style.textContent = cssText; 18 | } 19 | return style; 20 | } 21 | -------------------------------------------------------------------------------- /femas-admin/src/main/resources/static/sct/src/common/helpers/log.ts: -------------------------------------------------------------------------------- 1 | function isDevMode() { 2 | if (typeof window === 'undefined') { 3 | return true; 4 | } 5 | // 开发模式 6 | if (window['devmode'] && window['devmode'].getStatus() === 'on') { 7 | return true; 8 | } 9 | // 预览模式 10 | const buffetData = window['g_buffet_data']; 11 | if (buffetData && buffetData.version !== 'master-master') { 12 | return true; 13 | } 14 | } 15 | 16 | /** 17 | * 只在开发模式下才打印信息 18 | * @param any 19 | */ 20 | export function log(...any: any[]) { 21 | if (!isDevMode()) { 22 | return; 23 | } 24 | return console.log(...any); 25 | } 26 | 27 | /** 28 | * 只在开发模式下才打印信息 29 | * @param any 30 | */ 31 | export function warn(...any: any[]) { 32 | if (!isDevMode()) { 33 | return; 34 | } 35 | return console.warn(...any); 36 | } 37 | 38 | export default log; 39 | -------------------------------------------------------------------------------- /femas-admin/src/main/resources/static/sct/src/common/helpers/visibility.ts: -------------------------------------------------------------------------------- 1 | import { makeWaitFunction } from './wait'; 2 | 3 | const VISIBILITY_CHANGE_EVENT = 'visibilitychange'; 4 | 5 | function watchVisibleOnce(callback) { 6 | function cb() { 7 | document.removeEventListener(VISIBILITY_CHANGE_EVENT, cb); 8 | callback(); 9 | } 10 | 11 | document.addEventListener(VISIBILITY_CHANGE_EVENT, cb); 12 | } 13 | 14 | /** 15 | * 确认当前标签页是否激活 16 | * 如果返回true,表示当前为可见,直接返回 17 | * 如果返回false,表示刚切过来 18 | */ 19 | const waitVisible = makeWaitFunction(isVisible, watchVisibleOnce, 1000); 20 | export default waitVisible; 21 | 22 | export function isVisible(): boolean { 23 | const state = document.visibilityState; 24 | // 如果不支持visibility功能,默认一直可见 25 | return !state || state === 'visible'; 26 | } 27 | 28 | // 历史兼容 29 | export { combineWaitFunction } from './wait'; 30 | -------------------------------------------------------------------------------- /femas-admin/src/main/resources/static/sct/src/common/qcm-chart/core/chart/bar/index.ts: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line import/no-cycle 2 | export { Bar, BarProps } from './Bar'; 3 | -------------------------------------------------------------------------------- /femas-admin/src/main/resources/static/sct/src/common/qcm-chart/core/chart/line/index.ts: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line import/no-cycle 2 | export { Line, LineProps, LineConnectProps } from './Line'; 3 | -------------------------------------------------------------------------------- /femas-admin/src/main/resources/static/sct/src/common/qcm-chart/core/chart/pie/index.ts: -------------------------------------------------------------------------------- 1 | export { Pie, PieProps } from './Pie'; 2 | -------------------------------------------------------------------------------- /femas-admin/src/main/resources/static/sct/src/common/qcm-chart/core/chart/scatter/index.ts: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line import/no-cycle 2 | export { Scatter, ScatterProps } from './Scatter'; 3 | -------------------------------------------------------------------------------- /femas-admin/src/main/resources/static/sct/src/common/qcm-chart/core/chart/topology/index.ts: -------------------------------------------------------------------------------- 1 | export { default as Topology } from './Topology'; 2 | export { TopologyProps, DataType, LayoutType } from '../../../type/topology'; 3 | -------------------------------------------------------------------------------- /femas-admin/src/main/resources/static/sct/src/common/qcm-chart/core/lib/throttle.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable prettier/prettier */ 2 | export default function throttle(fn, threshhold, scope?) { 3 | threshhold || (threshhold = 250); 4 | let last, deferTimer; 5 | return function () { 6 | const context = scope || this; 7 | 8 | const now = +new Date(), 9 | // eslint-disable-next-line prefer-rest-params 10 | args = arguments; 11 | if (last && now < last + threshhold) { 12 | // hold on to it 13 | clearTimeout(deferTimer); 14 | deferTimer = setTimeout(function () { 15 | last = now; 16 | fn.apply(context, args); 17 | }, threshhold); 18 | } else { 19 | last = now; 20 | fn.apply(context, args); 21 | } 22 | }; 23 | } 24 | -------------------------------------------------------------------------------- /femas-admin/src/main/resources/static/sct/src/common/qcm-chart/core/toolbar/toolbarContent.ts: -------------------------------------------------------------------------------- 1 | export const generateToolbarContent = (barList, width) => { 2 | return `
4 |
5 |
    6 | ${barList.map((item, i) => `
  • ${item.text}
  • `)} 7 |
8 |
9 |
`; 10 | }; 11 | -------------------------------------------------------------------------------- /femas-admin/src/main/resources/static/sct/src/common/qcm-chart/expose.ts: -------------------------------------------------------------------------------- 1 | import * as QcmChart from './index'; 2 | 3 | /** 4 | * 输出到 QcmChart 全局变量 5 | */ 6 | window['QcmChart'] = QcmChart; // eslint-disable-line dot-notation 7 | -------------------------------------------------------------------------------- /femas-admin/src/main/resources/static/sct/src/common/qcm-chart/index.ts: -------------------------------------------------------------------------------- 1 | export * from './core/chart/line'; 2 | export * from './core/chart/pie'; 3 | export * from './core/chart/bar'; 4 | export * from './core/chart/scatter'; 5 | export * from './core/chart/topology'; 6 | -------------------------------------------------------------------------------- /femas-admin/src/main/resources/static/sct/src/common/types/index.ts: -------------------------------------------------------------------------------- 1 | export interface Action { 2 | type: string; 3 | payload: T; 4 | } 5 | 6 | export interface FilterTime { 7 | startTime: number; 8 | endTime: number; 9 | } 10 | 11 | export const nameTipMessage = '最长为60个字符,只能包含小写字母、数字及分隔符("_"、"-"),且不能以分隔符开头或结尾'; 12 | -------------------------------------------------------------------------------- /femas-admin/src/main/resources/static/sct/src/common/util/resolvePath.ts: -------------------------------------------------------------------------------- 1 | export default function resolvePath(...paths: string[]): string { 2 | return paths.join('/'); 3 | } 4 | -------------------------------------------------------------------------------- /femas-admin/src/main/resources/static/sct/src/common/util/router.ts: -------------------------------------------------------------------------------- 1 | import render, { history } from '@src/index'; 2 | 3 | export default { 4 | navigate(url: string) { 5 | history.push(url); 6 | render(); 7 | }, 8 | }; 9 | -------------------------------------------------------------------------------- /femas-admin/src/main/resources/static/sct/src/login/LoginFormDuck.ts: -------------------------------------------------------------------------------- 1 | import Form from '../common/ducks/Form'; 2 | 3 | export default class LoginFormDuck extends Form { 4 | Values: { 5 | username: string; 6 | password: string; 7 | }; 8 | Meta: {}; 9 | 10 | validate(values) { 11 | return validator(values); 12 | } 13 | } 14 | 15 | const validator = Form.combineValidators({ 16 | username(v) { 17 | if (!v) { 18 | return '请填写用户名'; 19 | } 20 | }, 21 | password(v) { 22 | if (!v) { 23 | return '请填写密码'; 24 | } 25 | }, 26 | }); 27 | -------------------------------------------------------------------------------- /femas-admin/src/main/resources/static/sct/src/login/index.ts: -------------------------------------------------------------------------------- 1 | import { connectWithDuck } from '../common/helpers/'; 2 | import LoginPage from './Login'; 3 | import LoginPageDuck from './LoginDuck'; 4 | 5 | export default connectWithDuck(LoginPage, LoginPageDuck); 6 | -------------------------------------------------------------------------------- /femas-admin/src/main/resources/static/sct/src/login/model.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TencentFemas/femas/e5c4bd68683a0989697da21a75b957534258390a/femas-admin/src/main/resources/static/sct/src/login/model.ts -------------------------------------------------------------------------------- /femas-admin/src/main/resources/static/sct/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es2017", 4 | "module": "es2015", 5 | "moduleResolution": "node", 6 | "baseUrl": ".", 7 | "jsx": "react", 8 | "outDir": ".js-out", 9 | "noImplicitAny": false, 10 | "allowSyntheticDefaultImports": true, 11 | "experimentalDecorators": true, 12 | "lib": [ 13 | "es2017", 14 | "dom" 15 | ], 16 | "paths": { 17 | "@src/*": [ 18 | "./src/*" 19 | ], 20 | "tea-component": [ 21 | "./node_modules/tea-component/es" 22 | ], 23 | "tea-component/*": [ 24 | "./node_modules/tea-component/es/*" 25 | ] 26 | } 27 | }, 28 | "exclude": [ 29 | "dist", 30 | "node_modules" 31 | ] 32 | } 33 | -------------------------------------------------------------------------------- /femas-agent/femas-agent-core/src/main/java/com/tencent/tsf/femas/agent/config/InterceptPluginConfig.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.agent.config; 2 | 3 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 4 | import com.fasterxml.jackson.annotation.JsonProperty; 5 | 6 | import java.util.ArrayList; 7 | import java.util.List; 8 | 9 | /** 10 | * @Author leoziltong@tencent.com 11 | */ 12 | @JsonIgnoreProperties(ignoreUnknown = true) 13 | public class InterceptPluginConfig { 14 | 15 | 16 | @JsonProperty 17 | private InterceptPlugin plugin; 18 | 19 | public InterceptPluginConfig() { 20 | } 21 | 22 | 23 | public InterceptPlugin getPlugin() { 24 | return plugin; 25 | } 26 | 27 | public void setPlugin(InterceptPlugin plugin) { 28 | this.plugin = plugin; 29 | } 30 | 31 | 32 | } 33 | -------------------------------------------------------------------------------- /femas-agent/femas-agent-core/src/main/java/com/tencent/tsf/femas/agent/interceptor/OriginalInterceptor.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.agent.interceptor; 2 | 3 | import java.lang.reflect.Method; 4 | import java.util.concurrent.Callable; 5 | 6 | /** 7 | * @Author leoziltong@tencent.com 8 | */ 9 | public interface OriginalInterceptor { 10 | Object intercept(Object obj, 11 | Object[] allArguments, 12 | Callable zuper, 13 | Method method) throws Throwable; 14 | } 15 | -------------------------------------------------------------------------------- /femas-agent/femas-agent-example/femas-agent-example-dubbo/femas-agent-example-apache-dubbo3-api/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | femas-agent-example-dubbo 7 | com.tencent.tsf 8 | ${revision} 9 | 10 | 11 | 4.0.0 12 | 13 | femas-agent-example-apache-dubbo3-api 14 | 15 | 16 | 8 17 | 8 18 | 19 | 20 | -------------------------------------------------------------------------------- /femas-agent/femas-agent-example/femas-agent-example-dubbo/femas-agent-example-apache-dubbo3-api/src/main/java/com/femas/agent/example/apache/dubbo3/api/AgentDubbo3ProviderApi.java: -------------------------------------------------------------------------------- 1 | package com.femas.agent.example.apache.dubbo3.api; 2 | 3 | public interface AgentDubbo3ProviderApi { 4 | String hello(String name); 5 | } 6 | -------------------------------------------------------------------------------- /femas-agent/femas-agent-example/femas-agent-example-dubbo/femas-agent-example-apache-dubbo3-provider/src/main/java/com/femas/agent/example/apache/dubbo3/provider/AgentApacheDubbo3ProviderExampleApplication.java: -------------------------------------------------------------------------------- 1 | package com.femas.agent.example.apache.dubbo3.provider; 2 | 3 | import org.apache.dubbo.config.spring.context.annotation.EnableDubbo; 4 | import org.springframework.boot.SpringApplication; 5 | import org.springframework.boot.autoconfigure.SpringBootApplication; 6 | 7 | @EnableDubbo 8 | @SpringBootApplication 9 | public class AgentApacheDubbo3ProviderExampleApplication { 10 | public static void main(String[] args) { 11 | SpringApplication.run(AgentApacheDubbo3ProviderExampleApplication.class, args); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /femas-agent/femas-agent-example/femas-agent-example-dubbo/femas-agent-example-apache-dubbo3-provider/src/main/java/com/femas/agent/example/apache/dubbo3/provider/impl/AgentDubbo3ProviderApiImpl.java: -------------------------------------------------------------------------------- 1 | package com.femas.agent.example.apache.dubbo3.provider.impl; 2 | 3 | import com.femas.agent.example.apache.dubbo3.api.AgentDubbo3ProviderApi; 4 | import org.apache.dubbo.config.annotation.DubboService; 5 | 6 | @DubboService(version = "1.0") 7 | public class AgentDubbo3ProviderApiImpl implements AgentDubbo3ProviderApi { 8 | @Override 9 | public String hello(String name) { 10 | return "hello " + name; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /femas-agent/femas-agent-example/femas-agent-example-dubbo/femas-agent-example-apache-dubbo3-provider/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | server.port=18082 2 | spring.application.name=agent-dubbo3-service-provider 3 | dubbo.application.name=agent-dubbo3-service-provider 4 | dubbo.registry.parameters.namespace=ns-38n9xvnd 5 | dubbo.registry.address=nacos://nacos0.vm:8848 6 | dubbo.protocol.name=dubbo 7 | #dubbo.registry.group=dubbo3_group 8 | dubbo.protocol.port=-1 9 | dubbo.application.register-mode=instance 10 | dubbo.application.enable-file-cache=false 11 | dubbo.application.qos-enable=true 12 | dubbo.application.qos-port=33333 13 | dubbo.application.qos-accept-foreign-ip=false 14 | dubbo.config-center.address=nacos://nacos0.vm:8848 15 | dubbo.metadata-report.address=nacos://nacos0.vm:8848 -------------------------------------------------------------------------------- /femas-agent/femas-agent-example/femas-agent-example-springcloud-provider/src/main/resources/bootstrap.yaml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 19001 3 | spring: 4 | application: 5 | name: femas-springcloud-agent-provider 6 | cloud: 7 | nacos: 8 | discovery: 9 | server-addr: 106.53.127.164:8848 10 | username: nacos 11 | password: nacos 12 | config: 13 | server-addr: 106.53.127.164:8848 14 | 15 | management: 16 | endpoints: 17 | web: 18 | exposure: 19 | include: '*' 20 | 21 | logging: 22 | file: ./log/femas/${spring.application.name}/${spring.application.name} -------------------------------------------------------------------------------- /femas-agent/femas-agent-jts/README.txt: -------------------------------------------------------------------------------- 1 | Build Step: 2 | 1. add two local dependencies 3 | 4 | cd ${project.basedir}/lib/org/jmxtrans/agent/jmxtrans-agent/1.2.10-SNAPSHOT; 5 | mvn install:install-file -Dfile=jmxtrans-agent-1.2.10-SNAPSHOT.jar -DgroupId=org.jmxtrans.agent -DartifactId=jmxtrans-agent -Dversion=1.2.10-SNAPSHOT -Dpackaging=jar 6 | 7 | 8 | cd ${project.basedir}/lib/one/profiler/async-profiler/0.1; 9 | mvn install:install-file -Dfile=async-profiler-0.1.jar -DgroupId=one.profiler -DartifactId=async-profiler -Dversion=0.1 -Dpackaging=jar 10 | 11 | Then 12 | mvn clean package 13 | -------------------------------------------------------------------------------- /femas-agent/femas-agent-jts/lib/garbagecat_lib/garbagecat.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TencentFemas/femas/e5c4bd68683a0989697da21a75b957534258390a/femas-agent/femas-agent-jts/lib/garbagecat_lib/garbagecat.jar -------------------------------------------------------------------------------- /femas-agent/femas-agent-jts/lib/native_libs/linux_aarch64/libasyncProfiler.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TencentFemas/femas/e5c4bd68683a0989697da21a75b957534258390a/femas-agent/femas-agent-jts/lib/native_libs/linux_aarch64/libasyncProfiler.so -------------------------------------------------------------------------------- /femas-agent/femas-agent-jts/lib/native_libs/linux_x86_64/libasyncProfiler.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TencentFemas/femas/e5c4bd68683a0989697da21a75b957534258390a/femas-agent/femas-agent-jts/lib/native_libs/linux_x86_64/libasyncProfiler.so -------------------------------------------------------------------------------- /femas-agent/femas-agent-jts/lib/native_libs/macos_x86_64/libasyncProfiler.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TencentFemas/femas/e5c4bd68683a0989697da21a75b957534258390a/femas-agent/femas-agent-jts/lib/native_libs/macos_x86_64/libasyncProfiler.so -------------------------------------------------------------------------------- /femas-agent/femas-agent-jts/lib/one/profiler/async-profiler/0.1/async-profiler-0.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TencentFemas/femas/e5c4bd68683a0989697da21a75b957534258390a/femas-agent/femas-agent-jts/lib/one/profiler/async-profiler/0.1/async-profiler-0.1.jar -------------------------------------------------------------------------------- /femas-agent/femas-agent-jts/lib/one/profiler/async-profiler/0.1/async-profiler-0.1.pom: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | one.profiler 6 | async-profiler 7 | 0.1 8 | POM was created locally 9 | 10 | -------------------------------------------------------------------------------- /femas-agent/femas-agent-jts/lib/org/jmxtrans/agent/jmxtrans-agent/1.2.10-SNAPSHOT/jmxtrans-agent-1.2.10-SNAPSHOT.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TencentFemas/femas/e5c4bd68683a0989697da21a75b957534258390a/femas-agent/femas-agent-jts/lib/org/jmxtrans/agent/jmxtrans-agent/1.2.10-SNAPSHOT/jmxtrans-agent-1.2.10-SNAPSHOT.jar -------------------------------------------------------------------------------- /femas-agent/femas-agent-jts/lib/org/jmxtrans/agent/jmxtrans-agent/1.2.10-SNAPSHOT/jmxtrans-agent-1.2.10-SNAPSHOT.pom: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | org.jmxtrans.agent 6 | jmxtrans-agent 7 | 1.2.10-SNAPSHOT 8 | POM was created locally 9 | 10 | -------------------------------------------------------------------------------- /femas-agent/femas-agent-jts/src/main/resources/cmdline_config.properties: -------------------------------------------------------------------------------- 1 | http-server-port=39411 2 | hotspot-ip=localhost 3 | hotspot-port=11099 4 | mode=monitor 5 | pingHotspotInterval=0 6 | # connect_mode=REMOTE 7 | # not supported because monitor agent starts before cmaline. 8 | # monitor_config=/tmp/tsf_monitor_config.xml 9 | # java -javaagent:./TencentCloudJvmMonitor-1.0-SNAPSHOT.jar=hascontroller=true -cp .:./lib -Djava.library.path=./lib/ GCBench -------------------------------------------------------------------------------- /femas-agent/femas-agent-jts/test/run.sh: -------------------------------------------------------------------------------- 1 | curl -X POST --data '{"taskId":"test1","type":"ThreadDump","action":"","metaInfo":"{}"}' http://localhost:11099/jvm 2 | -------------------------------------------------------------------------------- /femas-agent/femas-agent-plugin/femas-apache-dubbo3-plugin/femas-apache-dubbo3-nacos-plugin/src/main/java/com/tencent/tsf/femas/agent/apache/dubbo/nacos/instrument/router/ApacheDubboAgentRouterFactory.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.agent.apache.dubbo.nacos.instrument.router; 2 | 3 | import org.apache.dubbo.common.URL; 4 | import org.apache.dubbo.common.extension.Activate; 5 | import org.apache.dubbo.rpc.cluster.Router; 6 | import org.apache.dubbo.rpc.cluster.RouterFactory; 7 | 8 | /** 9 | * apache dubbo3.03 RouterFactory spi impl 10 | */ 11 | 12 | @Activate(order = 99) 13 | public class ApacheDubboAgentRouterFactory implements RouterFactory { 14 | 15 | @Override 16 | public Router getRouter(URL url) { 17 | return new ApacheDubboAgentRouter(url); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /femas-agent/femas-agent-plugin/femas-apache-dubbo3-plugin/femas-apache-dubbo3-nacos-plugin/src/main/resources/META-INF/services/org.apache.dubbo.rpc.Filter: -------------------------------------------------------------------------------- 1 | agentDubboProviderFilter=com.tencent.tsf.femas.agent.apache.dubbo.nacos.instrument.filter.ApacheDubboProviderAgentFilter 2 | agentDubboConsumerFilter=com.tencent.tsf.femas.agent.apache.dubbo.nacos.instrument.filter.ApacheDubboConsumerAgentFilter -------------------------------------------------------------------------------- /femas-agent/femas-agent-plugin/femas-apache-dubbo3-plugin/femas-apache-dubbo3-nacos-plugin/src/main/resources/META-INF/services/org.apache.dubbo.rpc.cluster.RouterFactory: -------------------------------------------------------------------------------- 1 | agentRouterFactory=com.tencent.tsf.femas.agent.apache.dubbo.nacos.instrument.router.ApacheDubboAgentRouterFactory -------------------------------------------------------------------------------- /femas-agent/femas-agent-plugin/femas-springcloud-2020-plugin/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 4.0.0 6 | 7 | femas-springcloud-2020-plugin 8 | 9 | femas-agent-plugin 10 | com.tencent.tsf 11 | ${revision} 12 | ../pom.xml 13 | 14 | pom 15 | ${project.artifactId} 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /femas-agent/femas-agent-plugin/femas-springcloud-greenwich-plugin/femas-springcloud-greenwich-consul-plugin/src/main/resources/plugin.yaml: -------------------------------------------------------------------------------- 1 | femas: 2 | agent: 3 | interceptors: 4 | - plugin: 5 | className: org.springframework.cloud.consul.serviceregistry.ConsulServiceRegistry 6 | methodName: register 7 | interceptorClass: com.tencent.tsf.femas.agent.consul.instrument.ConsulServiceRegistryInterceptor -------------------------------------------------------------------------------- /femas-agent/femas-agent-plugin/femas-springcloud-greenwich-plugin/femas-springcloud-greenwich-eureka-plugin/src/main/resources/plugin.yaml: -------------------------------------------------------------------------------- 1 | femas: 2 | agent: 3 | interceptors: 4 | # eureka 5 | - plugin: 6 | className: org.springframework.cloud.netflix.eureka.serviceregistry.EurekaServiceRegistry 7 | methodName: register 8 | interceptorClass: com.tencent.tsf.femas.agent.eureka.instrument.EurekaServiceRegistryInterceptor -------------------------------------------------------------------------------- /femas-agent/femas-agent-plugin/femas-springcloud-greenwich-plugin/femas-springcloud-greenwich-loadbalance-plugin/src/main/java/com/tencent/tsf/femas/agent/loadbalance/instrument/FemasServiceFilterLoadBalancer.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.agent.loadbalance.instrument; 2 | 3 | import com.netflix.loadbalancer.Server; 4 | 5 | import java.util.List; 6 | 7 | /** 8 | * @Author leoziltong@tencent.com 9 | */ 10 | public interface FemasServiceFilterLoadBalancer { 11 | 12 | void beforeChooseServer(Object key); 13 | 14 | void afterChooseServer(Server server, Object key); 15 | 16 | List filterAllServer(List servers); 17 | } 18 | -------------------------------------------------------------------------------- /femas-agent/femas-agent-plugin/femas-springcloud-greenwich-plugin/femas-springcloud-greenwich-loadbalance-plugin/src/main/resources/plugin.yaml: -------------------------------------------------------------------------------- 1 | femas: 2 | agent: 3 | interceptors: 4 | - plugin: 5 | className: com.netflix.loadbalancer.ZoneAwareLoadBalancer 6 | methodName: chooseServer 7 | interceptorClass: com.tencent.tsf.femas.agent.loadbalance.instrument.ZoneAwareLoadBalancerInterceptor 8 | - plugin: 9 | className: com.netflix.loadbalancer.BaseLoadBalancer 10 | methodName: getAllServers 11 | interceptorClass: com.tencent.tsf.femas.agent.loadbalance.instrument.BaseLoadBalancerInterceptor -------------------------------------------------------------------------------- /femas-agent/femas-agent-plugin/femas-springcloud-greenwich-plugin/femas-springcloud-greenwich-nacos-plugin/src/main/resources/plugin.yaml: -------------------------------------------------------------------------------- 1 | femas: 2 | agent: 3 | interceptors: 4 | - plugin: 5 | className: com.alibaba.cloud.nacos.registry.NacosServiceRegistry 6 | methodName: register 7 | interceptorClass: com.tencent.tsf.femas.agent.nacos.instrument.NacosServiceRegistryInterceptor 8 | - plugin: 9 | className: com.alibaba.nacos.client.naming.utils.InitUtils 10 | methodName: initNamespaceForNaming 11 | methodType: static 12 | interceptorClass: com.tencent.tsf.femas.agent.nacos.instrument.NacosNameSpaceInitUtilsInterceptor -------------------------------------------------------------------------------- /femas-agent/femas-agent-plugin/femas-springcloud-greenwich-plugin/femas-springcloud-plugin-common/src/main/java/com/tencent/tsf/femas/agent/common/BaseDiscoveryServerConverter.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.agent.common; 2 | 3 | /** 4 | * @Author leoziltong@tencent.com 5 | */ 6 | public interface BaseDiscoveryServerConverter { 7 | 8 | default String getNamespace() { 9 | return null; 10 | } 11 | 12 | default String getServiceName() { 13 | return null; 14 | } 15 | 16 | default String getVersion() { 17 | return null; 18 | } 19 | 20 | } 21 | -------------------------------------------------------------------------------- /femas-agent/femas-agent-tools/src/main/java/com/tencent/tsf/femas/agent/tools/FemasRuntimeException.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.agent.tools; 2 | 3 | public class FemasRuntimeException extends RuntimeException { 4 | 5 | protected FemasRuntimeException() { 6 | 7 | } 8 | 9 | public FemasRuntimeException(String message) { 10 | super(message); 11 | } 12 | 13 | public FemasRuntimeException(String message, Throwable cause) { 14 | super(message, cause); 15 | } 16 | 17 | public FemasRuntimeException(Throwable cause) { 18 | super(cause); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /femas-api/src/main/java/com/tencent/tsf/femas/api/ExtensionManager.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.api; 2 | 3 | import com.tencent.tsf.femas.common.context.ContextConstant; 4 | import com.tencent.tsf.femas.common.context.factory.ContextFactory; 5 | 6 | public class ExtensionManager { 7 | 8 | // private static volatile ContextConstant contextConstant = ContextFactory.getContextConstantInstance(); 9 | // 后续支持扩展 10 | private static IExtensionLayer extensionLayer = new CommonExtensionLayer(); 11 | 12 | public static IExtensionLayer getExtensionLayer() { 13 | return extensionLayer; 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /femas-benchmark/src/test/java/com/tencent/tsf/femas/benchmark/ClientBenchMark.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.benchmark; 2 | 3 | public class ClientBenchMark { 4 | } 5 | -------------------------------------------------------------------------------- /femas-common/src/main/java/com/tencent/tsf/femas/common/annotation/AdaptorComponent.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.common.annotation; 2 | 3 | /** 4 | * 此注解用来标示该类需要再Adaptor层进行封装与适配 5 | */ 6 | public @interface AdaptorComponent { 7 | 8 | } 9 | -------------------------------------------------------------------------------- /femas-common/src/main/java/com/tencent/tsf/femas/common/annotation/SPI.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.common.annotation; 2 | 3 | public @interface SPI { 4 | 5 | } 6 | -------------------------------------------------------------------------------- /femas-common/src/main/java/com/tencent/tsf/femas/common/annotation/VisibleForTesting.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.common.annotation; 2 | 3 | import java.lang.annotation.Documented; 4 | import java.lang.annotation.ElementType; 5 | import java.lang.annotation.Retention; 6 | import java.lang.annotation.RetentionPolicy; 7 | import java.lang.annotation.Target; 8 | 9 | /** 10 | * 代表这个只是为了测试用例才开放的 11 | */ 12 | @Documented 13 | @Retention(RetentionPolicy.SOURCE) 14 | @Target({ElementType.TYPE, ElementType.METHOD, ElementType.FIELD, ElementType.CONSTRUCTOR}) 15 | public @interface VisibleForTesting { 16 | 17 | } 18 | -------------------------------------------------------------------------------- /femas-common/src/main/java/com/tencent/tsf/femas/common/base/Sortable.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.common.base; 2 | 3 | /** 4 | * 可排序的接口 5 | */ 6 | public interface Sortable { 7 | 8 | /** 9 | * 得到顺序 10 | * 11 | * @return 顺序 12 | */ 13 | int getOrder(); 14 | } 15 | -------------------------------------------------------------------------------- /femas-common/src/main/java/com/tencent/tsf/femas/common/callback/SendableResponseCallback.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.common.callback; 2 | 3 | /** 4 | * 表示是一个异步可链路返回的Callback 5 | *

6 | */ 7 | public interface SendableResponseCallback extends FemasCallback { 8 | 9 | } 10 | -------------------------------------------------------------------------------- /femas-common/src/main/java/com/tencent/tsf/femas/common/context/RpcInfoEnum.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.common.context; 2 | 3 | public enum RpcInfoEnum { 4 | } 5 | -------------------------------------------------------------------------------- /femas-common/src/main/java/com/tencent/tsf/femas/common/exception/FemasRegisterDescribeException.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.common.exception; 2 | 3 | public class FemasRegisterDescribeException extends RuntimeException { 4 | 5 | 6 | protected FemasRegisterDescribeException() { 7 | 8 | } 9 | 10 | public FemasRegisterDescribeException(String message) { 11 | super(message); 12 | } 13 | 14 | public FemasRegisterDescribeException(String message, Throwable cause) { 15 | super(message, cause); 16 | } 17 | 18 | public FemasRegisterDescribeException(Throwable cause) { 19 | super(cause); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /femas-common/src/main/java/com/tencent/tsf/femas/common/exception/FemasRuntimeException.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.common.exception; 2 | 3 | public class FemasRuntimeException extends RuntimeException { 4 | 5 | protected FemasRuntimeException() { 6 | 7 | } 8 | 9 | public FemasRuntimeException(String message) { 10 | super(message); 11 | } 12 | 13 | public FemasRuntimeException(String message, Throwable cause) { 14 | super(message, cause); 15 | } 16 | 17 | public FemasRuntimeException(Throwable cause) { 18 | super(cause); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /femas-common/src/main/java/com/tencent/tsf/femas/common/httpclient/HttpClientRequest.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.common.httpclient; 2 | 3 | /** 4 | * @Author leoziltong 5 | * @Description //TODO 6 | * @Date: 2021/3/29 11:21 7 | * @Version 1.0 8 | */ 9 | public interface HttpClientRequest { 10 | 11 | } 12 | -------------------------------------------------------------------------------- /femas-common/src/main/java/com/tencent/tsf/femas/common/httpclient/HttpLongPollingConnectorManager.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.common.httpclient; 2 | 3 | import com.tencent.tsf.femas.common.util.HttpResult; 4 | 5 | /** 6 | * @author mroccyen 7 | */ 8 | public interface HttpLongPollingConnectorManager { 9 | /** 10 | * 使用http长轮询获取数据 11 | * 12 | * @param key key 13 | * @param namespaceId 命名空间id 14 | * @return 获取到的数据 15 | */ 16 | HttpResult fetchLongPollingKvValue(String key, String namespaceId); 17 | } 18 | -------------------------------------------------------------------------------- /femas-common/src/main/java/com/tencent/tsf/femas/common/httpclient/client/FemasHttpClient.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.common.httpclient.client; 2 | 3 | 4 | import com.tencent.tsf.femas.common.httpclient.wrapper.Body2StringResultWrapper; 5 | import com.tencent.tsf.femas.common.httpclient.wrapper.ResultWrapper; 6 | 7 | 8 | /** 9 | * @Author leoziltong 10 | * @Description //TODO 11 | * @Date: 2021/3/29 20:58 12 | * @Version 1.0 13 | */ 14 | public interface FemasHttpClient { 15 | 16 | void registerWrapper(String var, ResultWrapper wrapper); 17 | 18 | ResultWrapper getOneResultWrapper(String key); 19 | 20 | default ResultWrapper getDefaultWrapper() { 21 | return new Body2StringResultWrapper(); 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /femas-common/src/main/java/com/tencent/tsf/femas/common/httpclient/client/LongPullingApacheHttpRestClient.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.common.httpclient.client; 2 | 3 | import org.apache.http.impl.client.CloseableHttpClient; 4 | import org.slf4j.Logger; 5 | import org.slf4j.LoggerFactory; 6 | 7 | 8 | /** 9 | * @Author leoziltong 10 | * @Description //TODO 11 | * @Date: 2021/3/30 11:21 12 | * @Version 1.0 13 | */ 14 | public class LongPullingApacheHttpRestClient extends FemasApacheHttpRestClient { 15 | 16 | private static final Logger logger = LoggerFactory.getLogger(LongPullingApacheHttpRestClient.class); 17 | 18 | public LongPullingApacheHttpRestClient(CloseableHttpClient client) { 19 | super(client); 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /femas-common/src/main/java/com/tencent/tsf/femas/common/httpclient/factory/HttpClientFactory.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.common.httpclient.factory; 2 | 3 | import com.tencent.tsf.femas.common.httpclient.client.AbstractHttpClient; 4 | 5 | 6 | /** 7 | * @Author leoziltong 8 | * @Description //TODO 9 | * @Date: 2021/3/29 11:03 10 | * @Version 1.0 11 | */ 12 | public interface HttpClientFactory { 13 | 14 | AbstractHttpClient createHttpClient(); 15 | 16 | } 17 | -------------------------------------------------------------------------------- /femas-common/src/main/java/com/tencent/tsf/femas/common/invoke/Invoker.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.common.invoke; 2 | 3 | import com.tencent.tsf.femas.common.entity.Request; 4 | import com.tencent.tsf.femas.common.entity.Response; 5 | 6 | public interface Invoker { 7 | 8 | /** 9 | * 执行调用 10 | * 11 | * @param request 请求 12 | * @return Response 响应 13 | */ 14 | Response invoke(Request request); 15 | } 16 | -------------------------------------------------------------------------------- /femas-common/src/main/java/com/tencent/tsf/femas/common/rule/AbstractRuleManager.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.common.rule; 2 | 3 | import com.tencent.tsf.femas.common.context.Context; 4 | 5 | public abstract class AbstractRuleManager { 6 | 7 | /** 8 | * 根据Rule Id匹配对象 9 | * 10 | * @param ruleId 11 | * @return 12 | */ 13 | protected abstract T match(String ruleId); 14 | 15 | /** 16 | * 根据上下文Context匹配对象 17 | * 18 | * @param context 19 | * @return 20 | */ 21 | protected abstract T match(Context context); 22 | 23 | /** 24 | * 将Rule装载到manager中 25 | * 26 | * @param rule 27 | */ 28 | protected abstract void load(Rule rule); 29 | } 30 | -------------------------------------------------------------------------------- /femas-common/src/main/java/com/tencent/tsf/femas/common/rule/Rule.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.common.rule; 2 | 3 | public interface Rule { 4 | 5 | } 6 | -------------------------------------------------------------------------------- /femas-common/src/main/java/com/tencent/tsf/femas/common/serialize/Serializer.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.common.serialize; 2 | 3 | /** 4 | * leoziltong 5 | * 序列化接口类 6 | */ 7 | public interface Serializer { 8 | 9 | 10 | byte[] serialize(Object obj); 11 | 12 | /** 13 | * 二进制转换成 java 对象 14 | */ 15 | T deserialize(Class clazz, byte[] bytes); 16 | 17 | String serializeStr(Object obj); 18 | 19 | T deserializeStr(Class clazz, String bytes); 20 | 21 | } 22 | -------------------------------------------------------------------------------- /femas-common/src/main/java/com/tencent/tsf/femas/common/spi/SpiExtensionClass.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.common.spi; 2 | 3 | public interface SpiExtensionClass { 4 | 5 | String getType(); 6 | 7 | default String getName() { 8 | return this.getClass().getName(); 9 | } 10 | 11 | } 12 | -------------------------------------------------------------------------------- /femas-common/src/main/java/com/tencent/tsf/femas/common/statistic/Measurement.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.common.statistic; 2 | 3 | class Measurement extends AbstractAggregation { 4 | 5 | void reset() { 6 | this.totalDurationInMillis = 0; 7 | this.numberOfSlowCalls.reset(); 8 | this.numberOfFailedCalls.reset(); 9 | this.numberOfCalls.reset(); 10 | } 11 | 12 | } 13 | -------------------------------------------------------------------------------- /femas-common/src/main/java/com/tencent/tsf/femas/common/statistic/Metrics.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.common.statistic; 2 | 3 | import java.util.concurrent.TimeUnit; 4 | 5 | public interface Metrics { 6 | 7 | /** 8 | * Records a call. 9 | * 10 | * @param duration the duration of the call 11 | * @param durationUnit the time unit of the duration 12 | * @param outcome the outcome of the call 13 | */ 14 | Snapshot record(long duration, TimeUnit durationUnit, Outcome outcome); 15 | 16 | /** 17 | * Returns a snapshot. 18 | * 19 | * @return a snapshot 20 | */ 21 | Snapshot getSnapshot(); 22 | 23 | enum Outcome { 24 | SUCCESS, ERROR, SLOW_SUCCESS, SLOW_ERROR, BLOCK 25 | } 26 | 27 | } -------------------------------------------------------------------------------- /femas-common/src/main/java/com/tencent/tsf/femas/common/statistic/PartialAggregation.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.common.statistic; 2 | 3 | public class PartialAggregation extends AbstractAggregation { 4 | 5 | private long epochMillis; 6 | 7 | PartialAggregation(long epochMillis) { 8 | this.epochMillis = epochMillis; 9 | } 10 | 11 | void reset(long epochMillis) { 12 | this.epochMillis = epochMillis; 13 | this.totalDurationInMillis = 0; 14 | this.numberOfSlowCalls.reset(); 15 | this.numberOfFailedCalls.reset(); 16 | this.numberOfCalls.reset(); 17 | this.numberOfBlockCalls.reset(); 18 | } 19 | 20 | public long getEpochMillis() { 21 | return epochMillis; 22 | } 23 | } -------------------------------------------------------------------------------- /femas-common/src/main/java/com/tencent/tsf/femas/common/statistic/SecondsSlidingTimeWindowMetrics.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.common.statistic; 2 | 3 | public class SecondsSlidingTimeWindowMetrics extends SlidingTimeWindowMetrics { 4 | 5 | /** 6 | * Creates a new {@link SecondsSlidingTimeWindowMetrics} with the given clock and window of time. 7 | * 8 | * @param timeWindowSizeInSeconds the window time size in seconds 9 | */ 10 | public SecondsSlidingTimeWindowMetrics(int timeWindowSizeInSeconds) { 11 | super(timeWindowSizeInSeconds, timeWindowSizeInSeconds * 1000); 12 | } 13 | } -------------------------------------------------------------------------------- /femas-common/src/main/java/com/tencent/tsf/femas/common/statistic/TotalAggregation.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.common.statistic; 2 | 3 | class TotalAggregation extends AbstractAggregation { 4 | 5 | void removeBucket(AbstractAggregation bucket) { 6 | this.totalDurationInMillis -= bucket.totalDurationInMillis; 7 | this.numberOfSlowCalls.add(-bucket.numberOfSlowCalls.intValue()); 8 | this.numberOfSlowFailedCalls.add(-bucket.numberOfSlowFailedCalls.intValue()); 9 | this.numberOfFailedCalls.add(-bucket.numberOfFailedCalls.intValue()); 10 | this.numberOfBlockCalls.add(-bucket.numberOfBlockCalls.intValue()); 11 | this.numberOfCalls.add(-bucket.numberOfCalls.intValue()); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /femas-common/src/main/java/com/tencent/tsf/femas/common/tag/TagExpression.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.common.tag; 2 | 3 | /** 4 | * 与逻辑 5 | * 或逻辑 6 | * 复合自定义逻辑 7 | * 暂不支持 8 | */ 9 | public class TagExpression { 10 | 11 | public static final String RELATION_AND = "and"; 12 | 13 | public static final String RELATION_OR = "or"; 14 | 15 | public static final String RELATION_COMPOSITE = "composite"; 16 | } 17 | -------------------------------------------------------------------------------- /femas-common/src/main/java/com/tencent/tsf/femas/common/tag/TagRuleGroup.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.common.tag; 2 | 3 | import java.util.List; 4 | 5 | /** 6 | * TODO 7 | * 暂时又各个治理模块自己实现 8 | */ 9 | public class TagRuleGroup { 10 | 11 | List rules; 12 | 13 | /** 14 | * 规则运算表达式 15 | * 默认是或 16 | */ 17 | private String expression; 18 | } 19 | -------------------------------------------------------------------------------- /femas-common/src/main/java/com/tencent/tsf/femas/common/tag/exception/TagEngineException.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.common.tag.exception; 2 | 3 | import java.text.MessageFormat; 4 | 5 | public class TagEngineException extends RuntimeException { 6 | 7 | public TagEngineException(String messageFmt, Object... args) { 8 | super(new MessageFormat(messageFmt).format(args)); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /femas-common/src/main/java/com/tencent/tsf/femas/common/util/HttpResult.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.common.util; 2 | 3 | 4 | import java.util.Map; 5 | 6 | /** 7 | * @Author leoziltong 8 | * @Description //TODO 9 | * @Date: 2021/3/29 21:33 10 | * @Version 1.0 11 | */ 12 | public class HttpResult extends Result { 13 | 14 | private Map headers; 15 | 16 | public HttpResult() { 17 | } 18 | 19 | public HttpResult(Map headers, String code, T data, String message) { 20 | super(code, message, data); 21 | this.headers = headers; 22 | } 23 | 24 | public Map getHeader() { 25 | return headers; 26 | } 27 | 28 | public void setHeader(Map header) { 29 | this.headers = header; 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /femas-common/src/main/java/com/tencent/tsf/femas/common/util/PositiveAtomicCounter.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.common.util; 2 | 3 | import java.util.concurrent.atomic.AtomicInteger; 4 | 5 | /** 6 | * 计数器,从0开始,保证正数。 7 | * 8 | * @author zhixinzxliu 9 | */ 10 | public class PositiveAtomicCounter { 11 | 12 | private static final int MASK = 0x7FFFFFFF; 13 | private final AtomicInteger atom; 14 | 15 | public PositiveAtomicCounter() { 16 | atom = new AtomicInteger(0); 17 | } 18 | 19 | public final int incrementAndGet() { 20 | return atom.incrementAndGet() & MASK; 21 | } 22 | 23 | public final int getAndIncrement() { 24 | return atom.getAndIncrement() & MASK; 25 | } 26 | 27 | public int get() { 28 | return atom.get() & MASK; 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /femas-common/src/main/java/com/tencent/tsf/femas/common/util/id/GeneratorEnum.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.common.util.id; 2 | 3 | /** 4 | * @Author leoziltong 5 | * @Description //TODO 6 | * @Date: 2021/3/31 15:13 7 | * @Version 1.0 8 | */ 9 | public enum GeneratorEnum { 10 | 11 | IP, 12 | HOST, 13 | IP_SECTION; 14 | 15 | GeneratorEnum() { 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /femas-common/src/main/java/com/tencent/tsf/femas/common/util/id/KeyGenerator.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.common.util.id; 2 | 3 | /** 4 | * @Author leoziltong 5 | * @Description //TODO 6 | * @Date: 2021/3/31 15:13 7 | * @Version 1.0 8 | */ 9 | public interface KeyGenerator { 10 | 11 | long generate(); 12 | } 13 | -------------------------------------------------------------------------------- /femas-common/src/main/java/com/tencent/tsf/femas/common/util/id/KeyGeneratorFactory.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.common.util.id; 2 | 3 | /** 4 | * @Author leoziltong 5 | * @Description //TODO 6 | * @Date: 2021/3/31 15:13 7 | * @Version 1.0 8 | */ 9 | public class KeyGeneratorFactory { 10 | 11 | public static KeyGenerator gen(GeneratorEnum type) { 12 | if (GeneratorEnum.HOST.equals(type)) { 13 | return new HostNameKeyGenerator(); 14 | } 15 | if (GeneratorEnum.IP.equals(type)) { 16 | return new IPKeyGenerator(); 17 | } 18 | if (GeneratorEnum.IP_SECTION.equals(type)) { 19 | return new IPSectionKeyGenerator(); 20 | } 21 | return new IPKeyGenerator(); 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /femas-common/src/main/java/com/tencent/tsf/femas/common/util/id/UIdGenerator.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.common.util.id; 2 | 3 | /** 4 | * @Author leoziltong 5 | * @Description //TODO 6 | * @Date: 2021/4/6 14:52 7 | * @Version 1.0 8 | */ 9 | public class UIdGenerator { 10 | 11 | public static String generateUid() { 12 | //默认IP_SECTION方式 13 | return String.valueOf(KeyGeneratorFactory.gen(GeneratorEnum.IP_SECTION).generate()); 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /femas-common/src/main/java/com/tencent/tsf/femas/common/version/Version.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.common.version; 2 | 3 | 4 | public final class Version { 5 | 6 | /** 7 | * 当前RPC版本,例如: 5.6.7 8 | */ 9 | public static final String RPC_VERSION = "0.0.1"; 10 | } 11 | -------------------------------------------------------------------------------- /femas-common/src/test/java/com/tencent/tsf/femas/common/context/AgentConfigTest.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.common.context; 2 | 3 | import com.tencent.tsf.femas.agent.classloader.AgentClassLoader; 4 | import org.junit.Assert; 5 | import org.junit.Test; 6 | 7 | public class AgentConfigTest { 8 | 9 | @Test 10 | public void testGetAgentClassLoader() { 11 | AgentClassLoader agentClassLoader = AgentConfig.getAgentClassLoader(AgentConfigTest.class, Thread.currentThread()); 12 | Assert.assertNotNull(agentClassLoader); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /femas-common/src/test/java/com/tencent/tsf/femas/common/statistic/SecondsSlidingTimeWindowMetricsTest.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.common.statistic; 2 | 3 | public class SecondsSlidingTimeWindowMetricsTest { 4 | 5 | } 6 | -------------------------------------------------------------------------------- /femas-config-impl/femas-config-consul/src/main/java/com/tencent/tsf/femas/config/impl/consul/ConsulConfigFactory.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.config.impl.consul; 2 | 3 | import com.tencent.tsf.femas.config.Config; 4 | import com.tencent.tsf.femas.config.ConfigFactory; 5 | import java.util.Map; 6 | 7 | /** 8 | * @author zhixinzxliu 9 | */ 10 | public class ConsulConfigFactory implements ConfigFactory { 11 | 12 | @Override 13 | public String getType() { 14 | return "consul"; 15 | } 16 | 17 | @Override 18 | public Config create(Map configMap) { 19 | return new ConsulConfig(configMap); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /femas-config-impl/femas-config-consul/src/main/java/com/tencent/tsf/femas/config/impl/consul/ConsulConstants.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.config.impl.consul; 2 | 3 | public class ConsulConstants { 4 | 5 | public static final String REGISTRY_HOST = "registryHost"; 6 | public static final String REGISTRY_PORT = "registryPort"; 7 | public static final String CONSUL_ACCESS_TOKEN = "consulAccessToken"; 8 | } 9 | -------------------------------------------------------------------------------- /femas-config-impl/femas-config-consul/src/main/resources/META-INF/services/com.tencent.tsf.femas.config.ConfigFactory: -------------------------------------------------------------------------------- 1 | com.tencent.tsf.femas.config.impl.consul.ConsulConfigFactory -------------------------------------------------------------------------------- /femas-config-impl/femas-config-nacos/src/main/resources/META-INF/services/com.tencent.tsf.femas.config.ConfigFactory: -------------------------------------------------------------------------------- 1 | com.tencent.tsf.femas.config.impl.nacos.FemasNacosConfigFactory -------------------------------------------------------------------------------- /femas-config-impl/femas-config-nacos/src/main/resources/META-INF/services/com.tencent.tsf.femas.config.FemasConfigManager: -------------------------------------------------------------------------------- 1 | com.tencent.tsf.femas.config.impl.nacos.FemasNacosConfigManager -------------------------------------------------------------------------------- /femas-config-impl/femas-config-paas/src/main/java/com/tencent/tsf/femas/config/impl/paas/PaasConfigFactory.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.config.impl.paas; 2 | 3 | import com.tencent.tsf.femas.config.Config; 4 | import com.tencent.tsf.femas.config.ConfigFactory; 5 | import com.tencent.tsf.femas.config.enums.FemasConfigTypeEnum; 6 | 7 | import java.util.Map; 8 | 9 | /** 10 | * @author zhixinzxliu 11 | */ 12 | public class PaasConfigFactory implements ConfigFactory { 13 | 14 | @Override 15 | public String getType() { 16 | return FemasConfigTypeEnum.PAAS.getType(); 17 | } 18 | 19 | @Override 20 | public Config create(Map configMap) { 21 | return new PaasConfig(configMap); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /femas-config-impl/femas-config-paas/src/main/java/com/tencent/tsf/femas/config/impl/paas/PaasConstants.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.config.impl.paas; 2 | 3 | public class PaasConstants { 4 | 5 | /** 6 | * 不建议中间件地址配置成IP PORT形式,建议直接配置域名,防止IP漂移。 7 | */ 8 | public static final String PAAS_SERVER_ADDRESS = "paas_server_address"; 9 | public static final String SDK_CLIENT_VERSION = "femas.sdk.client.version"; 10 | 11 | public static final String KEY = "key"; 12 | public static final String NAMESPACE_ID = "namespaceId"; 13 | public static final String SERVICE_NAME = "serviceName"; 14 | public static final String GROUP_NAME = "groupName"; 15 | 16 | } 17 | -------------------------------------------------------------------------------- /femas-config-impl/femas-config-paas/src/main/resources/META-INF/services/com.tencent.tsf.femas.config.ConfigFactory: -------------------------------------------------------------------------------- 1 | com.tencent.tsf.femas.config.impl.paas.PaasConfigFactory -------------------------------------------------------------------------------- /femas-config-impl/femas-config-paas/src/test/java/com/tencent/tsf/femas/config/impl/paas/package-info.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.config.impl.paas; -------------------------------------------------------------------------------- /femas-config/src/main/java/com/tencent/tsf/femas/config/ConfigChangeListener.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.config; 2 | 3 | import com.tencent.tsf.femas.config.model.ConfigChangeEvent; 4 | import java.util.List; 5 | 6 | public interface ConfigChangeListener { 7 | 8 | /** 9 | * Invoked when there is any config change for the namespace. 10 | * 11 | * @param changeEvents the events for this change 12 | */ 13 | void onChange(List> changeEvents); 14 | 15 | /** 16 | * Invoked when there is any config change for the namespace. 17 | * 18 | * @param changeEvent the events for this change 19 | */ 20 | void onChange(ConfigChangeEvent changeEvent); 21 | } 22 | -------------------------------------------------------------------------------- /femas-config/src/main/java/com/tencent/tsf/femas/config/ConfigFactory.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.config; 2 | 3 | import com.tencent.tsf.femas.common.annotation.SPI; 4 | import com.tencent.tsf.femas.common.spi.SpiExtensionClass; 5 | import java.util.Map; 6 | 7 | @SPI 8 | public interface ConfigFactory extends SpiExtensionClass { 9 | 10 | Config create(Map configMap); 11 | } 12 | -------------------------------------------------------------------------------- /femas-config/src/main/java/com/tencent/tsf/femas/config/ConfigName.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.config; 2 | 3 | import java.lang.annotation.Documented; 4 | import java.lang.annotation.ElementType; 5 | import java.lang.annotation.Retention; 6 | import java.lang.annotation.RetentionPolicy; 7 | import java.lang.annotation.Target; 8 | 9 | @Target({ElementType.TYPE, ElementType.METHOD}) 10 | @Retention(RetentionPolicy.RUNTIME) 11 | @Documented 12 | public @interface ConfigName { 13 | 14 | String value() default ""; 15 | } -------------------------------------------------------------------------------- /femas-config/src/main/java/com/tencent/tsf/femas/config/enums/PropertyChangeType.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.config.enums; 2 | 3 | public enum PropertyChangeType { 4 | ADDED, 5 | MODIFIED, 6 | DELETED 7 | } 8 | -------------------------------------------------------------------------------- /femas-config/src/main/java/com/tencent/tsf/femas/config/exception/FemasConfigException.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.config.exception; 2 | 3 | public class FemasConfigException extends RuntimeException { 4 | 5 | public FemasConfigException(String message) { 6 | super(message); 7 | } 8 | 9 | public FemasConfigException(String message, Throwable cause) { 10 | super(message, cause); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /femas-config/src/main/java/com/tencent/tsf/femas/config/grpc/paas/SimpleParamOrBuilder.java: -------------------------------------------------------------------------------- 1 | // Generated by the protocol buffer compiler. DO NOT EDIT! 2 | // source: PaasPolling.proto 3 | 4 | package com.tencent.tsf.femas.config.grpc.paas; 5 | 6 | public interface SimpleParamOrBuilder extends 7 | // @@protoc_insertion_point(interface_extends:grpc.SimpleParam) 8 | com.google.protobuf.MessageOrBuilder { 9 | 10 | /** 11 | * string param = 1; 12 | * @return The param. 13 | */ 14 | java.lang.String getParam(); 15 | /** 16 | * string param = 1; 17 | * @return The bytes for param. 18 | */ 19 | com.google.protobuf.ByteString getParamBytes(); 20 | } 21 | -------------------------------------------------------------------------------- /femas-config/src/main/java/com/tencent/tsf/femas/config/util/parser/ParserException.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.config.util.parser; 2 | 3 | public class ParserException extends Exception { 4 | 5 | public ParserException(String message) { 6 | super(message); 7 | } 8 | 9 | public ParserException(String message, Throwable cause) { 10 | super(message, cause); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /femas-config/src/main/resources/femas-default.conf: -------------------------------------------------------------------------------- 1 | femas_registry_ip: 127.0.0.1 2 | femas_registry_port: 8500 3 | femas_registry_type: consul 4 | #paas_server_address: http://127.0.0.1:8080 5 | monitor.log.path: /data/femas_apm/monitor/logs 6 | trace.log.path: /data/femas_apm/trace/logs 7 | femas.sdk.client.version: 1.0.0 -------------------------------------------------------------------------------- /femas-example/feams-example-springcloud-hoxton/feams-example-springcloud-hoxton-consumer/src/main/resources/nacos/bootstrap.yaml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 18002 3 | spring: 4 | application: 5 | name: femas-springcloud-hoxton-consumer 6 | cloud: 7 | nacos: 8 | discovery: 9 | server-addr: 127.0.0.1:8848 10 | username: nacos 11 | password: nacos 12 | config: 13 | server-addr: 127.0.0.1:8848 14 | 15 | ribbon: 16 | ReadTimeout: 10000 17 | ConnectTimeout: 10000 18 | MaxAutoRetries: 0 19 | # 同一个微服务其他实例的最大重试次数,不包括第一次调用的实例。默认值为1 20 | MaxAutoRetriesNextServer: 0 21 | # 是否所有操作(GET、POST等)都允许重试。默认值为false 22 | OkToRetryOnAllOperations: false 23 | 24 | logging: 25 | file: ./log/femas/${spring.application.name}/${spring.application.name} -------------------------------------------------------------------------------- /femas-example/feams-example-springcloud-hoxton/feams-example-springcloud-hoxton-provider/src/main/resources/bootstrap.yaml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 19002 3 | spring: 4 | application: 5 | name: femas-springcloud-hoxton-provider 6 | cloud: 7 | nacos: 8 | discovery: 9 | server-addr: 127.0.0.1:8848 10 | username: nacos 11 | password: nacos 12 | config: 13 | server-addr: 127.0.0.1:8848 14 | 15 | management: 16 | endpoints: 17 | web: 18 | exposure: 19 | include: '*' 20 | 21 | logging: 22 | file: ./log/femas/${spring.application.name}/${spring.application.name} -------------------------------------------------------------------------------- /femas-example/feams-example-springcloud-hoxton/feams-example-springcloud-hoxton-provider/src/main/resources/nacos/bootstrap.yaml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 19002 3 | spring: 4 | application: 5 | name: femas-springcloud-hoxton-provider 6 | cloud: 7 | nacos: 8 | discovery: 9 | server-addr: 127.0.0.1:8848 10 | username: nacos 11 | password: nacos 12 | config: 13 | server-addr: 127.0.0.1:8848 14 | 15 | management: 16 | endpoints: 17 | web: 18 | exposure: 19 | include: '*' 20 | 21 | logging: 22 | file: ./log/femas/${spring.application.name}/${spring.application.name} -------------------------------------------------------------------------------- /femas-example/feams-example-springcloud-hoxton/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | femas-example 7 | com.tencent.tsf 8 | ${revision} 9 | 10 | 4.0.0 11 | 12 | feams-example-springcloud-hoxton 13 | pom 14 | 15 | feams-example-springcloud-hoxton-provider 16 | feams-example-springcloud-hoxton-consumer 17 | 18 | 19 | -------------------------------------------------------------------------------- /femas-example/femas-example-alibaba-dubbo-consumer/src/main/java/com/tencent/tsf/femas/example/alibaba/dubbo/DemoService.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.example.alibaba.dubbo; 2 | 3 | public interface DemoService { 4 | 5 | String sayHello(String name); 6 | } 7 | -------------------------------------------------------------------------------- /femas-example/femas-example-alibaba-dubbo-consumer/src/main/resources/application.yaml: -------------------------------------------------------------------------------- 1 | logging: 2 | level: 3 | root: info -------------------------------------------------------------------------------- /femas-example/femas-example-alibaba-dubbo-consumer/src/main/resources/femas.yaml: -------------------------------------------------------------------------------- 1 | rateLimit: 2 | type: femasRateLimit 3 | 4 | authenticate: 5 | type: femasAuthenticate 6 | 7 | serviceRouter: 8 | chain: 9 | - FemasDefaultRoute 10 | 11 | loadbalancer: 12 | type: random 13 | 14 | circuitBreaker: 15 | enable: true 16 | chain: 17 | - femasCircuitBreaker 18 | # plugin: 19 | # femasCircuitBreaker: 20 | # continuousErrorThreshold: 10 21 | # metricStatTimeWindow: 1s 22 | # requestCountAfterHalfOpen: 3 23 | # sleepWindow: 5s 24 | # successCountAfterHalfOpen: 2 25 | femas_registry_ip: 106.53.127.164 26 | femas_registry_port: 8848 27 | femas_registry_type: nacos 28 | #paas_server_address: http://106.53.107.83:8080/ 29 | paas_server_address: http://127.0.0.1:8080 30 | femas_namespace_id: leo11111 31 | femas_prog_version: 2 -------------------------------------------------------------------------------- /femas-example/femas-example-alibaba-dubbo-provider/src/main/java/com/tencent/tsf/femas/example/alibaba/dubbo/DemoService.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.example.alibaba.dubbo; 2 | 3 | public interface DemoService { 4 | 5 | String sayHello(String name); 6 | } 7 | -------------------------------------------------------------------------------- /femas-example/femas-example-alibaba-dubbo-provider/src/main/java/com/tencent/tsf/femas/example/alibaba/dubbo/DemoServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.example.alibaba.dubbo; 2 | 3 | import com.alibaba.dubbo.rpc.RpcContext; 4 | 5 | import java.text.SimpleDateFormat; 6 | import java.util.Date; 7 | 8 | public class DemoServiceImpl implements DemoService { 9 | 10 | @Override 11 | public String sayHello(String name) { 12 | System.out.println("[" + new SimpleDateFormat("HH:mm:ss").format(new Date()) + "] Hello " + name + ", request from consumer: " + RpcContext.getContext().getRemoteAddress()); 13 | return "Hello " + name + ", response from provider: " + RpcContext.getContext().getLocalAddress(); 14 | } 15 | 16 | } -------------------------------------------------------------------------------- /femas-example/femas-example-alibaba-dubbo-provider/src/main/resources/application.yaml: -------------------------------------------------------------------------------- 1 | logging: 2 | level: 3 | root: info -------------------------------------------------------------------------------- /femas-example/femas-example-alibaba-dubbo-provider/src/main/resources/femas.yaml: -------------------------------------------------------------------------------- 1 | rateLimit: 2 | type: femasRateLimit 3 | 4 | authenticate: 5 | type: femasAuthenticate 6 | 7 | serviceRouter: 8 | chain: 9 | - FemasDefaultRoute 10 | 11 | loadbalancer: 12 | type: random 13 | 14 | circuitBreaker: 15 | enable: true 16 | chain: 17 | - femasCircuitBreaker 18 | # plugin: 19 | # femasCircuitBreaker: 20 | # continuousErrorThreshold: 10 21 | # metricStatTimeWindow: 1s 22 | # requestCountAfterHalfOpen: 3 23 | # sleepWindow: 5s 24 | # successCountAfterHalfOpen: 2 25 | femas_registry_ip: 106.53.127.164 26 | femas_registry_port: 8848 27 | femas_registry_type: nacos 28 | #paas_server_address: http://106.53.107.83:8080/ 29 | paas_server_address: http://127.0.0.1:8080 30 | femas_namespace_id: leo11111 31 | femas_prog_version: 2 -------------------------------------------------------------------------------- /femas-example/femas-example-apache-dubbo3/femas-example-apache-dubbo3-api/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | femas-example-apache-dubbo3 7 | com.tencent.tsf 8 | ${revision} 9 | 10 | 4.0.0 11 | 12 | com.tencent.tsf 13 | femas-example-apache-dubbo3-api 14 | 15 | -------------------------------------------------------------------------------- /femas-example/femas-example-apache-dubbo3/femas-example-apache-dubbo3-api/src/main/java/com/tencent/tsf/femas/example/apache/dubbo/api/ApacheDubboExampleService.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.example.apache.dubbo.api; 2 | 3 | import java.util.concurrent.CompletableFuture; 4 | 5 | public interface ApacheDubboExampleService { 6 | String sayHello(String name); 7 | 8 | default CompletableFuture sayHelloAsync(String name) { 9 | return CompletableFuture.completedFuture(sayHello(name)); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /femas-example/femas-example-apache-dubbo3/femas-example-apache-dubbo3-consumer/src/main/resources/femas.yaml: -------------------------------------------------------------------------------- 1 | rateLimit: 2 | type: femasRateLimit 3 | 4 | authenticate: 5 | type: femasAuthenticate 6 | 7 | serviceRouter: 8 | chain: 9 | - FemasDefaultRoute 10 | 11 | loadbalancer: 12 | type: random 13 | 14 | circuitBreaker: 15 | enable: true 16 | chain: 17 | - femasCircuitBreaker 18 | # plugin: 19 | # femasCircuitBreaker: 20 | # continuousErrorThreshold: 10 21 | # metricStatTimeWindow: 1s 22 | # requestCountAfterHalfOpen: 3 23 | # sleepWindow: 5s 24 | # successCountAfterHalfOpen: 2 25 | femas_registry_ip: 127.0.0.1 26 | femas_registry_port: 8848 27 | femas_registry_type: nacos 28 | paas_server_address: http://127.0.0.1:8080 29 | femas_namespace_id: leo11111 30 | femas_prog_version: 2 -------------------------------------------------------------------------------- /femas-example/femas-example-apache-dubbo3/femas-example-apache-dubbo3-provider/src/main/java/com/tencent/tsf/femas/example/apache/dubbo/ApacheDubboProviderApp.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.example.apache.dubbo; 2 | 3 | import org.apache.dubbo.config.spring.context.annotation.EnableDubbo; 4 | import org.springframework.boot.SpringApplication; 5 | import org.springframework.boot.autoconfigure.SpringBootApplication; 6 | import org.springframework.context.annotation.Profile; 7 | 8 | @EnableDubbo(scanBasePackages = {"com.tencent.tsf.femas.example.apache.dubbo.provider"}) 9 | @SpringBootApplication 10 | public class ApacheDubboProviderApp { 11 | 12 | public static void main(String[] args) { 13 | System.setProperty("spring.profiles.active","v1"); 14 | SpringApplication.run(ApacheDubboProviderApp.class, args); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /femas-example/femas-example-apache-dubbo3/femas-example-apache-dubbo3-provider/src/main/java/com/tencent/tsf/femas/example/apache/dubbo/ApacheDubboV2ProviderApp.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.example.apache.dubbo; 2 | 3 | import org.apache.dubbo.config.spring.context.annotation.EnableDubbo; 4 | import org.springframework.boot.SpringApplication; 5 | import org.springframework.boot.autoconfigure.SpringBootApplication; 6 | 7 | @EnableDubbo(scanBasePackages = {"com.tencent.tsf.femas.example.apache.dubbo.provider"}) 8 | @SpringBootApplication 9 | public class ApacheDubboV2ProviderApp { 10 | 11 | public static void main(String[] args) { 12 | System.setProperty("spring.profiles.active","v2"); 13 | SpringApplication.run(ApacheDubboV2ProviderApp.class, args); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /femas-example/femas-example-apache-dubbo3/femas-example-apache-dubbo3-provider/src/main/java/com/tencent/tsf/femas/example/apache/dubbo/provider/ApacheDubboProvider.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.example.apache.dubbo.provider; 2 | 3 | import com.tencent.tsf.femas.example.apache.dubbo.api.ApacheDubboExampleService; 4 | import org.apache.dubbo.config.annotation.DubboService; 5 | 6 | @DubboService(version = "1.0") 7 | public class ApacheDubboProvider implements ApacheDubboExampleService { 8 | 9 | @Override 10 | public String sayHello(String name) { 11 | try { 12 | Thread.sleep(100); 13 | } catch (InterruptedException e) { 14 | e.printStackTrace(); 15 | } 16 | return "hello " + name; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /femas-example/femas-example-apache-dubbo3/femas-example-apache-dubbo3-provider/src/main/resources/application-v1.properties: -------------------------------------------------------------------------------- 1 | server.port=17722 2 | spring.application.name=dubbo3-service-provider 3 | dubbo.application.name=dubbo3-service-provider 4 | dubbo.registry.parameters.namespace=ns-38n9xvnd 5 | dubbo.registry.address=femas://218.78.55.64:8848 6 | dubbo.protocol.name=dubbo 7 | #dubbo.registry.group=dubbo3_group 8 | dubbo.protocol.port=-1 9 | dubbo.application.register-mode=instance 10 | dubbo.application.enable-file-cache=false 11 | dubbo.application.qos-enable=true 12 | dubbo.application.qos-port=33333 13 | dubbo.application.qos-accept-foreign-ip=false 14 | dubbo.config-center.address=nacos://218.78.55.64:8848 15 | dubbo.metadata-report.address=nacos://218.78.55.64:8848 -------------------------------------------------------------------------------- /femas-example/femas-example-apache-dubbo3/femas-example-apache-dubbo3-provider/src/main/resources/application-v2.properties: -------------------------------------------------------------------------------- 1 | server.port=27722 2 | spring.application.name=dubbo3-service-provider 3 | dubbo.application.name=dubbo3-service-provider 4 | dubbo.registry.parameters.namespace=ns-38n9xvnd 5 | dubbo.registry.address=femas://218.78.55.64:8848 6 | dubbo.protocol.name=dubbo 7 | #dubbo.registry.group=dubbo3_group 8 | dubbo.protocol.port=-1 9 | dubbo.application.register-mode=instance 10 | dubbo.application.enable-file-cache=false 11 | dubbo.application.qos-enable=true 12 | dubbo.application.qos-port=33333 13 | dubbo.application.qos-accept-foreign-ip=false 14 | dubbo.config-center.address=nacos://218.78.55.64:8848 15 | dubbo.metadata-report.address=nacos://218.78.55.64:8848 -------------------------------------------------------------------------------- /femas-example/femas-example-apache-dubbo3/femas-example-apache-dubbo3-provider/src/main/resources/femas.yaml: -------------------------------------------------------------------------------- 1 | rateLimit: 2 | type: femasRateLimit 3 | 4 | authenticate: 5 | type: femasAuthenticate 6 | 7 | serviceRouter: 8 | chain: 9 | - FemasDefaultRoute 10 | 11 | loadbalancer: 12 | type: random 13 | 14 | circuitBreaker: 15 | enable: true 16 | chain: 17 | - femasCircuitBreaker 18 | # plugin: 19 | # femasCircuitBreaker: 20 | # continuousErrorThreshold: 10 21 | # metricStatTimeWindow: 1s 22 | # requestCountAfterHalfOpen: 3 23 | # sleepWindow: 5s 24 | # successCountAfterHalfOpen: 2 25 | femas_registry_ip: 127.0.0.1 26 | femas_registry_port: 8848 27 | femas_registry_type: nacos 28 | paas_server_address: http://127.0.0.1:8080 29 | femas_namespace_id: leo11111 30 | femas_prog_version: 2 -------------------------------------------------------------------------------- /femas-example/femas-example-springcloud-2020-consumer/src/main/resources/consul/bootstrap.yaml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 18001 3 | spring: 4 | application: 5 | name: femas-example-springcloud2020-consumer 6 | cloud: 7 | consul: 8 | host: 127.0.0.1 9 | port: 8500 10 | discovery: 11 | serviceName: femas-example-springcloud2020-consumer 12 | instanceId: ${spring.application.name}-${server.port}-${spring.cloud.client.hostname} 13 | heartbeat: 14 | enabled: true 15 | 16 | ribbon: 17 | ReadTimeout: 10000 18 | ConnectTimeout: 10000 19 | MaxAutoRetries: 0 20 | # 同一个微服务其他实例的最大重试次数,不包括第一次调用的实例。默认值为1 21 | MaxAutoRetriesNextServer: 0 22 | # 是否所有操作(GET、POST等)都允许重试。默认值为false 23 | OkToRetryOnAllOperations: false 24 | -------------------------------------------------------------------------------- /femas-example/femas-example-springcloud-2020-consumer/src/main/resources/femas.yaml: -------------------------------------------------------------------------------- 1 | 2 | #控制台配置(治理规则从控制台拉取热更新,不配置此项,则插件治理规则从此文件加载) 3 | #paas_server_address: http://106.53.107.83:8080/ 4 | paas_server_address: http://127.0.0.1:8080 5 | 6 | femas_namespace_id: leo11111 7 | femas_prog_version: 2 8 | #治理插件配置(插件类型,插件规则,不配置则加载Femas默认插件) 9 | 10 | serviceRouter: 11 | chain: 12 | - FemasDefaultRoute 13 | 14 | rateLimit: 15 | type: femasRateLimit 16 | 17 | authenticate: 18 | type: femasAuthenticate 19 | 20 | loadbalancer: 21 | type: random 22 | 23 | circuitBreaker: 24 | enable: true 25 | chain: 26 | - femasCircuitBreaker 27 | 28 | # plugin: 29 | # femasCircuitBreaker: 30 | # continuousErrorThreshold: 10 31 | # metricStatTimeWindow: 1s 32 | # requestCountAfterHalfOpen: 3 33 | # sleepWindow: 5s 34 | # successCountAfterHalfOpen: 2 -------------------------------------------------------------------------------- /femas-example/femas-example-springcloud-2020-consumer/src/main/resources/nacos/bootstrap.yaml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 18001 3 | spring: 4 | application: 5 | name: femas-example-springcloud2020-consumer 6 | cloud: 7 | nacos: 8 | discovery: 9 | server-addr: 127.0.0.1:8848 10 | username: nacos 11 | password: nacos 12 | config: 13 | server-addr: 127.0.0.1:8848 14 | 15 | ribbon: 16 | ReadTimeout: 10000 17 | ConnectTimeout: 10000 18 | MaxAutoRetries: 0 19 | # 同一个微服务其他实例的最大重试次数,不包括第一次调用的实例。默认值为1 20 | MaxAutoRetriesNextServer: 0 21 | # 是否所有操作(GET、POST等)都允许重试。默认值为false 22 | OkToRetryOnAllOperations: false 23 | -------------------------------------------------------------------------------- /femas-example/femas-example-springcloud-2020-provider/src/main/resources/femas.yaml: -------------------------------------------------------------------------------- 1 | 2 | #控制台配置(治理规则从控制台拉取热更新,不配置此项,则插件治理规则从此文件加载) 3 | #paas_server_address: http://106.53.107.83:8080/ 4 | paas_server_address: http://127.0.0.1:8080 5 | 6 | femas_namespace_id: leo11111 7 | femas_prog_version: 2 8 | #治理插件配置(插件类型,插件规则,不配置则加载Femas默认插件) 9 | 10 | serviceRouter: 11 | chain: 12 | - FemasDefaultRoute 13 | 14 | rateLimit: 15 | type: femasRateLimit 16 | 17 | authenticate: 18 | type: femasAuthenticate 19 | 20 | loadbalancer: 21 | type: random 22 | 23 | circuitBreaker: 24 | enable: true 25 | chain: 26 | - femasCircuitBreaker 27 | 28 | # plugin: 29 | # femasCircuitBreaker: 30 | # continuousErrorThreshold: 10 31 | # metricStatTimeWindow: 1s 32 | # requestCountAfterHalfOpen: 3 33 | # sleepWindow: 5s 34 | # successCountAfterHalfOpen: 2 -------------------------------------------------------------------------------- /femas-example/femas-example-springcloud-2020-provider/src/main/resources/nacos/bootstrap.yaml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 19001 3 | spring: 4 | application: 5 | name: femas-example-springcloud2020-provider 6 | cloud: 7 | nacos: 8 | discovery: 9 | server-addr: 127.0.0.1:8848 10 | username: nacos 11 | password: nacos 12 | config: 13 | server-addr: 127.0.0.1:8848 14 | # file-extension: properties 15 | # refresh-enabled: true 16 | # namespace: ns-mldqvo58 17 | # shared-configs[0]: 18 | # data-id: testDataId 19 | # refresh: true 20 | # group: DEFAULT_GROUP 21 | 22 | management: 23 | endpoints: 24 | web: 25 | exposure: 26 | include: '*' 27 | 28 | 29 | rateLimit: 30 | type: femasRateLimit 31 | 32 | 33 | logging: 34 | level: 35 | root: info -------------------------------------------------------------------------------- /femas-example/femas-example-springcloud-discovery/README.md: -------------------------------------------------------------------------------- 1 | # 工程简介 2 | 3 | # 延伸阅读 4 | 5 | -------------------------------------------------------------------------------- /femas-example/femas-example-springcloud-discovery/src/main/java/com/tencent/tsf/femas/examples/FemasExampleSpringcloudDiscoveryApplication.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.examples; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class FemasExampleSpringcloudDiscoveryApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(FemasExampleSpringcloudDiscoveryApplication.class, args); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /femas-example/femas-example-springcloud-discovery/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | server.port=2333 2 | spring.application.name=femas-example-springcloud-discovery 3 | spring.cloud.femas.discovery.ip=127.0.0.1 4 | spring.cloud.femas.discovery.registryType=nacos 5 | spring.cloud.femas.discovery.namespace=public 6 | spring.cloud.femas.discovery.port=8848 -------------------------------------------------------------------------------- /femas-example/femas-example-springcloud-greenwich-consumer/src/main/resources/consul/bootstrap.yaml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 18001 3 | spring: 4 | application: 5 | name: femas-springcloud-consumer 6 | cloud: 7 | consul: 8 | host: 127.0.0.1 9 | port: 8500 10 | discovery: 11 | serviceName: femas-springcloud-consumer 12 | instanceId: ${spring.application.name}-${server.port}-${spring.cloud.client.hostname} 13 | heartbeat: 14 | enabled: true 15 | 16 | ribbon: 17 | ReadTimeout: 10000 18 | ConnectTimeout: 10000 19 | MaxAutoRetries: 0 20 | # 同一个微服务其他实例的最大重试次数,不包括第一次调用的实例。默认值为1 21 | MaxAutoRetriesNextServer: 0 22 | # 是否所有操作(GET、POST等)都允许重试。默认值为false 23 | OkToRetryOnAllOperations: false 24 | 25 | logging: 26 | file: ./log/femas/${spring.application.name}/${spring.application.name} -------------------------------------------------------------------------------- /femas-example/femas-example-springcloud-greenwich-consumer/src/main/resources/nacos/bootstrap.yaml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 18001 3 | spring: 4 | application: 5 | name: femas-springcloud-consumer 6 | cloud: 7 | nacos: 8 | discovery: 9 | server-addr: 127.0.0.1:8848 10 | username: nacos 11 | password: nacos 12 | config: 13 | server-addr: 127.0.0.1:8848 14 | 15 | ribbon: 16 | ReadTimeout: 10000 17 | ConnectTimeout: 10000 18 | MaxAutoRetries: 0 19 | # 同一个微服务其他实例的最大重试次数,不包括第一次调用的实例。默认值为1 20 | MaxAutoRetriesNextServer: 0 21 | # 是否所有操作(GET、POST等)都允许重试。默认值为false 22 | OkToRetryOnAllOperations: false 23 | 24 | logging: 25 | file: ./log/femas/${spring.application.name}/${spring.application.name} -------------------------------------------------------------------------------- /femas-example/femas-example-springcloud-greenwich-provider/src/main/resources/bootstrap.yaml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 19001 3 | spring: 4 | application: 5 | name: femas-springcloud-provider 6 | cloud: 7 | nacos: 8 | discovery: 9 | server-addr: 127.0.0.1:8848 10 | username: nacos 11 | password: nacos 12 | config: 13 | server-addr: 127.0.0.1:8848 14 | 15 | management: 16 | endpoints: 17 | web: 18 | exposure: 19 | include: '*' 20 | 21 | logging: 22 | file: ./log/femas/${spring.application.name}/${spring.application.name} -------------------------------------------------------------------------------- /femas-example/femas-example-springcloud-greenwich-provider/src/main/resources/consul/bootstrap.yaml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 19001 3 | spring: 4 | application: 5 | name: femas-springcloud-provider 6 | cloud: 7 | consul: 8 | host: 127.0.0.1 9 | port: 8500 10 | discovery: 11 | serviceName: femas-springcloud-provider 12 | instanceId: ${spring.application.name}-${server.port}-${spring.cloud.client.hostname} 13 | heartbeat: 14 | enabled: true 15 | 16 | management: 17 | endpoints: 18 | web: 19 | exposure: 20 | include: '*' 21 | 22 | logging: 23 | file: ./log/femas/${spring.application.name}/${spring.application.name} -------------------------------------------------------------------------------- /femas-example/femas-example-springcloud-greenwich-provider/src/main/resources/eureka/bootstrap.yaml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 19001 3 | spring: 4 | application: 5 | name: femas-springcloud-provider 6 | 7 | eureka: 8 | client: 9 | serviceUrl: 10 | defaultZone: http://localhost:8080/eureka/ 11 | 12 | management: 13 | endpoints: 14 | web: 15 | exposure: 16 | include: '*' 17 | 18 | logging: 19 | file: ./log/femas/${spring.application.name}/${spring.application.name} -------------------------------------------------------------------------------- /femas-example/femas-example-springcloud-greenwich-provider/src/main/resources/femas.yaml: -------------------------------------------------------------------------------- 1 | 2 | #控制台配置(治理规则从控制台拉取热更新,不配置此项,则插件治理规则从此文件加载) 3 | #paas_server_address: http://106.53.107.83:8080/ 4 | paas_server_address: http://127.0.0.1:8080 5 | 6 | femas_namespace_id: leo11111 7 | femas_prog_version: 2 8 | 9 | #治理插件配置(插件类型,插件规则,不配置则加载Femas默认插件) 10 | rateLimit: 11 | type: femasRateLimit 12 | 13 | authenticate: 14 | type: femasAuthenticate 15 | 16 | serviceRouter: 17 | chain: 18 | - FemasDefaultRoute 19 | 20 | loadbalancer: 21 | type: random 22 | 23 | circuitBreaker: 24 | enable: true 25 | chain: 26 | - femasCircuitBreaker 27 | # plugin: 28 | # femasCircuitBreaker: 29 | # continuousErrorThreshold: 10 30 | # metricStatTimeWindow: 1s 31 | # requestCountAfterHalfOpen: 3 32 | # sleepWindow: 5s 33 | # successCountAfterHalfOpen: 2 -------------------------------------------------------------------------------- /femas-example/femas-example-springcloud-greenwich-provider/src/main/resources/nacos/bootstrap.yaml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 19001 3 | spring: 4 | application: 5 | name: femas-springcloud-provider 6 | cloud: 7 | nacos: 8 | discovery: 9 | server-addr: 106.53.127.164:8848 10 | username: nacos 11 | password: nacos 12 | config: 13 | server-addr: 106.53.127.164:8848 14 | 15 | management: 16 | endpoints: 17 | web: 18 | exposure: 19 | include: '*' 20 | 21 | logging: 22 | file: ./log/femas/${spring.application.name}/${spring.application.name} -------------------------------------------------------------------------------- /femas-example/femas-gray-example-springcloud-consumer/src/main/java/com/tencent/tsf/femas/gray/example/springcloud/feign/FemasFeignClient.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.gray.example.springcloud.feign; 2 | 3 | import org.springframework.cloud.openfeign.FeignClient; 4 | import org.springframework.web.bind.annotation.GetMapping; 5 | 6 | @FeignClient(name = "femas-gray-example-cloud-provider") 7 | public interface FemasFeignClient { 8 | @GetMapping("/get") 9 | String get(); 10 | 11 | } 12 | -------------------------------------------------------------------------------- /femas-example/femas-gray-example-springcloud-consumer/src/main/resources/bootstrap-c1.yaml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 19004 3 | spring: 4 | application: 5 | name: femas-gray-example-cloud-consumer 6 | cloud: 7 | nacos: 8 | discovery: 9 | server-addr: 43.143.122.232:8848 10 | namespace: gray 11 | username: nacos 12 | password: nacos 13 | config: 14 | server-addr: 43.143.122.232:8848 15 | main: 16 | allow-bean-definition-overriding: true 17 | management: 18 | endpoints: 19 | web: 20 | exposure: 21 | include: '*' 22 | logging: 23 | file: ./log/femas/${spring.application.name}/${spring.application.name} 24 | 25 | -------------------------------------------------------------------------------- /femas-example/femas-gray-example-springcloud-consumer/src/main/resources/bootstrap-c2.yaml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 29004 3 | spring: 4 | application: 5 | name: femas-gray-example-cloud-consumer 6 | cloud: 7 | nacos: 8 | discovery: 9 | server-addr: 43.143.122.232:8848 10 | namespace: gray 11 | username: nacos 12 | password: nacos 13 | config: 14 | server-addr: 43.143.122.232:8848 15 | main: 16 | allow-bean-definition-overriding: true 17 | management: 18 | endpoints: 19 | web: 20 | exposure: 21 | include: '*' 22 | logging: 23 | file: ./log/femas/${spring.application.name}/${spring.application.name} 24 | 25 | -------------------------------------------------------------------------------- /femas-example/femas-gray-example-springcloud-provider/src/main/resources/bootstrap-p1.yaml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 19003 3 | spring: 4 | application: 5 | name: femas-gray-example-cloud-provider 6 | cloud: 7 | nacos: 8 | discovery: 9 | server-addr: 43.143.122.232:8848 10 | namespace: gray 11 | username: nacos 12 | password: nacos 13 | config: 14 | server-addr: 43.143.122.232:8848 15 | management: 16 | endpoints: 17 | web: 18 | exposure: 19 | include: '*' 20 | logging: 21 | file: ./log/femas/${spring.application.name}/${spring.application.name} 22 | 23 | -------------------------------------------------------------------------------- /femas-example/femas-gray-example-springcloud-provider/src/main/resources/bootstrap-p2.yaml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 29003 3 | spring: 4 | application: 5 | name: femas-gray-example-cloud-provider 6 | cloud: 7 | nacos: 8 | discovery: 9 | server-addr: 43.143.122.232:8848 10 | namespace: gray 11 | username: nacos 12 | password: nacos 13 | config: 14 | server-addr: 43.143.122.232:8848 15 | management: 16 | endpoints: 17 | web: 18 | exposure: 19 | include: '*' 20 | logging: 21 | file: ./log/femas/${spring.application.name}/${spring.application.name} 22 | 23 | -------------------------------------------------------------------------------- /femas-example/femas-gray-example-springcloud-provider/src/main/resources/femas.yaml: -------------------------------------------------------------------------------- 1 | 2 | #控制台配置(治理规则从控制台拉取热更新,不配置此项,则插件治理规则从此文件加载) 3 | #paas_server_address: http://106.53.107.83:8080/ 4 | paas_server_address: http://127.0.0.1:8080 5 | 6 | femas_namespace_id: gray 7 | 8 | #治理插件配置(插件类型,插件规则,不配置则加载Femas默认插件) 9 | rateLimit: 10 | type: femasRateLimit 11 | 12 | authenticate: 13 | type: femasAuthenticate 14 | 15 | serviceRouter: 16 | chain: 17 | - FemasDefaultRoute 18 | 19 | loadbalancer: 20 | type: random 21 | 22 | circuitBreaker: 23 | enable: true 24 | chain: 25 | - femasCircuitBreaker 26 | # plugin: 27 | # femasCircuitBreaker: 28 | # continuousErrorThreshold: 10 29 | # metricStatTimeWindow: 1s 30 | # requestCountAfterHalfOpen: 3 31 | # sleepWindow: 5s 32 | # successCountAfterHalfOpen: 2 -------------------------------------------------------------------------------- /femas-extensions/femas-extension-dubbo/femas-extension-alibaba-dubbo/src/main/java/com/tencent/tsf/femas/extensions/dubbo/registry/FemasDubboRegistryFactory.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.extensions.dubbo.registry; 2 | 3 | import com.alibaba.dubbo.common.URL; 4 | import com.alibaba.dubbo.registry.Registry; 5 | import com.alibaba.dubbo.registry.support.AbstractRegistryFactory; 6 | 7 | 8 | public class FemasDubboRegistryFactory extends AbstractRegistryFactory { 9 | 10 | @Override 11 | protected Registry createRegistry(URL url) { 12 | return new FemasDubboRegistry(url); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /femas-extensions/femas-extension-dubbo/femas-extension-alibaba-dubbo/src/main/java/com/tencent/tsf/femas/extensions/dubbo/router/FemasRouterFactory.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.extensions.dubbo.router; 2 | 3 | import com.alibaba.dubbo.common.URL; 4 | import com.alibaba.dubbo.rpc.cluster.Router; 5 | import com.alibaba.dubbo.rpc.cluster.RouterFactory; 6 | 7 | public class FemasRouterFactory implements RouterFactory { 8 | 9 | @Override 10 | public Router getRouter(URL url) { 11 | return new FemasRouter(url); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /femas-extensions/femas-extension-dubbo/femas-extension-alibaba-dubbo/src/main/resources/META-INF/services/com.alibaba.dubbo.registry.RegistryFactory: -------------------------------------------------------------------------------- 1 | femas=com.tencent.tsf.femas.extensions.dubbo.registry.FemasDubboRegistryFactory -------------------------------------------------------------------------------- /femas-extensions/femas-extension-dubbo/femas-extension-alibaba-dubbo/src/main/resources/META-INF/services/com.alibaba.dubbo.rpc.Filter: -------------------------------------------------------------------------------- 1 | femasConsumerFilter=com.tencent.tsf.femas.extensions.dubbo.filter.FemasConsumerFilter 2 | femasProviderFilter=com.tencent.tsf.femas.extensions.dubbo.filter.FemasProviderFilter -------------------------------------------------------------------------------- /femas-extensions/femas-extension-dubbo/femas-extension-alibaba-dubbo/src/main/resources/META-INF/services/com.alibaba.dubbo.rpc.cluster.RouterFactory: -------------------------------------------------------------------------------- 1 | femasrouter=com.tencent.tsf.femas.extensions.dubbo.router.FemasRouterFactory -------------------------------------------------------------------------------- /femas-extensions/femas-extension-dubbo/femas-extension-apache-dubbo3/src/main/java/com/tencent/tsf/femas/extensions/dubbo/discovery/FemasServiceDiscoveryFactory.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.extensions.dubbo.discovery; 2 | 3 | import org.apache.dubbo.common.URL; 4 | import org.apache.dubbo.registry.client.AbstractServiceDiscoveryFactory; 5 | import org.apache.dubbo.registry.client.ServiceDiscovery; 6 | 7 | public class FemasServiceDiscoveryFactory extends AbstractServiceDiscoveryFactory { 8 | 9 | @Override 10 | protected ServiceDiscovery createDiscovery(URL registryURL) { 11 | return new FemasServiceDiscovery(applicationModel, registryURL); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /femas-extensions/femas-extension-dubbo/femas-extension-apache-dubbo3/src/main/java/com/tencent/tsf/femas/extensions/dubbo/registry/FemasApacheDubboRegistryFactory.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.extensions.dubbo.registry; 2 | 3 | import org.apache.dubbo.common.URL; 4 | import org.apache.dubbo.common.extension.Activate; 5 | import org.apache.dubbo.registry.Registry; 6 | import org.apache.dubbo.registry.support.AbstractRegistryFactory; 7 | 8 | @Activate 9 | public class FemasApacheDubboRegistryFactory extends AbstractRegistryFactory { 10 | 11 | @Override 12 | protected Registry createRegistry(URL url) { 13 | return new FemasApacheDubboRegistry(url); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /femas-extensions/femas-extension-dubbo/femas-extension-apache-dubbo3/src/main/java/com/tencent/tsf/femas/extensions/dubbo/router/FemasApacheDubboRouterFactory.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.extensions.dubbo.router; 2 | 3 | import org.apache.dubbo.common.URL; 4 | import org.apache.dubbo.common.extension.Activate; 5 | import org.apache.dubbo.rpc.cluster.Router; 6 | import org.apache.dubbo.rpc.cluster.RouterFactory; 7 | 8 | @Activate 9 | public class FemasApacheDubboRouterFactory implements RouterFactory { 10 | 11 | @Override 12 | public Router getRouter(URL url) { 13 | return new FemasApacheDubboRouter(url); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /femas-extensions/femas-extension-dubbo/femas-extension-apache-dubbo3/src/main/resources/META-INF/services/org.apache.dubbo.registry.RegistryFactory: -------------------------------------------------------------------------------- 1 | femas=com.tencent.tsf.femas.extensions.dubbo.registry.FemasApacheDubboRegistryFactory -------------------------------------------------------------------------------- /femas-extensions/femas-extension-dubbo/femas-extension-apache-dubbo3/src/main/resources/META-INF/services/org.apache.dubbo.registry.client.ServiceDiscoveryFactory: -------------------------------------------------------------------------------- 1 | femas=com.tencent.tsf.femas.extensions.dubbo.discovery.FemasServiceDiscoveryFactory -------------------------------------------------------------------------------- /femas-extensions/femas-extension-dubbo/femas-extension-apache-dubbo3/src/main/resources/META-INF/services/org.apache.dubbo.rpc.Filter: -------------------------------------------------------------------------------- 1 | femasConsumerFilter=com.tencent.tsf.femas.extensions.dubbo.filter.FemasConsumerFilter 2 | femasProviderFilter=com.tencent.tsf.femas.extensions.dubbo.filter.FemasProviderFilter -------------------------------------------------------------------------------- /femas-extensions/femas-extension-dubbo/femas-extension-apache-dubbo3/src/main/resources/META-INF/services/org.apache.dubbo.rpc.cluster.RouterFactory: -------------------------------------------------------------------------------- 1 | femasRouterFactory=com.tencent.tsf.femas.extensions.dubbo.router.FemasApacheDubboRouterFactory -------------------------------------------------------------------------------- /femas-extensions/femas-extension-springcloud/femas-extension-springcloud-2020.0-ilford/src/main/java/com/tencent/tsf/femas/extension/springcloud/ilford/discovery/loadbalancer/FemasServiceFilterLoadBalancer.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.extension.springcloud.ilford.discovery.loadbalancer; 2 | 3 | import org.springframework.cloud.client.ServiceInstance; 4 | 5 | 6 | public interface FemasServiceFilterLoadBalancer { 7 | 8 | void beforeChooseServer(Object key); 9 | 10 | void afterChooseServer(ServiceInstance server, Object key); 11 | 12 | } 13 | -------------------------------------------------------------------------------- /femas-extensions/femas-extension-springcloud/femas-extension-springcloud-common/src/main/java/com/tencent/tsf/femas/extension/springcloud/common/discovery/loadbalancer/BaseDiscoveryServerConverter.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.extension.springcloud.common.discovery.loadbalancer;/* 2 | /** 3 | * 所有spring cloud版本通用的converter转换器里的方法 4 | * 5 | * @Author juanyinyang 6 | */ 7 | 8 | public interface BaseDiscoveryServerConverter { 9 | 10 | default String getNamespace() { 11 | return null; 12 | } 13 | 14 | default String getServiceName() { 15 | return null; 16 | } 17 | 18 | default String getVersion() { 19 | return null; 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /femas-extensions/femas-extension-springcloud/femas-extension-springcloud-greenwich-gateway/src/main/resources/META-INF/spring.factories: -------------------------------------------------------------------------------- 1 | org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ 2 | com.tencent.tsf.femas.springcloud.gateway.config.FemasDiscoveryAutoConfiguration,\ 3 | com.tencent.tsf.femas.extension.springcloud.common.instrumentation.config.FemasGovernanceAutoConfiguration,\ 4 | com.tencent.tsf.femas.springcloud.gateway.config.GatewayAutoConfiguration -------------------------------------------------------------------------------- /femas-extensions/femas-extension-springcloud/femas-extension-springcloud-greenwich-zuul/src/main/resources/META-INF/spring.factories: -------------------------------------------------------------------------------- 1 | org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ 2 | com.tencent.tsf.femas.extension.zuul.filter.FemasRibbonRoutingFilter -------------------------------------------------------------------------------- /femas-extensions/femas-extension-springcloud/femas-extension-springcloud-greenwich/src/main/java/com/tencent/tsf/femas/extension/springcloud/discovery/ribbon/FemasServiceFilterLoadBalancer.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.extension.springcloud.discovery.ribbon; 2 | 3 | import com.netflix.loadbalancer.Server; 4 | import java.util.List; 5 | 6 | 7 | public interface FemasServiceFilterLoadBalancer { 8 | 9 | void beforeChooseServer(Object key); 10 | 11 | void afterChooseServer(Server server, Object key); 12 | 13 | List filterAllServer(List servers); 14 | } 15 | -------------------------------------------------------------------------------- /femas-extensions/femas-extension-springcloud/femas-extension-springcloud-hoxton/src/main/java/com/tencent/tsf/femas/extension/springcloud/hoxton/discovery/ribbon/FemasServiceFilterLoadBalancer.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.extension.springcloud.hoxton.discovery.ribbon; 2 | 3 | import com.netflix.loadbalancer.Server; 4 | 5 | import java.util.List; 6 | 7 | 8 | public interface FemasServiceFilterLoadBalancer { 9 | 10 | void beforeChooseServer(Object key); 11 | 12 | void afterChooseServer(Server server, Object key); 13 | 14 | List filterAllServer(List servers); 15 | } 16 | -------------------------------------------------------------------------------- /femas-governance-impl/src/main/java/com/tencent/tsf/femas/governance/api/entity/OpenApiEntity.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.governance.api.entity; 2 | 3 | import java.util.HashMap; 4 | import java.util.Map; 5 | 6 | public class OpenApiEntity { 7 | 8 | public Map paths = new HashMap(); 9 | } 10 | -------------------------------------------------------------------------------- /femas-governance-impl/src/main/java/com/tencent/tsf/femas/governance/api/entity/OpenApiParameters.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.governance.api.entity; 2 | 3 | public class OpenApiParameters { 4 | 5 | public String name; 6 | public String in = "query"; 7 | public boolean required = true; 8 | } 9 | -------------------------------------------------------------------------------- /femas-governance-impl/src/main/java/com/tencent/tsf/femas/governance/api/entity/OpenApiPath.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.governance.api.entity; 2 | 3 | import java.util.HashMap; 4 | import java.util.Map; 5 | 6 | public class OpenApiPath { 7 | 8 | public Map post = new HashMap(); 9 | } 10 | -------------------------------------------------------------------------------- /femas-governance-impl/src/main/java/com/tencent/tsf/femas/governance/api/entity/OpenApiResponse.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.governance.api.entity; 2 | 3 | import java.util.HashMap; 4 | import java.util.Map; 5 | 6 | /** 7 | * TODO 8 | * 9 | * need refactor 10 | */ 11 | public class OpenApiResponse { 12 | 13 | public Map responses = new HashMap(); 14 | } 15 | -------------------------------------------------------------------------------- /femas-governance-impl/src/main/java/com/tencent/tsf/femas/governance/circuitbreaker/core/StateTransitionCallback.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.governance.circuitbreaker.core; 2 | 3 | import com.tencent.tsf.femas.governance.circuitbreaker.ICircuitBreakerService; 4 | import com.tencent.tsf.femas.governance.circuitbreaker.core.internal.CircuitBreakerMetrics; 5 | 6 | public abstract class StateTransitionCallback { 7 | 8 | public abstract void onTransition(ICircuitBreakerService.State from, ICircuitBreakerService.State to, 9 | Object circuitBreakerObject, CircuitBreakerMetrics metrics, 10 | CircuitBreaker circuitBreaker); 11 | } 12 | -------------------------------------------------------------------------------- /femas-governance-impl/src/main/java/com/tencent/tsf/femas/governance/event/EventTypeEnum.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.governance.event; 2 | 3 | 4 | public enum EventTypeEnum { 5 | 6 | /** 7 | * 熔断事件 8 | */ 9 | CIRCUITBREAKER, 10 | 11 | /** 12 | * 熔断事件 13 | */ 14 | RATELIMIT, 15 | 16 | /** 17 | * 熔断事件 18 | */ 19 | AUTH, 20 | 21 | /** 22 | * 熔断事件 23 | */ 24 | ROUTER 25 | } 26 | -------------------------------------------------------------------------------- /femas-governance-impl/src/main/java/com/tencent/tsf/femas/governance/loadbalance/LoadbalancerManager.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.governance.loadbalance; 2 | 3 | import com.tencent.tsf.femas.common.entity.ServiceInstance; 4 | import com.tencent.tsf.femas.plugin.impl.FemasPluginContext; 5 | import java.util.List; 6 | 7 | /** 8 | * @author leoziltong 9 | */ 10 | public class LoadbalancerManager { 11 | 12 | // 根据用户配置选取 13 | private static volatile Loadbalancer loadbalancer = FemasPluginContext.getLoadBalancer(); 14 | 15 | public static ServiceInstance select(List serviceInstances) { 16 | return loadbalancer.select(serviceInstances); 17 | } 18 | 19 | public static void update(Loadbalancer loadbalancer) { 20 | LoadbalancerManager.loadbalancer = loadbalancer; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /femas-governance-impl/src/main/java/com/tencent/tsf/femas/governance/loadbalance/exception/FemasNoAvailableInstanceException.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.governance.loadbalance.exception; 2 | 3 | public class FemasNoAvailableInstanceException extends RuntimeException { 4 | 5 | public FemasNoAvailableInstanceException() { 6 | super(); 7 | } 8 | 9 | public FemasNoAvailableInstanceException(String message) { 10 | super(message); 11 | } 12 | 13 | public FemasNoAvailableInstanceException(String message, Throwable cause) { 14 | super(message, cause); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /femas-governance-impl/src/main/java/com/tencent/tsf/femas/governance/metrics/micrometer/exporter/PrometheusPropertiesConfigAdapter.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.governance.metrics.micrometer.exporter; 2 | 3 | import io.micrometer.prometheus.PrometheusConfig; 4 | 5 | /** 6 | * @Author p_mtluo 7 | * @Date 2021-08-18 16:54 8 | * @Description prometheus 配置类 9 | **/ 10 | public class PrometheusPropertiesConfigAdapter implements PrometheusConfig { 11 | 12 | @Override 13 | public String get(String key) { 14 | return null; 15 | } 16 | 17 | @Override 18 | public String prefix() { 19 | return "femas.metrics.export.prometheus"; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /femas-governance-impl/src/main/java/com/tencent/tsf/femas/governance/ratelimit/impl/AccessTokenClusterRateLimiter.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.governance.ratelimit.impl; 2 | 3 | public class AccessTokenClusterRateLimiter { 4 | 5 | } 6 | -------------------------------------------------------------------------------- /femas-governance-impl/src/main/java/com/tencent/tsf/femas/governance/ratelimit/impl/AdaptiveRateLimiter.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.governance.ratelimit.impl; 2 | 3 | public class AdaptiveRateLimiter { 4 | 5 | } 6 | -------------------------------------------------------------------------------- /femas-governance-impl/src/main/java/com/tencent/tsf/femas/governance/ratelimit/impl/AssignTokenClusterRateLimiter.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.governance.ratelimit.impl; 2 | 3 | public class AssignTokenClusterRateLimiter { 4 | 5 | } 6 | -------------------------------------------------------------------------------- /femas-governance-impl/src/main/java/com/tencent/tsf/femas/governance/ratelimit/impl/SemaphoreBasedRateLimiter.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.governance.ratelimit.impl; 2 | 3 | public class SemaphoreBasedRateLimiter { 4 | 5 | } 6 | -------------------------------------------------------------------------------- /femas-governance-impl/src/main/resources/META-INF/services/com.tencent.tsf.femas.governance.auth.IAuthentication: -------------------------------------------------------------------------------- 1 | com.tencent.tsf.femas.governance.auth.Authentication -------------------------------------------------------------------------------- /femas-governance-impl/src/main/resources/META-INF/services/com.tencent.tsf.femas.governance.circuitbreaker.ICircuitBreakerService: -------------------------------------------------------------------------------- 1 | com.tencent.tsf.femas.governance.circuitbreaker.service.CircuitBreakerService -------------------------------------------------------------------------------- /femas-governance-impl/src/main/resources/META-INF/services/com.tencent.tsf.femas.governance.lane.LaneFilter: -------------------------------------------------------------------------------- 1 | com.tencent.tsf.femas.governance.lane.MockLaneFilter -------------------------------------------------------------------------------- /femas-governance-impl/src/main/resources/META-INF/services/com.tencent.tsf.femas.governance.loadbalance.Loadbalancer: -------------------------------------------------------------------------------- 1 | com.tencent.tsf.femas.governance.loadbalance.impl.RandomLoadbalancer 2 | com.tencent.tsf.femas.governance.loadbalance.impl.RoundRobinLoadbalancer 3 | com.tencent.tsf.femas.governance.loadbalance.impl.TagBasedLoadbalancer -------------------------------------------------------------------------------- /femas-governance-impl/src/main/resources/META-INF/services/com.tencent.tsf.femas.governance.metrics.IMeterRegistry: -------------------------------------------------------------------------------- 1 | com.tencent.tsf.femas.governance.metrics.micrometer.registry.GovernanceMeterRegistry 2 | com.tencent.tsf.femas.governance.metrics.micrometer.registry.JmxMeterRegistry 3 | com.tencent.tsf.femas.governance.metrics.micrometer.registry.RpcMeterRegistry -------------------------------------------------------------------------------- /femas-governance-impl/src/main/resources/META-INF/services/com.tencent.tsf.femas.governance.metrics.MetricsExporter: -------------------------------------------------------------------------------- 1 | com.tencent.tsf.femas.governance.metrics.micrometer.exporter.logger.LoggerMeterExporter 2 | com.tencent.tsf.femas.governance.metrics.micrometer.exporter.PrometheusMeterExporter -------------------------------------------------------------------------------- /femas-governance-impl/src/main/resources/META-INF/services/com.tencent.tsf.femas.governance.metrics.MetricsTransformer: -------------------------------------------------------------------------------- 1 | com.tencent.tsf.femas.governance.metrics.micrometer.transformer.FemasMetricsTransformer -------------------------------------------------------------------------------- /femas-governance-impl/src/main/resources/META-INF/services/com.tencent.tsf.femas.governance.ratelimit.RateLimiter: -------------------------------------------------------------------------------- 1 | com.tencent.tsf.femas.governance.ratelimit.impl.SlidingWindowRateLimiter -------------------------------------------------------------------------------- /femas-governance-impl/src/main/resources/META-INF/services/com.tencent.tsf.femas.governance.route.Router: -------------------------------------------------------------------------------- 1 | com.tencent.tsf.femas.governance.route.FemasDefaultRouteRuleRouter -------------------------------------------------------------------------------- /femas-governance-impl/src/test/java/com/tencent/tsf/femas/governance/circuitbreaker/core/mockservice/AsyncHelloWorldService.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.governance.circuitbreaker.core.mockservice; 2 | 3 | import java.util.concurrent.CompletionStage; 4 | 5 | public interface AsyncHelloWorldService { 6 | 7 | CompletionStage returnHelloWorld(); 8 | 9 | CompletionStage returnHelloWorldWithName(String name); 10 | 11 | CompletionStage sayHelloWorld(); 12 | 13 | CompletionStage sayHelloWorldWithName(String name); 14 | } 15 | -------------------------------------------------------------------------------- /femas-governance-impl/src/test/java/com/tencent/tsf/femas/governance/circuitbreaker/core/mockservice/HelloWorldException.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.governance.circuitbreaker.core.mockservice; 2 | 3 | public class HelloWorldException extends RuntimeException { 4 | 5 | public HelloWorldException() { 6 | super("BAM!"); 7 | } 8 | 9 | public HelloWorldException(String message) { 10 | super(message); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /femas-governance/src/main/java/com/tencent/tsf/femas/governance/circuitbreaker/FemasCircuitBreakerIsolationLevelEnum.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.governance.circuitbreaker; 2 | 3 | 4 | /** 5 | * 熔断级别 6 | * 7 | * @author zhixinzxliu 8 | */ 9 | public enum FemasCircuitBreakerIsolationLevelEnum { 10 | // 服务级别熔断 11 | SERVICE, 12 | 13 | // API级别熔断 14 | API, 15 | 16 | // 实例级别熔断 17 | INSTANCE 18 | } 19 | -------------------------------------------------------------------------------- /femas-governance/src/main/java/com/tencent/tsf/femas/governance/lane/LaneFilter.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.governance.lane; 2 | 3 | import com.tencent.tsf.femas.common.entity.Service; 4 | import com.tencent.tsf.femas.common.entity.ServiceInstance; 5 | import com.tencent.tsf.femas.plugin.Plugin; 6 | import java.util.List; 7 | 8 | public interface LaneFilter extends Plugin { 9 | 10 | void preProcessLaneId(); 11 | 12 | List filterInstancesWithLane(Service service, List serviceInstances); 13 | } 14 | -------------------------------------------------------------------------------- /femas-governance/src/main/java/com/tencent/tsf/femas/governance/loadbalance/Loadbalancer.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.governance.loadbalance; 2 | 3 | import com.tencent.tsf.femas.common.entity.ServiceInstance; 4 | import com.tencent.tsf.femas.plugin.Plugin; 5 | import java.util.List; 6 | 7 | /** 8 | * @author zhixinzxliu 9 | */ 10 | public interface Loadbalancer extends Plugin { 11 | 12 | /** 13 | * 给定一组服务节点,根据负载算法,选择一台服务节点 14 | * 15 | * @param serviceInstances 16 | * @return 17 | */ 18 | ServiceInstance select(List serviceInstances); 19 | } 20 | -------------------------------------------------------------------------------- /femas-governance/src/main/java/com/tencent/tsf/femas/governance/metrics/Counter.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.governance.metrics; 2 | 3 | /** 4 | * @Author p_mtluo 5 | * @Date 2021-08-17 20:09 6 | * @Description TODO 7 | **/ 8 | public interface Counter extends Meter { 9 | 10 | void increment(double amount); 11 | 12 | void increment(); 13 | } 14 | -------------------------------------------------------------------------------- /femas-governance/src/main/java/com/tencent/tsf/femas/governance/metrics/DistributionSummary.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.governance.metrics; 2 | 3 | /** 4 | * @Author p_mtluo 5 | * @Date 2021-08-17 20:05 6 | * @Description TODO 7 | **/ 8 | public interface DistributionSummary extends Meter { 9 | 10 | void record(double amount); 11 | } 12 | -------------------------------------------------------------------------------- /femas-governance/src/main/java/com/tencent/tsf/femas/governance/metrics/LongTaskTimer.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.governance.metrics; 2 | 3 | /** 4 | * @Author p_mtluo 5 | * @Date 2021-08-17 20:12 6 | * @Description TODO 7 | **/ 8 | public interface LongTaskTimer extends Meter { 9 | 10 | N start(); 11 | 12 | long stop(long task); 13 | } 14 | -------------------------------------------------------------------------------- /femas-governance/src/main/java/com/tencent/tsf/femas/governance/metrics/Meter.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.governance.metrics; 2 | 3 | /** 4 | * @Author p_mtluo 5 | * @Date 2021-08-17 17:06 6 | * @Description TODO 7 | **/ 8 | public interface Meter { 9 | 10 | T getMeter(); 11 | 12 | MeterEnum getMeterType(); 13 | 14 | String getMeterName(); 15 | } 16 | -------------------------------------------------------------------------------- /femas-governance/src/main/java/com/tencent/tsf/femas/governance/metrics/MetricsConstant.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.governance.metrics; 2 | 3 | /** 4 | * @Author p_mtluo 5 | * @Date 2021-08-18 01:30 6 | * @Description TODO 7 | **/ 8 | public class MetricsConstant { 9 | 10 | public static final String FEMAS_HTTP_SERVER_REQUESTS = "femas.http.server.requests"; 11 | public static final String FEMAS_HTTP_CLIENT_REQUESTS = "femas.http.client.requests"; 12 | public static final String FEMAS_HTTP_RATELIMIT_COUNT = "femas.http.ratelimit.count"; 13 | 14 | public static final String KIND_SERVER = "SERVER"; 15 | public static final String KIND_CLIENT = "CLIENT"; 16 | } 17 | -------------------------------------------------------------------------------- /femas-governance/src/main/java/com/tencent/tsf/femas/governance/metrics/MetricsTransformer.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.governance.metrics; 2 | 3 | import com.tencent.tsf.femas.plugin.Plugin; 4 | 5 | /** 6 | * @Author p_mtluo 7 | * @Date 2021-11-09 11:33 8 | * @Description metrics transformer 9 | **/ 10 | public interface MetricsTransformer extends Plugin { 11 | 12 | default void transform() { 13 | 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /femas-governance/src/main/java/com/tencent/tsf/femas/governance/metrics/Timer.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.governance.metrics; 2 | 3 | import java.util.concurrent.TimeUnit; 4 | 5 | /** 6 | * @Author p_mtluo 7 | * @Date 2021-08-17 17:55 8 | * @Description TODO 9 | **/ 10 | public interface Timer extends Meter { 11 | 12 | void record(long amount, TimeUnit unit); 13 | } 14 | -------------------------------------------------------------------------------- /femas-governance/src/main/java/com/tencent/tsf/femas/governance/ratelimit/RateLimiter.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.governance.ratelimit; 2 | 3 | 4 | import com.tencent.tsf.femas.common.entity.Service; 5 | import com.tencent.tsf.femas.plugin.Plugin; 6 | 7 | public interface RateLimiter extends Plugin { 8 | 9 | public boolean acquire(); 10 | 11 | public void buildCollector(Service service); 12 | 13 | public boolean acquire(int permits); 14 | 15 | public void update(T rule); 16 | 17 | public void setInsId(String insId); 18 | 19 | } 20 | -------------------------------------------------------------------------------- /femas-helm/.helmignore: -------------------------------------------------------------------------------- 1 | # Patterns to ignore when building packages. 2 | # This supports shell glob matching, relative path matching, and 3 | # negation (prefixed with !). Only one pattern per line. 4 | .DS_Store 5 | # Common VCS dirs 6 | .git/ 7 | .gitignore 8 | .bzr/ 9 | .bzrignore 10 | .hg/ 11 | .hgignore 12 | .svn/ 13 | # Common backup files 14 | *.swp 15 | *.bak 16 | *.tmp 17 | *.orig 18 | *~ 19 | # Various IDEs 20 | .project 21 | .idea/ 22 | *.tmproj 23 | .vscode/ 24 | -------------------------------------------------------------------------------- /femas-helm/templates/service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: {{ include "femas-helm.fullname" . }} 5 | labels: 6 | {{- include "femas-helm.labels" . | nindent 4 }} 7 | spec: 8 | type: {{ .Values.service.type }} 9 | ports: 10 | - port: {{ .Values.service.port }} 11 | targetPort: 8080 12 | nodePort: {{ .Values.service.nodePort }} 13 | protocol: TCP 14 | name: http 15 | selector: 16 | {{- include "femas-helm.selectorLabels" . | nindent 4 }} 17 | -------------------------------------------------------------------------------- /femas-helm/templates/serviceaccount.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.serviceAccount.create -}} 2 | apiVersion: v1 3 | kind: ServiceAccount 4 | metadata: 5 | name: {{ include "femas-helm.serviceAccountName" . }} 6 | labels: 7 | {{- include "femas-helm.labels" . | nindent 4 }} 8 | {{- with .Values.serviceAccount.annotations }} 9 | annotations: 10 | {{- toYaml . | nindent 4 }} 11 | {{- end }} 12 | {{- end }} 13 | -------------------------------------------------------------------------------- /femas-helm/templates/tests/test-connection.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Pod 3 | metadata: 4 | name: "{{ include "femas-helm.fullname" . }}-test-connection" 5 | labels: 6 | {{- include "femas-helm.labels" . | nindent 4 }} 7 | annotations: 8 | "helm.sh/hook": test 9 | spec: 10 | containers: 11 | - name: wget 12 | image: busybox 13 | command: ['wget'] 14 | args: ['{{ include "femas-helm.fullname" . }}:{{ .Values.service.port }}'] 15 | restartPolicy: Never 16 | -------------------------------------------------------------------------------- /femas-plugin-impl/src/main/java/com/tencent/tsf/femas/plugin/impl/config/rule/auth/AuthConstant.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.plugin.impl.config.rule.auth; 2 | 3 | public class AuthConstant { 4 | 5 | /** 6 | * 黑名单模式 7 | */ 8 | public static final String BLACK_LIST = "B"; 9 | 10 | /** 11 | * 白名单模式 12 | */ 13 | public static final String WHITE_LIST = "W"; 14 | 15 | /** 16 | * 不启用 17 | */ 18 | public static final String DISABLED = "D"; 19 | } 20 | -------------------------------------------------------------------------------- /femas-plugin-impl/src/main/java/com/tencent/tsf/femas/plugin/impl/config/rule/auth/AuthRuleConfig.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.plugin.impl.config.rule.auth; 2 | 3 | /** 4 | * @author Cody 5 | * @date 2021 2021/10/13 3:12 下午 6 | */ 7 | public class AuthRuleConfig { 8 | 9 | private String serviceName; 10 | 11 | private AuthRuleGroup authRuleGroup; 12 | 13 | public String getServiceName() { 14 | return serviceName; 15 | } 16 | 17 | public void setServiceName(String serviceName) { 18 | this.serviceName = serviceName; 19 | } 20 | 21 | public AuthRuleGroup getAuthRuleGroup() { 22 | return authRuleGroup; 23 | } 24 | 25 | public void setAuthRuleGroup(AuthRuleGroup authRuleGroup) { 26 | this.authRuleGroup = authRuleGroup; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /femas-plugin-impl/src/main/java/com/tencent/tsf/femas/plugin/impl/config/rule/ratelimit/RateLimiterConstant.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.plugin.impl.config.rule.ratelimit; 2 | 3 | public class RateLimiterConstant { 4 | 5 | public static final int RATE_LIMITER_TYPE_QPS = 0; 6 | public static final int RATE_LIMITER_TYPE_WARM_UP = 1; 7 | public static final int RATE_LIMITER_TYPE_STEADY = 2; 8 | public static final int CONTROL_BEHAVIOR_WARM_UP_QPS = 3; 9 | public static final int CONTROL_BEHAVIOR_WARM_UP_STEADY = 4; 10 | } 11 | -------------------------------------------------------------------------------- /femas-plugin-impl/src/main/java/com/tencent/tsf/femas/plugin/impl/config/rule/ratelimit/RateLimiterRuleGroup.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.plugin.impl.config.rule.ratelimit; 2 | 3 | import java.io.Serializable; 4 | import java.util.List; 5 | 6 | public class RateLimiterRuleGroup implements Serializable { 7 | 8 | /** 9 | * 规则列表 10 | */ 11 | private List rules; 12 | } 13 | -------------------------------------------------------------------------------- /femas-plugin-impl/src/main/resources/META-INF/services/com.tencent.tsf.femas.plugin.ConfigProvider: -------------------------------------------------------------------------------- 1 | com.tencent.tsf.femas.plugin.impl.FemasConfigProviders -------------------------------------------------------------------------------- /femas-plugin-impl/src/main/resources/META-INF/services/com.tencent.tsf.femas.plugin.PluginProvider: -------------------------------------------------------------------------------- 1 | com.tencent.tsf.femas.plugin.impl.FemasTypeProviders -------------------------------------------------------------------------------- /femas-plugin/src/main/java/com/tencent/tsf/femas/plugin/ConfigProvider.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.plugin; 2 | 3 | import com.tencent.tsf.femas.common.annotation.SPI; 4 | import com.tencent.tsf.femas.common.spi.SpiExtensionClass; 5 | import com.tencent.tsf.femas.plugin.context.ConfigContext; 6 | 7 | /** 8 | * @Author leoziltong 9 | * @Date: 2021/5/25 19:11 10 | */ 11 | @SPI 12 | public interface ConfigProvider extends SpiExtensionClass { 13 | 14 | ConfigContext getPluginConfigs(); 15 | 16 | /** 17 | * 插件归属 18 | * 19 | * @return 20 | */ 21 | Attribute getAttr(); 22 | 23 | } 24 | -------------------------------------------------------------------------------- /femas-plugin/src/main/java/com/tencent/tsf/femas/plugin/Lifecycle.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.plugin; 2 | 3 | import com.tencent.tsf.femas.common.exception.FemasRuntimeException; 4 | import com.tencent.tsf.femas.plugin.context.ConfigContext; 5 | 6 | /** 7 | * @Author leoziltong 8 | * @Date: 2021/4/19 17:19 9 | * @Version 1.0 10 | */ 11 | public interface Lifecycle { 12 | 13 | /** 14 | * 根据配置初始化配置 15 | * 16 | * @param conf 17 | * @throws FemasRuntimeException 18 | */ 19 | void init(final ConfigContext conf) throws FemasRuntimeException; 20 | 21 | /** 22 | * 释放资源 23 | */ 24 | void destroy(); 25 | 26 | } 27 | -------------------------------------------------------------------------------- /femas-plugin/src/main/java/com/tencent/tsf/femas/plugin/PluginProvider.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.plugin; 2 | 3 | import com.tencent.tsf.femas.common.annotation.SPI; 4 | import com.tencent.tsf.femas.common.spi.SpiExtensionClass; 5 | 6 | import java.util.List; 7 | 8 | /** 9 | * @Author leoziltong 10 | * @Date: 2021/5/25 19:11 11 | */ 12 | @SPI 13 | public interface PluginProvider extends SpiExtensionClass { 14 | 15 | /** 16 | * 实现充分的灵活性,实现层提供插件列表,femas不指定插件列表 17 | * 18 | * @return 19 | */ 20 | List> getPluginTypes(); 21 | 22 | /** 23 | * 插件归属 24 | * 25 | * @return 26 | */ 27 | Attribute getAttr(); 28 | 29 | } 30 | -------------------------------------------------------------------------------- /femas-plugin/src/main/java/com/tencent/tsf/femas/plugin/config/gov/MetricsTransformerConfig.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.plugin.config.gov; 2 | 3 | import com.tencent.tsf.femas.plugin.config.PluginConfig; 4 | import com.tencent.tsf.femas.plugin.config.verify.Verifier; 5 | 6 | /** 7 | * @Author p_mtluo 8 | * @Date 2021-11-09 16:26 9 | * @Description metrics transformer config 10 | **/ 11 | public interface MetricsTransformerConfig extends PluginConfig, Verifier { 12 | 13 | String getType(); 14 | } 15 | -------------------------------------------------------------------------------- /femas-plugin/src/main/java/com/tencent/tsf/femas/plugin/context/ConfigContext.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.plugin.context; 2 | 3 | 4 | import com.tencent.tsf.femas.plugin.config.Configuration; 5 | 6 | /** 7 | * 插件初始化相关的上下文接口 8 | * 9 | * @author leoziltong 10 | */ 11 | public class ConfigContext extends ContextAware { 12 | 13 | private final Configuration config; 14 | 15 | public ConfigContext(Configuration config) { 16 | this.config = config; 17 | } 18 | 19 | public Configuration getConfig() { 20 | return config; 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /femas-registry-impl/femas-registry-consul/src/main/resources/META-INF/services/com.tencent.tsf.femas.common.discovery.ServiceDiscoveryFactory: -------------------------------------------------------------------------------- 1 | com.tencent.tsf.femas.registry.impl.consul.discovery.ConsulServiceDiscoveryFactory -------------------------------------------------------------------------------- /femas-registry-impl/femas-registry-consul/src/main/resources/META-INF/services/com.tencent.tsf.femas.common.serviceregistry.ServiceRegistryFactory: -------------------------------------------------------------------------------- 1 | com.tencent.tsf.femas.registry.impl.consul.serviceregistry.ConsulServiceRegistryFactory -------------------------------------------------------------------------------- /femas-registry-impl/femas-registry-eureka/src/main/resources/META-INF/services/com.tencent.tsf.femas.common.discovery.ServiceDiscoveryFactory: -------------------------------------------------------------------------------- 1 | com.tencent.tsf.femas.registry.impl.eureka.discovery.EurekaServiceDiscoveryFactory -------------------------------------------------------------------------------- /femas-registry-impl/femas-registry-eureka/src/main/resources/META-INF/services/com.tencent.tsf.femas.common.serviceregistry.ServiceRegistryFactory: -------------------------------------------------------------------------------- 1 | com.tencent.tsf.femas.registry.impl.eureka.serviceregistry.EurekaServiceRegistryFactory -------------------------------------------------------------------------------- /femas-registry-impl/femas-registry-k8s/src/main/java/com/tencent/tsf/femas/registry/impl/k8s/serviceregistry/K8sServiceRegistryFactory.java: -------------------------------------------------------------------------------- 1 | 2 | package com.tencent.tsf.femas.registry.impl.k8s.serviceregistry; 3 | 4 | import com.tencent.tsf.femas.common.RegistryEnum; 5 | import com.tencent.tsf.femas.common.serviceregistry.ServiceRegistry; 6 | import com.tencent.tsf.femas.common.serviceregistry.ServiceRegistryFactory; 7 | 8 | import java.util.Map; 9 | 10 | /** 11 | * @author leo 12 | */ 13 | public class K8sServiceRegistryFactory implements ServiceRegistryFactory { 14 | @Override 15 | public ServiceRegistry getServiceRegistry(Map configMap) { 16 | return new K8sServiceRegistry(configMap); 17 | } 18 | 19 | @Override 20 | public String getType() { 21 | return RegistryEnum.KUBERNETES.name(); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /femas-registry-impl/femas-registry-k8s/src/main/resources/META-INF/services/com.tencent.tsf.femas.common.discovery.ServiceDiscoveryFactory: -------------------------------------------------------------------------------- 1 | com.tencent.tsf.femas.registry.impl.k8s.discovery.K8sServiceDiscoveryFactory -------------------------------------------------------------------------------- /femas-registry-impl/femas-registry-k8s/src/main/resources/META-INF/services/com.tencent.tsf.femas.common.serviceregistry.ServiceRegistryFactory: -------------------------------------------------------------------------------- 1 | com.tencent.tsf.femas.registry.impl.k8s.serviceregistry.K8sServiceRegistryFactory -------------------------------------------------------------------------------- /femas-registry-impl/femas-registry-nacos/src/main/java/com/tencent/tsf/femas/registry/impl/nacos/serviceregistry/NacosServiceRegistryFactory.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.registry.impl.nacos.serviceregistry; 2 | 3 | import com.tencent.tsf.femas.common.RegistryEnum; 4 | import com.tencent.tsf.femas.common.serviceregistry.ServiceRegistry; 5 | import com.tencent.tsf.femas.common.serviceregistry.ServiceRegistryFactory; 6 | import java.util.Map; 7 | 8 | /** 9 | * @author leo 10 | */ 11 | public class NacosServiceRegistryFactory implements ServiceRegistryFactory { 12 | 13 | @Override 14 | public ServiceRegistry getServiceRegistry(Map configMap) { 15 | return new NacosServiceRegistry(configMap); 16 | } 17 | 18 | @Override 19 | public String getType() { 20 | return RegistryEnum.NACOS.name(); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /femas-registry-impl/femas-registry-nacos/src/main/resources/META-INF/services/com.tencent.tsf.femas.common.discovery.ServiceDiscoveryFactory: -------------------------------------------------------------------------------- 1 | com.tencent.tsf.femas.registry.impl.nacos.discovery.NacosServiceDiscoveryFactory -------------------------------------------------------------------------------- /femas-registry-impl/femas-registry-nacos/src/main/resources/META-INF/services/com.tencent.tsf.femas.common.serviceregistry.ServiceRegistryFactory: -------------------------------------------------------------------------------- 1 | com.tencent.tsf.femas.registry.impl.nacos.serviceregistry.NacosServiceRegistryFactory -------------------------------------------------------------------------------- /femas-registry-impl/femas-registry-nacos/src/test/resources/META-INF/services/com.tencent.tsf.femas.common.context.ContextConstant: -------------------------------------------------------------------------------- 1 | com.tencent.tsf.femas.common.constant.FemasConstant -------------------------------------------------------------------------------- /femas-registry/src/main/java/com/tencent/tsf/femas/common/RegistryConstants.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.common; 2 | 3 | /** 4 | * @Author leoziltong 5 | * @Description //TODO 6 | * @Date: 2021/3/24 15:31 7 | * @Version 1.0 8 | */ 9 | public class RegistryConstants { 10 | 11 | /** 12 | * 注册地址-host 13 | */ 14 | public static final String REGISTRY_HOST = "registryHost"; 15 | 16 | /** 17 | * 注册端口 18 | */ 19 | public static final String REGISTRY_PORT = "registryPort"; 20 | 21 | /** 22 | * 注册类型 23 | */ 24 | public static final String REGISTRY_TYPE = "registryType"; 25 | 26 | /** 27 | * 默认线程池数目 28 | */ 29 | public static final int DEFAULT_THREAD_POOL_SIZE = Runtime.getRuntime().availableProcessors(); 30 | 31 | } 32 | -------------------------------------------------------------------------------- /femas-registry/src/main/java/com/tencent/tsf/femas/common/discovery/ServiceNotifyListener.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.common.discovery; 2 | 3 | import com.tencent.tsf.femas.common.entity.Service; 4 | import com.tencent.tsf.femas.common.entity.ServiceInstance; 5 | import java.util.List; 6 | 7 | public interface ServiceNotifyListener { 8 | 9 | void notify(Service service, List instances); 10 | 11 | void notifyOnRemoved(Service service, List instances); 12 | 13 | void notifyOnAdded(Service service, List instances); 14 | } 15 | -------------------------------------------------------------------------------- /femas-registry/src/main/java/com/tencent/tsf/femas/common/serviceregistry/ServiceRegistryFactory.java: -------------------------------------------------------------------------------- 1 | package com.tencent.tsf.femas.common.serviceregistry; 2 | 3 | import com.tencent.tsf.femas.common.annotation.SPI; 4 | import com.tencent.tsf.femas.common.spi.SpiExtensionClass; 5 | import java.util.Map; 6 | 7 | /** 8 | * 通过SPI注册的注册中心生成 9 | * 10 | * @author zhixinzxliu 11 | */ 12 | @SPI 13 | public interface ServiceRegistryFactory extends SpiExtensionClass { 14 | 15 | ServiceRegistry getServiceRegistry(Map configMap); 16 | } 17 | -------------------------------------------------------------------------------- /femas-starters/femas-springcloud-starters/femas-springcloud-discovery-starter/src/main/resources/META-INF/spring.factories: -------------------------------------------------------------------------------- 1 | org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ 2 | com.tencent.tsf.femas.springcloud.discovery.starter.discovery.discovery.FemasDiscoveryAutoConfiguration,\ 3 | com.tencent.tsf.femas.springcloud.discovery.starter.discovery.registry.FemasServiceRegistryAutoConfiguration --------------------------------------------------------------------------------