"x/ref": Add Dump method to BlessingRoots
This CL adds a 'Dump' method to BlessingRoots to obtain
the set of all roots. While I hope that this is useful
in general, it is necessary for addressing:
https://github.com/vanadium/issues/issues/228
MultiPart: 2/2
Change-Id: I705b312aabc0a4747f14728fba360fb9cec683db
diff --git a/services/agent/wire.vdl.go b/services/agent/wire.vdl.go
index 6b29ef1..1a0e6a2 100644
--- a/services/agent/wire.vdl.go
+++ b/services/agent/wire.vdl.go
@@ -65,6 +65,7 @@
BlessingStoreDebugString(*context.T, ...rpc.CallOpt) (string, error)
BlessingRootsAdd(ctx *context.T, root []byte, pattern security.BlessingPattern, opts ...rpc.CallOpt) error
BlessingRootsRecognized(ctx *context.T, root []byte, blessing string, opts ...rpc.CallOpt) error
+ BlessingRootsDump(*context.T, ...rpc.CallOpt) (map[security.BlessingPattern][][]byte, error)
BlessingRootsDebugString(*context.T, ...rpc.CallOpt) (string, error)
// Clients using caching should call NotifyWhenChanged upon connecting to
// the server. The server will stream back values whenever the client should
@@ -168,6 +169,11 @@
return
}
+func (c implAgentClientStub) BlessingRootsDump(ctx *context.T, opts ...rpc.CallOpt) (o0 map[security.BlessingPattern][][]byte, err error) {
+ err = v23.GetClient(ctx).Call(ctx, c.name, "BlessingRootsDump", nil, []interface{}{&o0}, opts...)
+ return
+}
+
func (c implAgentClientStub) BlessingRootsDebugString(ctx *context.T, opts ...rpc.CallOpt) (o0 string, err error) {
err = v23.GetClient(ctx).Call(ctx, c.name, "BlessingRootsDebugString", nil, []interface{}{&o0}, opts...)
return
@@ -269,6 +275,7 @@
BlessingStoreDebugString(*context.T, rpc.ServerCall) (string, error)
BlessingRootsAdd(ctx *context.T, call rpc.ServerCall, root []byte, pattern security.BlessingPattern) error
BlessingRootsRecognized(ctx *context.T, call rpc.ServerCall, root []byte, blessing string) error
+ BlessingRootsDump(*context.T, rpc.ServerCall) (map[security.BlessingPattern][][]byte, error)
BlessingRootsDebugString(*context.T, rpc.ServerCall) (string, error)
// Clients using caching should call NotifyWhenChanged upon connecting to
// the server. The server will stream back values whenever the client should
@@ -298,6 +305,7 @@
BlessingStoreDebugString(*context.T, rpc.ServerCall) (string, error)
BlessingRootsAdd(ctx *context.T, call rpc.ServerCall, root []byte, pattern security.BlessingPattern) error
BlessingRootsRecognized(ctx *context.T, call rpc.ServerCall, root []byte, blessing string) error
+ BlessingRootsDump(*context.T, rpc.ServerCall) (map[security.BlessingPattern][][]byte, error)
BlessingRootsDebugString(*context.T, rpc.ServerCall) (string, error)
// Clients using caching should call NotifyWhenChanged upon connecting to
// the server. The server will stream back values whenever the client should
@@ -399,6 +407,10 @@
return s.impl.BlessingRootsRecognized(ctx, call, i0, i1)
}
+func (s implAgentServerStub) BlessingRootsDump(ctx *context.T, call rpc.ServerCall) (map[security.BlessingPattern][][]byte, error) {
+ return s.impl.BlessingRootsDump(ctx, call)
+}
+
func (s implAgentServerStub) BlessingRootsDebugString(ctx *context.T, call rpc.ServerCall) (string, error) {
return s.impl.BlessingRootsDebugString(ctx, call)
}
@@ -554,6 +566,12 @@
},
},
{
+ Name: "BlessingRootsDump",
+ OutArgs: []rpc.ArgDesc{
+ {"", ``}, // map[security.BlessingPattern][][]byte
+ },
+ },
+ {
Name: "BlessingRootsDebugString",
OutArgs: []rpc.ArgDesc{
{"", ``}, // string