api.fabaccess-api/interest.capnp
Nadja von Reitzenstein Čerpnjak a2552c6759 Hints and Interest fallible methods
2024-05-06 13:27:15 +02:00

50 lines
1.1 KiB
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 () -> Fallible(DropOk, DropError);
struct DropOk {
}
struct DropError {
}
upgrade @3 () -> ( claim :Fallible(Claim, UpgradeError) );
struct UpgradeError {
}
}
struct InterestKind {
union {
queue @0 :UInt64;
reservation @1 :When;
}
}