feat: establish NekoNest Cloud control and relay
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
export type MigrationFailureFence = {
|
||||
state: string;
|
||||
source_node_id: string;
|
||||
target_node_id: string;
|
||||
source_generation: number;
|
||||
target_generation: number;
|
||||
};
|
||||
|
||||
export function authorityAfterMigrationFailure(record: MigrationFailureFence): {
|
||||
nodeId: string;
|
||||
generation: number;
|
||||
} {
|
||||
if (record.state === "draining") {
|
||||
return { nodeId: record.target_node_id, generation: record.target_generation };
|
||||
}
|
||||
return { nodeId: record.source_node_id, generation: record.source_generation };
|
||||
}
|
||||
Reference in New Issue
Block a user