@mwcp/kmore
Version:
midway component for knex, supports declarative transaction and OpenTelemetry
35 lines • 907 B
JavaScript
import { PropagationType, RowLockLevel } from 'kmore';
// export const initialConfig: Readonly<KmoreSourceConfig> = {
// timeoutWhenDestroy: 10000,
// }
export const initMiddlewareOptions = {
debug: false,
};
export const initialMiddlewareConfig = {
enableMiddleware: true,
};
export const initDbConfig = {
config: {},
sampleThrottleMs: 3000,
enableTrace: true,
traceInitConnection: false,
traceEvents: 'all',
};
export const initRowLockOptions = {
/**
* @default {@link RowLockLevel.ForShare}
*/
readRowLockLevel: RowLockLevel.ForShare,
/**
* @default {@link RowLockLevel.ForUpdate}
*/
writeRowLockLevel: RowLockLevel.ForUpdate,
};
export const initPropagationConfig = {
/**
* @default PropagationType.REQUIRED,
*/
propagationType: PropagationType.REQUIRED,
...initRowLockOptions,
};
//# sourceMappingURL=config.js.map