19 lines
575 B
TypeScript
19 lines
575 B
TypeScript
import type { SituationalAwarenessGateway } from './port'
|
|
import { HttpSituationalAwarenessGateway } from './http-gateway'
|
|
|
|
export * from './types'
|
|
export type { SituationalAwarenessGateway } from './port'
|
|
|
|
let singleton: SituationalAwarenessGateway | null = null
|
|
|
|
export function createSituationalAwarenessGateway(): SituationalAwarenessGateway {
|
|
return new HttpSituationalAwarenessGateway()
|
|
}
|
|
|
|
export function getSituationalAwarenessGateway(): SituationalAwarenessGateway {
|
|
if (!singleton) {
|
|
singleton = createSituationalAwarenessGateway()
|
|
}
|
|
return singleton
|
|
}
|