diff options
| author | Dan Engelbrecht <[email protected]> | 2023-02-09 16:49:51 +0100 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-02-09 07:49:51 -0800 |
| commit | 2f872e432d4a77d1c2dd082cb97a0cbfddb3cc97 (patch) | |
| tree | d631da0746b78cad7140784de4e637bcfb4e1cac /zen/zen.cpp | |
| parent | Update README.md (diff) | |
| download | archived-zen-2f872e432d4a77d1c2dd082cb97a0cbfddb3cc97.tar.xz archived-zen-2f872e432d4a77d1c2dd082cb97a0cbfddb3cc97.zip | |
oplog upload/download (#214)
- Feature: Zen server endpoint `prj/{project}/oplog/{log}/chunks` to post multiple attachments in one request.
- Feature: Zen server endpoint `prj/{project}/oplog/{log}/save` to save an oplog container. Accepts `CbObject` containing a compressed oplog and attachment references organized in blocks.
- Feature: Zen server endpoint `prj/{project}/oplog/{log}/load` to request an oplog container. Responds with an `CbObject` containing a compressed oplog and attachment references organized in blocks.
- Feature: Zen server endpoint `{project}/oplog/{log}/rpc` to initiate an import to or export from an external location and other operations. Use either JSon or CbPackage as payload.
- CbObject/JSon RPC format for `import` and `export` methods:
- CbObject RPC format for `getchunks` method, returns CbPackage with the found chunks, if all chunks are found the number of attachments matches number of chunks requested.
- Feature: Zen server `{project}/oplog/{log}/{hash}` now accepts `HttpVerb::kPost` as well as `HttpVerb::kGet`.
- Feature: Zen command line tool `oplog-export` to export an oplog to an external target using the zenserver oplog export endpoint.
- Feature: Zen command line tool `oplog-import` to import an oplog from an external source using the zenserver oplog import endpoint.
Diffstat (limited to 'zen/zen.cpp')
| -rw-r--r-- | zen/zen.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/zen/zen.cpp b/zen/zen.cpp index 2b6a529fe..9d85680d1 100644 --- a/zen/zen.cpp +++ b/zen/zen.cpp @@ -22,7 +22,6 @@ #include <zencore/logging.h> #include <zencore/scopeguard.h> #include <zencore/string.h> -#include <zencore/zencore.h> #include <zenhttp/httpcommon.h> @@ -69,7 +68,7 @@ ZenCmdBase::ParseOptions(int argc, char** argv) cxxopts::ParseResult Result = CmdOptions.parse(argc, argv); if (Result.count("help")) { - printf("%s\n", CmdOptions.help({}).c_str()); + printf("%s\n", CmdOptions.help().c_str()); return false; } if (!Result.unmatched().empty()) @@ -215,6 +214,8 @@ main(int argc, char** argv) PsCommand PsCmd; UpCommand UpCmd; DownCommand DownCmd; + ExportOplogCommand ExportOplogCmd; + ImportOplogCommand ImportOplogCmd; VersionCommand VersionCmd; CacheInfoCommand CacheInfoCmd; DropProjectCommand ProjectDropCmd; @@ -253,6 +254,8 @@ main(int argc, char** argv) {"project-info", &ProjectInfoCmd, "Info on project or project oplog"}, {"project-create", &CreateProjectCmd, "Create a project"}, {"oplog-create", &CreateOplogCmd, "Create a project oplog"}, + {"oplog-export", &ExportOplogCmd, "Export project store oplog"}, + {"oplog-import", &ImportOplogCmd, "Import project store oplog"}, {"gc", &GcCmd, "Garbage collect zen storage"}, {"gc-status", &GcStatusCmd, "Garbage collect zen storage status check"}, #if ZEN_WITH_TESTS |