11.17.10 • Published 8 months ago

lite-ts-tracer v11.17.10

Weekly downloads
-
License
GPL-3.0
Repository
-
Last release
8 months ago

Version

代码

DbFactoryBase - 数据库工厂

  • DbFactoryTracer - 数据库工厂(跟踪)
const dbFactory: DbFactoryBase;
const dbFactoryTracer: DbFactoryBase = new DbFactoryTracer(dbFactory);
  • ProjectDbFactoryTracer - 项目数据库工厂(跟踪)
const configDbFactoryTracer: ITraceable<DbFactoryBase>;
const loadProjectDataFunc: EnumLoadDelegate<ProjectData>;
const buildDbFactoryFunc: (name: string, url: string) => DbFactoryBase;
const dbFactoryTracer: DbFactoryBase = new ProjectDbFactoryTracer('应用', '环境', loadProjectDataFunc, buildDbFactoryFunc);

ITraceable\ - 可跟踪接口

const origin: ITraceable<T>;
const parentSpan: opentracing.Span;
const tracer: opentracing.Tracer;
const res: T = origin.withTrace(parentSpan, tracer);
  • TracerStrategy\ - 默认跟踪策略
const origin: T;
const tracer: ITraceable<T> = new TracerStrategy(origin);

loadAllProjectWithTracer - 加载项目数据(跟踪)

const cache: CacheBase;
const parentSpan: opentracing.Span;
const tracer: opentracing.Tracer;
const allProjectData = await loadAllProjectWithTracer(cache, '配置服务地址', parentSpan, tracer);

RedisBase - redis

  • buildRedisTracer - 创建redis(跟踪)
const redis: RedisBase;
const redisTracer = buildRedisTracer(redis);

RpcBase - rpc

  • RpcTracer - 可跟踪rpc
const rpc: RpcBase;
const rpcTracer: RpcBase = new RpcTracer(rpc);
  • ProjectRpcTracer - 项目rpc(跟踪)
const cache: CacheBase;
const rpc: RpcBase = new ProjectRpcTracer(cache, '配置服务地址', '环境');

UserFactoryBase - 玩家工厂

  • UserFactoryTracer - 玩家工厂(可跟踪)
const allUserModuleDelegate: AllUserModuleDelegate;
const parentSpan: opentracing.Span;
const tracer: opentracing.Tracer;
const userFactory: UserFactoryBase<UserServiceTracer> = new UserFactoryTracer(allUserModuleDelegate, parentSpan, tracer);

UserModuleDelegate<TOption extends UserModuleDelegateOption, TModule> - 玩家模块委托

  • buildTraceRpcUserValue - 创建跟踪的UserValue(rpc)
const rpc: RpcBase;
const userFactory = new UserFactoryTracer({
    [UserValue.name]: buildTraceRpcUserValue(rpc),
    ...,
}, ...);
11.17.10

8 months ago

11.15.10

10 months ago

11.16.10

10 months ago

11.14.10

10 months ago

11.12.8

1 year ago

11.12.9

1 year ago

11.13.10

10 months ago

11.12.10

1 year ago

11.11.8

1 year ago

11.11.7

1 year ago

11.10.7

1 year ago

11.9.7

1 year ago

11.8.7

1 year ago

11.8.6

1 year ago

11.7.5

1 year ago

11.8.5

1 year ago

11.7.4

1 year ago

11.6.4

1 year ago

11.4.2

1 year ago

11.5.2

1 year ago

11.4.0

1 year ago

11.4.1

1 year ago

11.5.3

1 year ago

11.5.4

1 year ago

11.2.0

1 year ago

11.3.0

1 year ago

11.1.0

1 year ago

11.0.0

1 year ago

3.0.0

2 years ago