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

use patch version & move to wasm-rpc #47

Merged
merged 4 commits into from
Feb 6, 2025
Merged
Show file tree
Hide file tree
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
13 changes: 2 additions & 11 deletions wit/deps/golem-1.x/golem-host.wit
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
package golem:api@1.2.0;
package golem:api@1.1.2;

/// The Golem host API provides low level access to Golem specific features such as promises and control over
/// the durability and transactional guarantees the executor provides.
interface host {
use golem:rpc/[email protected].1.{uri, wit-value};
use golem:rpc/[email protected].2.{uri, wit-value};
use wasi:clocks/[email protected].{duration};
use wasi:clocks/[email protected].{datetime};

/// An index into the persistent log storing all performed operations of a worker
type oplog-index = u64;
Expand Down Expand Up @@ -240,14 +239,6 @@ interface host {

/// Fork a worker to another worker at a given oplog index
fork-worker: func(source-worker-id: worker-id, target-worker-id: worker-id, oplog-idx-cut-off: oplog-index) -> ();

/// Schedule invocation of any worker for later
schedule-invocation: func(
scheduled-time: datetime,
worker-id: worker-id,
function-name: string,
function-params: list<wit-value>
) -> ();
}

/// Interface providing user-defined snapshotting capability. This can be used to perform manual update of workers
Expand Down
4 changes: 2 additions & 2 deletions wit/deps/golem-1.x/golem-oplog-processor.wit
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package golem:api@1.2.0;
package golem:api@1.1.2;

interface oplog-processor {
use wasi:clocks/[email protected].{datetime};
use golem:rpc/[email protected].1.{wit-value};
use golem:rpc/[email protected].2.{wit-value};

use host.{account-id, component-id, oplog-index, worker-id, worker-metadata};
use oplog.{oplog-entry};
Expand Down
4 changes: 2 additions & 2 deletions wit/deps/golem-1.x/golem-oplog.wit
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package golem:api@1.2.0;
package golem:api@1.1.2;

/// Host interface for enumerating and searching for worker oplogs
interface oplog {
use wasi:clocks/[email protected].{datetime};
use golem:rpc/[email protected].1.{wit-value};
use golem:rpc/[email protected].2.{wit-value};

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

Expand Down
6 changes: 3 additions & 3 deletions wit/deps/golem-durability/golem-durability-1.2.wit
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
package golem:[email protected];

interface durability {
use golem:api/host@1.2.0.{persistence-level};
use golem:api/oplog@1.2.0.{oplog-index, wrapped-function-type};
use golem:api/host@1.1.2.{persistence-level};
use golem:api/oplog@1.1.2.{oplog-index, wrapped-function-type};
use wasi:clocks/[email protected].{datetime};
use golem:rpc/[email protected].1.{value-and-type};
use golem:rpc/[email protected].2.{value-and-type};

type durable-function-type = wrapped-function-type;

Expand Down
4 changes: 2 additions & 2 deletions wit/deps/golem/golem-host.wit
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package golem:[email protected].0;
package golem:[email protected].1;

/// The Golem host API provides low level access to Golem specific features such as promises and control over
/// the durability and transactional guarantees the executor provides.
interface host {
use golem:rpc/[email protected].1.{uri};
use golem:rpc/[email protected].2.{uri};
use wasi:clocks/[email protected].{duration};

/// An index into the persistent log storing all performed operations of a worker
Expand Down
6 changes: 5 additions & 1 deletion wit/deps/wasm-rpc/wasm-rpc.wit
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package golem:[email protected].1;
package golem:[email protected].2;

interface types {
use wasi:clocks/[email protected].{datetime};
use wasi:io/[email protected].{pollable};

type node-index = s32;
Expand Down Expand Up @@ -93,6 +94,9 @@ interface types {
invoke: func(function-name: string, function-params: list<wit-value>) -> result<_, rpc-error>;

async-invoke-and-await: func(function-name: string, function-params: list<wit-value>) -> future-invoke-result;

/// Schedule invocation for later
schedule-invocation: func(scheduled-time: datetime, function-name: string, function-params: list<wit-value>) -> ();
}

resource future-invoke-result {
Expand Down
Loading