Skip to content
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

Added plugin-related information to the oplog entries #32

Merged
merged 4 commits into from
Nov 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 27 additions & 4 deletions wit/deps/golem-1.1/golem-oplog-1.1.wit
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ interface oplog {
use wasi:clocks/[email protected].{datetime};
use golem:rpc/[email protected].{wit-value};

use host.{account-id, component-version, oplog-index, retry-policy, worker-id};
use host.{account-id, component-version, oplog-index, retry-policy, uuid, worker-id};

variant wrapped-function-type {
/// The side-effect reads from the worker's local state (for example local file system,
Expand All @@ -27,6 +27,13 @@ interface oplog {
write-remote-batched(option<oplog-index>)
}

record plugin-installation-description {
installation-id: uuid,
name: string,
version: string,
parameters: list<tuple<string, string>>
}

record create-parameters {
timestamp: datetime,
worker-id: worker-id,
Expand All @@ -36,7 +43,8 @@ interface oplog {
account-id: account-id,
parent: option<worker-id>,
component-size: u64,
initial-total-linear-memory-size: u64
initial-total-linear-memory-size: u64,
initial-active-plugins: list<plugin-installation-description>
}

record imported-function-invoked-parameters {
Expand Down Expand Up @@ -118,7 +126,8 @@ interface oplog {
record successful-update-parameters {
timestamp: datetime,
target-version: component-version,
new-component-size: u64
new-component-size: u64,
new-active-plugins: list<plugin-installation-description>
}

record failed-update-parameters {
Expand Down Expand Up @@ -169,6 +178,16 @@ interface oplog {
message: string
}

record activate-plugin-parameters {
timestamp: datetime,
plugin: plugin-installation-description
}

record deactivate-plugin-parameters {
timestamp: datetime,
plugin: plugin-installation-description
}

variant oplog-entry {
/// The initial worker oplog entry
create(create-parameters),
Expand Down Expand Up @@ -229,7 +248,11 @@ interface oplog {
/// The worker emitted a log message
log(log-parameters),
/// The worker's has been restarted, forgetting all its history
restart(datetime)
restart(datetime),
/// Activates a plugin
activate-plugin(activate-plugin-parameters),
/// Deactivates a plugin
deactivate-plugin(deactivate-plugin-parameters)
}

resource get-oplog {
Expand Down
Loading