@arturwojnar/hermes-postgresql
Version:
Production-Ready TypeScript Outbox Pattern for PostgreSQL
14 lines • 509 B
JavaScript
import { Bytes, MessageType, TopLevelType } from './types.js';
const keepAliveResult = (shouldPong) => ({
topLevelType: TopLevelType.PrimaryKeepaliveMessage,
messageType: MessageType.Other,
shouldPong,
});
const processPrimaryKeepAliveMessage = (data) => {
if (!data[Bytes.Int8 + Bytes.Int64 + Bytes.Int64]) {
return keepAliveResult(false);
}
return keepAliveResult(true);
};
export { processPrimaryKeepAliveMessage };
//# sourceMappingURL=processPrimaryKeepAliveMessage.js.map