mirror of
https://gitlab.com/fabinfra/fabaccess/fabaccess-api.git
synced 2025-03-12 23:01:47 +01:00
50 lines
1.1 KiB
Cap'n Proto
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;
|
|
}
|
|
}
|