forked from memcached/memcached
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replaces `res = mcp.internal(req)` with the standard V2 API flow. Create a handle for an fgen using `mcp.internal_backend` as an argument, then call wait against it like a normal pool. Code is incomplete but the basics work.
- Loading branch information
Showing
5 changed files
with
116 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
function mcp_config_pools() | ||
return nil | ||
end | ||
|
||
function mcp_config_routes(p) | ||
local fg = mcp.funcgen_new() | ||
local h = fg:new_handle(mcp.internal_backend) | ||
fg:ready({ n = "internal", f = function(rctx) | ||
return function(r) | ||
return rctx:enqueue_and_wait(r, h) | ||
end | ||
end}) | ||
|
||
mcp.attach(mcp.CMD_ANY_STORAGE, fg) | ||
end |