api.fabaccess-api/interest.capnp
2024-04-22 12:37:23 +02:00

38 lines
952 B
Cap'n Proto

@0xa23cfc5ead0ac055;
using CSharp = import "programming_language/csharp.capnp";
$CSharp.namespace("FabAccessAPI.Schema");
using import "owned.capnp".Owned;
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;
interface Interestable {
queue @0 () -> Fallible(Interest, ReserveError);
reserve @1 ( when :When ) -> Fallible(Interest, ReserveError);
struct ReserveError {
union {
permissionDenied @0 :Void;
reserveOverlapping @1 :Void;
queueFull @2 :Void;
}
}
}
interface Interest extends (Owned) {
resource @0 () -> ( resource :Resource, dummy :UInt8 );
describe @1 () -> Description;
drop @2 ();
upgrade @3 () -> ( claim :Claim );
}
struct InterestKind {
union {
queue @0 :UInt64;
reservation @1 :When;
}
}