greentic-interfaces 1.1.1

Greentic ABI: WIT contracts, generated bindings, thin mappers
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// SPDX-License-Identifier: MIT

package greentic:interfaces-host@0.1.0;

use greentic:interfaces-types/types@0.1.0;

interface imports {
  use greentic:interfaces-types/types@0.1.0.{span-context, state-key, session-cursor, tenant-ctx, host-error};

  /// Trivial acknowledgment returned by write-only host operations.
  enum op-ack { ok }

  telemetry-emit: func(span: span-context, fields: list<tuple<string, string>>);
  state-get: func(key: state-key, ctx: option<tenant-ctx>) -> result<string, host-error>;
  state-set: func(key: state-key, value: string, ctx: option<tenant-ctx>) -> result<op-ack, host-error>;
  session-update: func(cursor: session-cursor, ctx: option<tenant-ctx>) -> result<string, host-error>;
}