api.fabaccess-api/interest.capnp

50 lines
1.1 KiB
Cap'n Proto
Raw Normal View History

2022-10-31 15:19:56 +01:00
@0xa23cfc5ead0ac055;
using CSharp = import "programming_language/csharp.capnp";
$CSharp.namespace("FabAccessAPI.Schema");
2024-04-16 15:12:44 +02:00
using import "owned.capnp".Owned;
2024-04-16 15:03:10 +02:00
using import "resource.capnp".Resource;
using import "resource.capnp".Description;
using import "claim.capnp".Claim;
using import "utils.capnp".When;
using import "utils.capnp".Fallible;
2022-10-31 15:19:56 +01:00
interface Interestable {
2024-04-16 15:03:10 +02:00
queue @0 () -> Fallible(Interest, ReserveError);
reserve @1 ( when :When ) -> Fallible(Interest, ReserveError);
struct ReserveError {
union {
permissionDenied @0 :Void;
reserveOverlapping @1 :Void;
queueFull @2 :Void;
}
}
2024-04-15 16:28:23 +02:00
}
2022-10-31 15:19:56 +01:00
2024-04-16 15:12:44 +02:00
interface Interest extends (Owned) {
2024-04-22 12:37:23 +02:00
resource @0 () -> ( resource :Resource, dummy :UInt8 );
2024-04-15 16:28:23 +02:00
describe @1 () -> Description;
2024-05-06 13:15:58 +02:00
drop @2 () -> Fallible(DropOk, DropError);
struct DropOk {
}
struct DropError {
}
upgrade @3 () -> ( claim :Fallible(Claim, UpgradeError) );
struct UpgradeError {
}
2022-10-31 15:19:56 +01:00
}
2024-04-16 15:54:47 +02:00
struct InterestKind {
union {
2024-04-22 11:00:27 +02:00
queue @0 :UInt64;
reservation @1 :When;
2024-04-16 15:54:47 +02:00
}
}