UNPKG

hamok

Version:

Lightweight Distributed Object Storage on RAFT consensus algorithm

33 lines (32 loc) 1.09 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.SubmitMessageResponse = exports.SubmitMessageRequest = void 0; class SubmitMessageRequest { requestId; sourceEndpointId; entry; destinationEndpointId; constructor(requetId, sourceEndpointId, entry, destinationEndpointId) { this.requestId = requetId; this.sourceEndpointId = sourceEndpointId; this.entry = entry; this.destinationEndpointId = destinationEndpointId; } createResponse(success, leaderId) { return new SubmitMessageResponse(this.requestId, success, this.sourceEndpointId, leaderId); } } exports.SubmitMessageRequest = SubmitMessageRequest; class SubmitMessageResponse { requestId; success; destinationEndpointId; leaderId; constructor(requestId, success, destinationId, leaderId) { this.requestId = requestId; this.success = success; this.destinationEndpointId = destinationId; this.leaderId = leaderId; } } exports.SubmitMessageResponse = SubmitMessageResponse;