feat: redesign auction engine with redis sot
This commit is contained in:
1 parent
737702d78c
commit
e8bb20d988
75 files changed
+12737
-542
No files matched your search
@@ -0,0 +1,18 @@
|
||||
import { createHash } from 'crypto';
|
||||
|
||||
export interface AuctionRedisScriptDefinition {
|
||||
lua: string;
|
||||
name: string;
|
||||
sha: string;
|
||||
}
|
||||
|
||||
export function defineAuctionRedisScript(
|
||||
name: string,
|
||||
lua: string,
|
||||
): AuctionRedisScriptDefinition {
|
||||
return {
|
||||
lua,
|
||||
name,
|
||||
sha: createHash('sha1').update(lua).digest('hex'),
|
||||
};
|
||||
}
|
||||
Reference in new issue
Block a user