From 4eb8075d077d140057fb284e85225429ba4d243b Mon Sep 17 00:00:00 2001 From: Aaron van Meerten Date: Fri, 19 Apr 2024 13:58:59 -0500 Subject: [PATCH] audit support for sidecar shutdown --- src/audit.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/audit.ts b/src/audit.ts index c2633b2..97df28a 100644 --- a/src/audit.ts +++ b/src/audit.ts @@ -50,6 +50,7 @@ export interface InstanceAuditResponse { requestToTerminate: string; requestToReconfigure: string; reconfigureComplete: string; + terminationConfirmation: string; latestStatusInfo?: InstanceState; } @@ -96,6 +97,7 @@ export default class Audit { pipeline.expire(`audit:${groupName}:${instanceId}:request-to-launch`, this.auditTTL); pipeline.expire(`audit:${groupName}:${instanceId}:request-to-terminate`, this.auditTTL); + pipeline.expire(`audit:${groupName}:${instanceId}:confirmation-of-termination`, this.auditTTL); pipeline.expire(`audit:${groupName}:${instanceId}:request-to-reconfigure`, this.auditTTL); pipeline.expire(`audit:${groupName}:${instanceId}:reconfigure-complete`, this.auditTTL); @@ -325,6 +327,7 @@ export default class Audit { requestToTerminate: 'unknown', requestToReconfigure: 'unknown', reconfigureComplete: 'unknown', + terminationConfirmation: 'unknown', }; instanceAuditResponseList.push(instanceAuditResponse); }); @@ -340,6 +343,9 @@ export default class Audit { case 'request-to-terminate': instanceAuditResponse.requestToTerminate = new Date(instanceAudit.timestamp).toISOString(); break; + case 'confirmation-of-termination': + instanceAuditResponse.terminationConfirmation = new Date(instanceAudit.timestamp).toISOString(); + break; case 'request-to-reconfigure': instanceAuditResponse.requestToReconfigure = new Date(instanceAudit.timestamp).toISOString(); break;