mirror of
https://github.com/fluxerapp/fluxer
synced 2026-10-14 22:48:38 +09:00
20 lines
541 B
TypeScript
20 lines
541 B
TypeScript
// SPDX-License-Identifier: AGPL-3.0-or-later
|
|
|
|
import {startServiceInitialization} from '@pkgs/initialization/src/Init';
|
|
import type {ShutdownFn} from '@pkgs/initialization/src/ServiceInitializationTypes';
|
|
|
|
interface CreateServiceInstrumentationOptions {
|
|
serviceName: string;
|
|
config: {
|
|
env: string;
|
|
};
|
|
}
|
|
|
|
export function createServiceInstrumentation(options: CreateServiceInstrumentationOptions): ShutdownFn {
|
|
const {serviceName, config} = options;
|
|
return startServiceInitialization({
|
|
serviceName,
|
|
environment: config.env,
|
|
});
|
|
}
|