api.fabaccess-api/interest.capnp

38 lines
938 B
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-15 16:28:23 +02:00
resource @0 () -> ( resource :Resource );
describe @1 () -> Description;
drop @2 ();
upgrade @3 () -> ( claim :Claim );
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
}
}