Skip to content

Commit

Permalink
feat: add function support (#897)
Browse files Browse the repository at this point in the history
  • Loading branch information
junhuaqin authored Dec 10, 2024
1 parent 5cea294 commit 44f0b95
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion internal/rdb/rdb.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,14 @@ func (ld *Loader) parseRDBEntry(ctx context.Context, rd *bufio.Reader) {
_ = structure.ReadLength(rd) // slot_id
_ = structure.ReadLength(rd) // slot_size
_ = structure.ReadLength(rd) // expires_slot_size
case kFlagFunction, kFlagFunction2:
case kFlagFunction:
log.Panicf("function library data not supported, need PR to support")
case kFlagFunction2:
function := structure.ReadString(rd)
log.Debugf("function: %s", function)
e := entry.NewEntry()
e.Argv = []string{"function", "load", function}
ld.ch <- e
case kFlagModuleAux:
moduleId := structure.ReadLength(rd) // module id
moduleName := types.ModuleTypeNameByID(moduleId)
Expand Down

0 comments on commit 44f0b95

Please sign in to comment.