New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement context load
, context save
, and context reset
#3908
Conversation
d0d98b8
to
2bb9e0e
Compare
context load
, context save
, and context reset
context load
, context save
, and context reset
2bb9e0e
to
306fe18
Compare
1ac1935
to
4051fec
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left some comments.
4051fec
to
4ba9b15
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I preemptively approve now, with some small suggestions remaining.
@eliaskosunen Please also add a changelog item regarding the new subcommands. |
30cb32d
to
2008e64
Compare
2008e64
to
32aabd2
Compare
Closes https://github.com/tenzir/issues/issues/1523, companion PR: https://github.com/tenzir/tenzir-plugins/pull/175
context update
was previously overloaded on its input type. Now it only accepts events. The bytes-overload is removed (it wasn't implemented by contexts), and the void-overload is calledcontext reset
.context load
andcontext save
are added, that load from and serialize to bytes, respectively.load <serialized-binary-file>
is piped tocontext load
, andcontext save
is piped tosave <serialized-binary-file>
. A carbon-copy of a context can be created withcontext save foo | context load bar
.As a table:
<events> | context update <ctx>
<bytes> | context update <ctx>
context update <ctx> [flags]
context reset <ctx> [flags]
context save | <bytes>
<bytes> | context load