veyron2/val veyron2/vdl: Part 1 - reorganization of val and vdl
packages. The top-level vdl package contents is moved to
vdl/vdlutil, and the val package is split into three packages.
Some identifiers are renamed to make more sense under this
organization.
veyron2/vdl -> veyron2/vdl/vdlutil
veyron2/val -> veyron2/vdl [Type,Value,TypeBuilder,etc]
veyron2/val -> veyron2/vdl/opconst [Const,BinaryOp,UnaryOp,etc]
veyron2/val -> veyron2/vdl/valconv [Convert,Target,etc]
In addition some details of the valconv package are updated so
that the upcoming vom2 changes can work; e.g. StartComposite is
split into StartList, StartSet, etc.
Change-Id: I29be13612e22d9741834657985dc29c0a25aa0f6
diff --git a/examples/bank/bank.vdl.go b/examples/bank/bank.vdl.go
index 207d354..6156492 100644
--- a/examples/bank/bank.vdl.go
+++ b/examples/bank/bank.vdl.go
@@ -18,7 +18,7 @@
_gen_ipc "veyron2/ipc"
_gen_naming "veyron2/naming"
_gen_rt "veyron2/rt"
- _gen_vdl "veyron2/vdl"
+ _gen_vdlutil "veyron2/vdl/vdlutil"
_gen_wiretype "veyron2/wiretype"
)
@@ -60,10 +60,10 @@
case _gen_ipc.Client:
client = o
default:
- return nil, _gen_vdl.ErrUnrecognizedOption
+ return nil, _gen_vdlutil.ErrUnrecognizedOption
}
default:
- return nil, _gen_vdl.ErrTooManyOptionsToBind
+ return nil, _gen_vdlutil.ErrTooManyOptionsToBind
}
stub := &clientStubBank{client: client, name: name}
@@ -160,7 +160,7 @@
},
}
- result.TypeDefs = []_gen_vdl.Any{
+ result.TypeDefs = []_gen_vdlutil.Any{
_gen_wiretype.NamedPrimitiveType{Type: 0x1, Name: "error", Tags: []string(nil)}}
return result, nil
@@ -238,10 +238,10 @@
case _gen_ipc.Client:
client = o
default:
- return nil, _gen_vdl.ErrUnrecognizedOption
+ return nil, _gen_vdlutil.ErrUnrecognizedOption
}
default:
- return nil, _gen_vdl.ErrTooManyOptionsToBind
+ return nil, _gen_vdlutil.ErrTooManyOptionsToBind
}
stub := &clientStubBankAccount{client: client, name: name}
@@ -401,7 +401,7 @@
},
}
- result.TypeDefs = []_gen_vdl.Any{
+ result.TypeDefs = []_gen_vdlutil.Any{
_gen_wiretype.NamedPrimitiveType{Type: 0x1, Name: "error", Tags: []string(nil)}}
return result, nil
diff --git a/examples/boxes/boxes.vdl.go b/examples/boxes/boxes.vdl.go
index 5f73ee5..40da80a 100644
--- a/examples/boxes/boxes.vdl.go
+++ b/examples/boxes/boxes.vdl.go
@@ -12,7 +12,7 @@
_gen_ipc "veyron2/ipc"
_gen_naming "veyron2/naming"
_gen_rt "veyron2/rt"
- _gen_vdl "veyron2/vdl"
+ _gen_vdlutil "veyron2/vdl/vdlutil"
_gen_wiretype "veyron2/wiretype"
)
@@ -68,10 +68,10 @@
case _gen_ipc.Client:
client = o
default:
- return nil, _gen_vdl.ErrUnrecognizedOption
+ return nil, _gen_vdlutil.ErrUnrecognizedOption
}
default:
- return nil, _gen_vdl.ErrTooManyOptionsToBind
+ return nil, _gen_vdlutil.ErrTooManyOptionsToBind
}
stub := &clientStubBoxSignalling{client: client, name: name}
@@ -188,7 +188,7 @@
},
}
- result.TypeDefs = []_gen_vdl.Any{
+ result.TypeDefs = []_gen_vdlutil.Any{
_gen_wiretype.NamedPrimitiveType{Type: 0x1, Name: "error", Tags: []string(nil)}}
return result, nil
@@ -346,10 +346,10 @@
case _gen_ipc.Client:
client = o
default:
- return nil, _gen_vdl.ErrUnrecognizedOption
+ return nil, _gen_vdlutil.ErrUnrecognizedOption
}
default:
- return nil, _gen_vdl.ErrTooManyOptionsToBind
+ return nil, _gen_vdlutil.ErrTooManyOptionsToBind
}
stub := &clientStubDrawInterface{client: client, name: name}
@@ -463,7 +463,7 @@
},
}
- result.TypeDefs = []_gen_vdl.Any{
+ result.TypeDefs = []_gen_vdlutil.Any{
_gen_wiretype.NamedPrimitiveType{Type: 0x1, Name: "error", Tags: []string(nil)}, _gen_wiretype.ArrayType{Elem: 0x19, Len: 0x4, Name: "", Tags: []string(nil)}, _gen_wiretype.StructType{
[]_gen_wiretype.FieldType{
_gen_wiretype.FieldType{Type: 0x3, Name: "DeviceId"},
diff --git a/examples/fortune/fortune.vdl.go b/examples/fortune/fortune.vdl.go
index ddce22e..4784028 100644
--- a/examples/fortune/fortune.vdl.go
+++ b/examples/fortune/fortune.vdl.go
@@ -12,7 +12,7 @@
_gen_ipc "veyron2/ipc"
_gen_naming "veyron2/naming"
_gen_rt "veyron2/rt"
- _gen_vdl "veyron2/vdl"
+ _gen_vdlutil "veyron2/vdl/vdlutil"
_gen_wiretype "veyron2/wiretype"
)
@@ -57,10 +57,10 @@
case _gen_ipc.Client:
client = o
default:
- return nil, _gen_vdl.ErrUnrecognizedOption
+ return nil, _gen_vdlutil.ErrUnrecognizedOption
}
default:
- return nil, _gen_vdl.ErrTooManyOptionsToBind
+ return nil, _gen_vdlutil.ErrTooManyOptionsToBind
}
stub := &clientStubFortune{client: client, name: name}
@@ -177,7 +177,7 @@
},
}
- result.TypeDefs = []_gen_vdl.Any{
+ result.TypeDefs = []_gen_vdlutil.Any{
_gen_wiretype.NamedPrimitiveType{Type: 0x1, Name: "error", Tags: []string(nil)}}
return result, nil
diff --git a/examples/inspector/inspector.vdl.go b/examples/inspector/inspector.vdl.go
index ba04668..436f056 100644
--- a/examples/inspector/inspector.vdl.go
+++ b/examples/inspector/inspector.vdl.go
@@ -10,7 +10,7 @@
_gen_ipc "veyron2/ipc"
_gen_naming "veyron2/naming"
_gen_rt "veyron2/rt"
- _gen_vdl "veyron2/vdl"
+ _gen_vdlutil "veyron2/vdl/vdlutil"
_gen_wiretype "veyron2/wiretype"
)
@@ -169,10 +169,10 @@
case _gen_ipc.Client:
client = o
default:
- return nil, _gen_vdl.ErrUnrecognizedOption
+ return nil, _gen_vdlutil.ErrUnrecognizedOption
}
default:
- return nil, _gen_vdl.ErrTooManyOptionsToBind
+ return nil, _gen_vdlutil.ErrTooManyOptionsToBind
}
stub := &clientStubInspector{client: client, name: name}
@@ -290,7 +290,7 @@
OutStream: 66,
}
- result.TypeDefs = []_gen_vdl.Any{
+ result.TypeDefs = []_gen_vdlutil.Any{
_gen_wiretype.NamedPrimitiveType{Type: 0x1, Name: "error", Tags: []string(nil)}, _gen_wiretype.StructType{
[]_gen_wiretype.FieldType{
_gen_wiretype.FieldType{Type: 0x3, Name: "Name"},
diff --git a/examples/pipetobrowser/p2b.vdl.go b/examples/pipetobrowser/p2b.vdl.go
index a9d7a3b..422123b 100644
--- a/examples/pipetobrowser/p2b.vdl.go
+++ b/examples/pipetobrowser/p2b.vdl.go
@@ -10,7 +10,7 @@
_gen_ipc "veyron2/ipc"
_gen_naming "veyron2/naming"
_gen_rt "veyron2/rt"
- _gen_vdl "veyron2/vdl"
+ _gen_vdlutil "veyron2/vdl/vdlutil"
_gen_wiretype "veyron2/wiretype"
)
@@ -116,10 +116,10 @@
case _gen_ipc.Client:
client = o
default:
- return nil, _gen_vdl.ErrUnrecognizedOption
+ return nil, _gen_vdlutil.ErrUnrecognizedOption
}
default:
- return nil, _gen_vdl.ErrTooManyOptionsToBind
+ return nil, _gen_vdlutil.ErrTooManyOptionsToBind
}
stub := &clientStubViewer{client: client, name: name}
@@ -214,7 +214,7 @@
InStream: 67,
}
- result.TypeDefs = []_gen_vdl.Any{
+ result.TypeDefs = []_gen_vdlutil.Any{
_gen_wiretype.NamedPrimitiveType{Type: 0x1, Name: "error", Tags: []string(nil)}, _gen_wiretype.NamedPrimitiveType{Type: 0x32, Name: "byte", Tags: []string(nil)}, _gen_wiretype.SliceType{Elem: 0x42, Name: "", Tags: []string(nil)}}
return result, nil
diff --git a/examples/rockpaperscissors/service.vdl.go b/examples/rockpaperscissors/service.vdl.go
index 946d6e7..268ee07 100644
--- a/examples/rockpaperscissors/service.vdl.go
+++ b/examples/rockpaperscissors/service.vdl.go
@@ -10,7 +10,7 @@
_gen_ipc "veyron2/ipc"
_gen_naming "veyron2/naming"
_gen_rt "veyron2/rt"
- _gen_vdl "veyron2/vdl"
+ _gen_vdlutil "veyron2/vdl/vdlutil"
_gen_wiretype "veyron2/wiretype"
)
@@ -203,10 +203,10 @@
case _gen_ipc.Client:
client = o
default:
- return nil, _gen_vdl.ErrUnrecognizedOption
+ return nil, _gen_vdlutil.ErrUnrecognizedOption
}
default:
- return nil, _gen_vdl.ErrTooManyOptionsToBind
+ return nil, _gen_vdlutil.ErrTooManyOptionsToBind
}
stub := &clientStubJudge{client: client, name: name}
@@ -326,7 +326,7 @@
OutStream: 76,
}
- result.TypeDefs = []_gen_vdl.Any{
+ result.TypeDefs = []_gen_vdlutil.Any{
_gen_wiretype.NamedPrimitiveType{Type: 0x32, Name: "veyron/examples/rockpaperscissors.GameTypeTag", Tags: []string(nil)}, _gen_wiretype.StructType{
[]_gen_wiretype.FieldType{
_gen_wiretype.FieldType{Type: 0x24, Name: "NumRounds"},
@@ -451,10 +451,10 @@
case _gen_ipc.Client:
client = o
default:
- return nil, _gen_vdl.ErrUnrecognizedOption
+ return nil, _gen_vdlutil.ErrUnrecognizedOption
}
default:
- return nil, _gen_vdl.ErrTooManyOptionsToBind
+ return nil, _gen_vdlutil.ErrTooManyOptionsToBind
}
stub := &clientStubPlayer{client: client, name: name}
@@ -553,7 +553,7 @@
},
}
- result.TypeDefs = []_gen_vdl.Any{
+ result.TypeDefs = []_gen_vdlutil.Any{
_gen_wiretype.StructType{
[]_gen_wiretype.FieldType{
_gen_wiretype.FieldType{Type: 0x3, Name: "ID"},
@@ -627,10 +627,10 @@
case _gen_ipc.Client:
client = o
default:
- return nil, _gen_vdl.ErrUnrecognizedOption
+ return nil, _gen_vdlutil.ErrUnrecognizedOption
}
default:
- return nil, _gen_vdl.ErrTooManyOptionsToBind
+ return nil, _gen_vdlutil.ErrTooManyOptionsToBind
}
stub := &clientStubScoreKeeper{client: client, name: name}
@@ -727,7 +727,7 @@
},
}
- result.TypeDefs = []_gen_vdl.Any{
+ result.TypeDefs = []_gen_vdlutil.Any{
_gen_wiretype.NamedPrimitiveType{Type: 0x32, Name: "veyron/examples/rockpaperscissors.GameTypeTag", Tags: []string(nil)}, _gen_wiretype.StructType{
[]_gen_wiretype.FieldType{
_gen_wiretype.FieldType{Type: 0x24, Name: "NumRounds"},
@@ -823,10 +823,10 @@
case _gen_ipc.Client:
client = o
default:
- return nil, _gen_vdl.ErrUnrecognizedOption
+ return nil, _gen_vdlutil.ErrUnrecognizedOption
}
default:
- return nil, _gen_vdl.ErrTooManyOptionsToBind
+ return nil, _gen_vdlutil.ErrTooManyOptionsToBind
}
stub := &clientStubRockPaperScissors{client: client, name: name}
stub.Judge_ExcludingUniversal, _ = BindJudge(name, client)
@@ -922,7 +922,7 @@
func (__gen_s *ServerStubRockPaperScissors) Signature(call _gen_ipc.ServerCall) (_gen_ipc.ServiceSignature, error) {
result := _gen_ipc.ServiceSignature{Methods: make(map[string]_gen_ipc.MethodSignature)}
- result.TypeDefs = []_gen_vdl.Any{}
+ result.TypeDefs = []_gen_vdlutil.Any{}
var ss _gen_ipc.ServiceSignature
var firstAdded int
ss, _ = __gen_s.ServerStubJudge.Signature(call)
diff --git a/examples/tunnel/tunnel.vdl.go b/examples/tunnel/tunnel.vdl.go
index ca892f6..5bc70d2 100644
--- a/examples/tunnel/tunnel.vdl.go
+++ b/examples/tunnel/tunnel.vdl.go
@@ -12,7 +12,7 @@
_gen_ipc "veyron2/ipc"
_gen_naming "veyron2/naming"
_gen_rt "veyron2/rt"
- _gen_vdl "veyron2/vdl"
+ _gen_vdlutil "veyron2/vdl/vdlutil"
_gen_wiretype "veyron2/wiretype"
)
@@ -254,10 +254,10 @@
case _gen_ipc.Client:
client = o
default:
- return nil, _gen_vdl.ErrUnrecognizedOption
+ return nil, _gen_vdlutil.ErrUnrecognizedOption
}
default:
- return nil, _gen_vdl.ErrTooManyOptionsToBind
+ return nil, _gen_vdlutil.ErrTooManyOptionsToBind
}
stub := &clientStubTunnel{client: client, name: name}
@@ -378,7 +378,7 @@
OutStream: 70,
}
- result.TypeDefs = []_gen_vdl.Any{
+ result.TypeDefs = []_gen_vdlutil.Any{
_gen_wiretype.NamedPrimitiveType{Type: 0x1, Name: "error", Tags: []string(nil)}, _gen_wiretype.NamedPrimitiveType{Type: 0x32, Name: "byte", Tags: []string(nil)}, _gen_wiretype.SliceType{Elem: 0x42, Name: "", Tags: []string(nil)}, _gen_wiretype.StructType{
[]_gen_wiretype.FieldType{
_gen_wiretype.FieldType{Type: 0x2, Name: "UsePty"},
diff --git a/examples/wspr_sample/cache.vdl.go b/examples/wspr_sample/cache.vdl.go
index 810616d..5f738a3 100644
--- a/examples/wspr_sample/cache.vdl.go
+++ b/examples/wspr_sample/cache.vdl.go
@@ -10,14 +10,14 @@
_gen_ipc "veyron2/ipc"
_gen_naming "veyron2/naming"
_gen_rt "veyron2/rt"
- _gen_vdl "veyron2/vdl"
+ _gen_vdlutil "veyron2/vdl/vdlutil"
_gen_wiretype "veyron2/wiretype"
)
// KeyValuePair is a representation of a cached key and value pair.
type KeyValuePair struct {
Key string
- Value _gen_vdl.Any
+ Value _gen_vdlutil.Any
}
// A Cache service mimics the memcache interface.
@@ -26,10 +26,10 @@
// to enable embedding without method collisions. Not to be used directly by clients.
type Cache_ExcludingUniversal interface {
// Set sets a value for a key.
- Set(ctx _gen_context.T, key string, value _gen_vdl.Any, opts ..._gen_ipc.CallOpt) (err error)
+ Set(ctx _gen_context.T, key string, value _gen_vdlutil.Any, opts ..._gen_ipc.CallOpt) (err error)
// Get returns the value for a key. If the value is not found, returns
// a not found error.
- Get(ctx _gen_context.T, key string, opts ..._gen_ipc.CallOpt) (reply _gen_vdl.Any, err error)
+ Get(ctx _gen_context.T, key string, opts ..._gen_ipc.CallOpt) (reply _gen_vdlutil.Any, err error)
// Same as Get, but casts the return argument to an byte.
GetAsByte(ctx _gen_context.T, key string, opts ..._gen_ipc.CallOpt) (reply byte, err error)
// Same as Get, but casts the return argument to an int32.
@@ -51,7 +51,7 @@
// Same as Get, but casts the return argument to an error.
GetAsError(ctx _gen_context.T, key string, opts ..._gen_ipc.CallOpt) (reply error, err error)
// AsMap returns the full contents of the cache as a map.
- AsMap(ctx _gen_context.T, opts ..._gen_ipc.CallOpt) (reply map[string]_gen_vdl.Any, err error)
+ AsMap(ctx _gen_context.T, opts ..._gen_ipc.CallOpt) (reply map[string]_gen_vdlutil.Any, err error)
// KeyValuePairs returns the full contents of the cache as a slice of pairs.
KeyValuePairs(ctx _gen_context.T, opts ..._gen_ipc.CallOpt) (reply []KeyValuePair, err error)
// MostRecentSet returns the key and value and the timestamp for the most
@@ -75,10 +75,10 @@
type CacheService interface {
// Set sets a value for a key.
- Set(context _gen_ipc.ServerContext, key string, value _gen_vdl.Any) (err error)
+ Set(context _gen_ipc.ServerContext, key string, value _gen_vdlutil.Any) (err error)
// Get returns the value for a key. If the value is not found, returns
// a not found error.
- Get(context _gen_ipc.ServerContext, key string) (reply _gen_vdl.Any, err error)
+ Get(context _gen_ipc.ServerContext, key string) (reply _gen_vdlutil.Any, err error)
// Same as Get, but casts the return argument to an byte.
GetAsByte(context _gen_ipc.ServerContext, key string) (reply byte, err error)
// Same as Get, but casts the return argument to an int32.
@@ -100,7 +100,7 @@
// Same as Get, but casts the return argument to an error.
GetAsError(context _gen_ipc.ServerContext, key string) (reply error, err error)
// AsMap returns the full contents of the cache as a map.
- AsMap(context _gen_ipc.ServerContext) (reply map[string]_gen_vdl.Any, err error)
+ AsMap(context _gen_ipc.ServerContext) (reply map[string]_gen_vdlutil.Any, err error)
// KeyValuePairs returns the full contents of the cache as a slice of pairs.
KeyValuePairs(context _gen_ipc.ServerContext) (reply []KeyValuePair, err error)
// MostRecentSet returns the key and value and the timestamp for the most
@@ -132,7 +132,7 @@
// Recv returns the next item in the input stream, blocking until
// an item is available. Returns io.EOF to indicate graceful end of input.
- Recv() (item _gen_vdl.Any, err error)
+ Recv() (item _gen_vdlutil.Any, err error)
// Finish closes the stream and returns the positional return values for
// call.
@@ -155,7 +155,7 @@
return c.clientCall.CloseSend()
}
-func (c *implCacheMultiGetStream) Recv() (item _gen_vdl.Any, err error) {
+func (c *implCacheMultiGetStream) Recv() (item _gen_vdlutil.Any, err error) {
err = c.clientCall.Recv(&item)
return
}
@@ -176,7 +176,7 @@
type CacheServiceMultiGetStream interface {
// Send places the item onto the output stream, blocking if there is no buffer
// space available.
- Send(item _gen_vdl.Any) error
+ Send(item _gen_vdlutil.Any) error
// Recv fills itemptr with the next item in the input stream, blocking until
// an item is available. Returns io.EOF to indicate graceful end of input.
@@ -188,7 +188,7 @@
serverCall _gen_ipc.ServerCall
}
-func (s *implCacheServiceMultiGetStream) Send(item _gen_vdl.Any) error {
+func (s *implCacheServiceMultiGetStream) Send(item _gen_vdlutil.Any) error {
return s.serverCall.Send(item)
}
@@ -214,10 +214,10 @@
case _gen_ipc.Client:
client = o
default:
- return nil, _gen_vdl.ErrUnrecognizedOption
+ return nil, _gen_vdlutil.ErrUnrecognizedOption
}
default:
- return nil, _gen_vdl.ErrTooManyOptionsToBind
+ return nil, _gen_vdlutil.ErrTooManyOptionsToBind
}
stub := &clientStubCache{client: client, name: name}
@@ -240,7 +240,7 @@
name string
}
-func (__gen_c *clientStubCache) Set(ctx _gen_context.T, key string, value _gen_vdl.Any, opts ..._gen_ipc.CallOpt) (err error) {
+func (__gen_c *clientStubCache) Set(ctx _gen_context.T, key string, value _gen_vdlutil.Any, opts ..._gen_ipc.CallOpt) (err error) {
var call _gen_ipc.Call
if call, err = __gen_c.client.StartCall(ctx, __gen_c.name, "Set", []interface{}{key, value}, opts...); err != nil {
return
@@ -251,7 +251,7 @@
return
}
-func (__gen_c *clientStubCache) Get(ctx _gen_context.T, key string, opts ..._gen_ipc.CallOpt) (reply _gen_vdl.Any, err error) {
+func (__gen_c *clientStubCache) Get(ctx _gen_context.T, key string, opts ..._gen_ipc.CallOpt) (reply _gen_vdlutil.Any, err error) {
var call _gen_ipc.Call
if call, err = __gen_c.client.StartCall(ctx, __gen_c.name, "Get", []interface{}{key}, opts...); err != nil {
return
@@ -372,7 +372,7 @@
return
}
-func (__gen_c *clientStubCache) AsMap(ctx _gen_context.T, opts ..._gen_ipc.CallOpt) (reply map[string]_gen_vdl.Any, err error) {
+func (__gen_c *clientStubCache) AsMap(ctx _gen_context.T, opts ..._gen_ipc.CallOpt) (reply map[string]_gen_vdlutil.Any, err error) {
var call _gen_ipc.Call
if call, err = __gen_c.client.StartCall(ctx, __gen_c.name, "AsMap", nil, opts...); err != nil {
return
@@ -679,7 +679,7 @@
},
}
- result.TypeDefs = []_gen_vdl.Any{
+ result.TypeDefs = []_gen_vdlutil.Any{
_gen_wiretype.NamedPrimitiveType{Type: 0x1, Name: "anydata", Tags: []string(nil)}, _gen_wiretype.NamedPrimitiveType{Type: 0x1, Name: "error", Tags: []string(nil)}, _gen_wiretype.NamedPrimitiveType{Type: 0x32, Name: "byte", Tags: []string(nil)}, _gen_wiretype.MapType{Key: 0x3, Elem: 0x41, Name: "", Tags: []string(nil)}, _gen_wiretype.StructType{
[]_gen_wiretype.FieldType{
_gen_wiretype.FieldType{Type: 0x3, Name: "Key"},
@@ -709,12 +709,12 @@
return
}
-func (__gen_s *ServerStubCache) Set(call _gen_ipc.ServerCall, key string, value _gen_vdl.Any) (err error) {
+func (__gen_s *ServerStubCache) Set(call _gen_ipc.ServerCall, key string, value _gen_vdlutil.Any) (err error) {
err = __gen_s.service.Set(call, key, value)
return
}
-func (__gen_s *ServerStubCache) Get(call _gen_ipc.ServerCall, key string) (reply _gen_vdl.Any, err error) {
+func (__gen_s *ServerStubCache) Get(call _gen_ipc.ServerCall, key string) (reply _gen_vdlutil.Any, err error) {
reply, err = __gen_s.service.Get(call, key)
return
}
@@ -769,7 +769,7 @@
return
}
-func (__gen_s *ServerStubCache) AsMap(call _gen_ipc.ServerCall) (reply map[string]_gen_vdl.Any, err error) {
+func (__gen_s *ServerStubCache) AsMap(call _gen_ipc.ServerCall) (reply map[string]_gen_vdlutil.Any, err error) {
reply, err = __gen_s.service.AsMap(call)
return
}
diff --git a/examples/wspr_sample/error_thrower.vdl.go b/examples/wspr_sample/error_thrower.vdl.go
index 9eba7a1..54b046c 100644
--- a/examples/wspr_sample/error_thrower.vdl.go
+++ b/examples/wspr_sample/error_thrower.vdl.go
@@ -10,7 +10,7 @@
_gen_ipc "veyron2/ipc"
_gen_naming "veyron2/naming"
_gen_rt "veyron2/rt"
- _gen_vdl "veyron2/vdl"
+ _gen_vdlutil "veyron2/vdl/vdlutil"
_gen_wiretype "veyron2/wiretype"
)
@@ -87,10 +87,10 @@
case _gen_ipc.Client:
client = o
default:
- return nil, _gen_vdl.ErrUnrecognizedOption
+ return nil, _gen_vdlutil.ErrUnrecognizedOption
}
default:
- return nil, _gen_vdl.ErrTooManyOptionsToBind
+ return nil, _gen_vdlutil.ErrTooManyOptionsToBind
}
stub := &clientStubErrorThrower{client: client, name: name}
@@ -357,7 +357,7 @@
},
}
- result.TypeDefs = []_gen_vdl.Any{
+ result.TypeDefs = []_gen_vdlutil.Any{
_gen_wiretype.NamedPrimitiveType{Type: 0x1, Name: "error", Tags: []string(nil)}}
return result, nil
diff --git a/examples/wspr_sample/sampled/lib/cache_impl.go b/examples/wspr_sample/sampled/lib/cache_impl.go
index b2dfeff..e99d34e 100644
--- a/examples/wspr_sample/sampled/lib/cache_impl.go
+++ b/examples/wspr_sample/sampled/lib/cache_impl.go
@@ -8,7 +8,7 @@
"time"
"veyron2/ipc"
- "veyron2/vdl"
+ "veyron2/vdl/vdlutil"
"veyron2/verror"
sample "veyron/examples/wspr_sample"
@@ -18,18 +18,18 @@
// A simple in-memory implementation of a Cache service.
type cacheImpl struct {
- cache map[string]vdl.Any
+ cache map[string]vdlutil.Any
mostRecent sample.KeyValuePair
lastUpdateTime time.Time
}
// NewCached returns a new implementation of the CacheService.
func NewCached() sample.CacheService {
- return &cacheImpl{cache: make(map[string]vdl.Any)}
+ return &cacheImpl{cache: make(map[string]vdlutil.Any)}
}
// Set sets a value for a key. This should never return an error.
-func (c *cacheImpl) Set(_ ipc.ServerContext, key string, value vdl.Any) error {
+func (c *cacheImpl) Set(_ ipc.ServerContext, key string, value vdlutil.Any) error {
c.cache[key] = value
c.mostRecent = sample.KeyValuePair{Key: key, Value: value}
c.lastUpdateTime = time.Now()
@@ -38,7 +38,7 @@
// Get returns the value for a key. If the key is not in the map, it returns
// an error.
-func (c *cacheImpl) Get(_ ipc.ServerContext, key string) (vdl.Any, error) {
+func (c *cacheImpl) Get(_ ipc.ServerContext, key string) (vdlutil.Any, error) {
if value, ok := c.cache[key]; ok {
return value, nil
}
@@ -122,7 +122,7 @@
}
// AsMap returns the full contents of the cache as a map.
-func (c *cacheImpl) AsMap(ipc.ServerContext) (map[string]vdl.Any, error) {
+func (c *cacheImpl) AsMap(ipc.ServerContext) (map[string]vdlutil.Any, error) {
return c.cache, nil
}
diff --git a/examples/wspr_sample/sampled/lib/sampled_test.go b/examples/wspr_sample/sampled/lib/sampled_test.go
index 62c5950..28bd8d5 100644
--- a/examples/wspr_sample/sampled/lib/sampled_test.go
+++ b/examples/wspr_sample/sampled/lib/sampled_test.go
@@ -10,7 +10,7 @@
"veyron2/ipc"
"veyron2/naming"
"veyron2/rt"
- "veyron2/vdl"
+ "veyron2/vdl/vdlutil"
"veyron2/verror"
hps "veyron/examples/wspr_sample"
@@ -97,7 +97,7 @@
// settable mirrors the cache's Set method to provide a consistent way to populate test cases.
type settable interface {
- Set(ctx context.T, key string, val vdl.Any, opts ...ipc.CallOpt) error
+ Set(ctx context.T, key string, val vdlutil.Any, opts ...ipc.CallOpt) error
}
// populateObject populates a settable with 12 values.
@@ -168,9 +168,9 @@
}
// settableMap is a map that implements the settable interface.
-type settableMap map[string]vdl.Any
+type settableMap map[string]vdlutil.Any
-func (sm settableMap) Set(ctx context.T, key string, val vdl.Any, opts ...ipc.CallOpt) error {
+func (sm settableMap) Set(ctx context.T, key string, val vdlutil.Any, opts ...ipc.CallOpt) error {
sm[key] = val
return nil
}
@@ -187,7 +187,7 @@
t.Fatal("error calling AsMap: ", err)
}
- m := settableMap(make(map[string]vdl.Any))
+ m := settableMap(make(map[string]vdlutil.Any))
if err := populateObject(ctx, m); err != nil {
t.Fatal("error populating map: ", err)
}
@@ -211,7 +211,7 @@
t.Fatal("error calling KeyValuePairs: ", err)
}
- m := settableMap(make(map[string]vdl.Any))
+ m := settableMap(make(map[string]vdlutil.Any))
if err := populateObject(ctx, m); err != nil {
t.Fatal("error populating map: ", err)
}
diff --git a/lib/testutil/modules/servers.vdl.go b/lib/testutil/modules/servers.vdl.go
index 7c8748b..26f9ef2 100644
--- a/lib/testutil/modules/servers.vdl.go
+++ b/lib/testutil/modules/servers.vdl.go
@@ -10,7 +10,7 @@
_gen_ipc "veyron2/ipc"
_gen_naming "veyron2/naming"
_gen_rt "veyron2/rt"
- _gen_vdl "veyron2/vdl"
+ _gen_vdlutil "veyron2/vdl/vdlutil"
_gen_wiretype "veyron2/wiretype"
)
@@ -50,10 +50,10 @@
case _gen_ipc.Client:
client = o
default:
- return nil, _gen_vdl.ErrUnrecognizedOption
+ return nil, _gen_vdlutil.ErrUnrecognizedOption
}
default:
- return nil, _gen_vdl.ErrTooManyOptionsToBind
+ return nil, _gen_vdlutil.ErrTooManyOptionsToBind
}
stub := &clientStubClock{client: client, name: name}
@@ -151,7 +151,7 @@
},
}
- result.TypeDefs = []_gen_vdl.Any{
+ result.TypeDefs = []_gen_vdlutil.Any{
_gen_wiretype.NamedPrimitiveType{Type: 0x1, Name: "error", Tags: []string(nil)}}
return result, nil
@@ -216,10 +216,10 @@
case _gen_ipc.Client:
client = o
default:
- return nil, _gen_vdl.ErrUnrecognizedOption
+ return nil, _gen_vdlutil.ErrUnrecognizedOption
}
default:
- return nil, _gen_vdl.ErrTooManyOptionsToBind
+ return nil, _gen_vdlutil.ErrTooManyOptionsToBind
}
stub := &clientStubEcho{client: client, name: name}
@@ -317,7 +317,7 @@
},
}
- result.TypeDefs = []_gen_vdl.Any{
+ result.TypeDefs = []_gen_vdlutil.Any{
_gen_wiretype.NamedPrimitiveType{Type: 0x1, Name: "error", Tags: []string(nil)}}
return result, nil
diff --git a/runtimes/google/ipc/benchmarks/service.vdl.go b/runtimes/google/ipc/benchmarks/service.vdl.go
index 371285d..2356536 100644
--- a/runtimes/google/ipc/benchmarks/service.vdl.go
+++ b/runtimes/google/ipc/benchmarks/service.vdl.go
@@ -12,7 +12,7 @@
_gen_ipc "veyron2/ipc"
_gen_naming "veyron2/naming"
_gen_rt "veyron2/rt"
- _gen_vdl "veyron2/vdl"
+ _gen_vdlutil "veyron2/vdl/vdlutil"
_gen_wiretype "veyron2/wiretype"
)
@@ -137,10 +137,10 @@
case _gen_ipc.Client:
client = o
default:
- return nil, _gen_vdl.ErrUnrecognizedOption
+ return nil, _gen_vdlutil.ErrUnrecognizedOption
}
default:
- return nil, _gen_vdl.ErrTooManyOptionsToBind
+ return nil, _gen_vdlutil.ErrTooManyOptionsToBind
}
stub := &clientStubBenchmark{client: client, name: name}
@@ -257,7 +257,7 @@
OutStream: 66,
}
- result.TypeDefs = []_gen_vdl.Any{
+ result.TypeDefs = []_gen_vdlutil.Any{
_gen_wiretype.NamedPrimitiveType{Type: 0x32, Name: "byte", Tags: []string(nil)}, _gen_wiretype.SliceType{Elem: 0x41, Name: "", Tags: []string(nil)}, _gen_wiretype.NamedPrimitiveType{Type: 0x1, Name: "error", Tags: []string(nil)}}
return result, nil
diff --git a/runtimes/google/ipc/discharges.go b/runtimes/google/ipc/discharges.go
index 75d99f3..c79cf8f 100644
--- a/runtimes/google/ipc/discharges.go
+++ b/runtimes/google/ipc/discharges.go
@@ -6,7 +6,7 @@
"veyron2/context"
"veyron2/ipc"
"veyron2/security"
- "veyron2/vdl"
+ "veyron2/vdl/vdlutil"
"veyron2/vlog"
)
@@ -134,7 +134,7 @@
vlog.VI(3).Infof("Discharge fetch for caveat %T from %v failed: %v", cav, cav.Location(), err)
return
}
- var dAny vdl.Any
+ var dAny vdlutil.Any
// TODO(ashankar): Retry on errors like no-route-to-service, name resolution failures etc.
ierr := call.Finish(&dAny, &err)
if ierr != nil || err != nil {
diff --git a/runtimes/google/ipc/full_test.go b/runtimes/google/ipc/full_test.go
index dcf068e..9b24996 100644
--- a/runtimes/google/ipc/full_test.go
+++ b/runtimes/google/ipc/full_test.go
@@ -30,7 +30,7 @@
"veyron2/ipc/stream"
"veyron2/naming"
"veyron2/security"
- "veyron2/vdl"
+ "veyron2/vdl/vdlutil"
"veyron2/verror"
"veyron2/vlog"
"veyron2/vom"
@@ -130,7 +130,7 @@
type dischargeServer struct{}
-func (*dischargeServer) Discharge(ctx ipc.ServerCall, caveat vdl.Any) (vdl.Any, error) {
+func (*dischargeServer) Discharge(ctx ipc.ServerCall, caveat vdlutil.Any) (vdlutil.Any, error) {
c, ok := caveat.(security.ThirdPartyCaveat)
if !ok {
return nil, fmt.Errorf("discharger: unknown caveat(%T)", caveat)
diff --git a/runtimes/google/lib/netconfig/ipaux_bsd.go b/runtimes/google/lib/netconfig/ipaux_bsd.go
index aedeb81..1002471 100644
--- a/runtimes/google/lib/netconfig/ipaux_bsd.go
+++ b/runtimes/google/lib/netconfig/ipaux_bsd.go
@@ -110,7 +110,6 @@
}
}
-
w.Stop()
w.Lock()
close(w.c)
diff --git a/runtimes/google/vsync/vsync.vdl.go b/runtimes/google/vsync/vsync.vdl.go
index fb9834a..f81a4b7 100644
--- a/runtimes/google/vsync/vsync.vdl.go
+++ b/runtimes/google/vsync/vsync.vdl.go
@@ -14,7 +14,7 @@
_gen_ipc "veyron2/ipc"
_gen_naming "veyron2/naming"
_gen_rt "veyron2/rt"
- _gen_vdl "veyron2/vdl"
+ _gen_vdlutil "veyron2/vdl/vdlutil"
_gen_wiretype "veyron2/wiretype"
)
@@ -174,10 +174,10 @@
case _gen_ipc.Client:
client = o
default:
- return nil, _gen_vdl.ErrUnrecognizedOption
+ return nil, _gen_vdlutil.ErrUnrecognizedOption
}
default:
- return nil, _gen_vdl.ErrTooManyOptionsToBind
+ return nil, _gen_vdlutil.ErrTooManyOptionsToBind
}
stub := &clientStubSync{client: client, name: name}
@@ -276,7 +276,7 @@
OutStream: 82,
}
- result.TypeDefs = []_gen_vdl.Any{
+ result.TypeDefs = []_gen_vdlutil.Any{
_gen_wiretype.NamedPrimitiveType{Type: 0x3, Name: "veyron/runtimes/google/vsync.DeviceID", Tags: []string(nil)}, _gen_wiretype.NamedPrimitiveType{Type: 0x35, Name: "veyron/runtimes/google/vsync.GenID", Tags: []string(nil)}, _gen_wiretype.MapType{Key: 0x41, Elem: 0x42, Name: "veyron/runtimes/google/vsync.GenVector", Tags: []string(nil)}, _gen_wiretype.NamedPrimitiveType{Type: 0x1, Name: "error", Tags: []string(nil)}, _gen_wiretype.NamedPrimitiveType{Type: 0x35, Name: "veyron/runtimes/google/vsync.LSN", Tags: []string(nil)}, _gen_wiretype.NamedPrimitiveType{Type: 0x32, Name: "byte", Tags: []string(nil)}, _gen_wiretype.ArrayType{Elem: 0x46, Len: 0x10, Name: "veyron2/storage.ID", Tags: []string(nil)}, _gen_wiretype.NamedPrimitiveType{Type: 0x35, Name: "veyron2/storage.Version", Tags: []string(nil)}, _gen_wiretype.SliceType{Elem: 0x48, Name: "", Tags: []string(nil)}, _gen_wiretype.NamedPrimitiveType{Type: 0x1, Name: "anydata", Tags: []string(nil)}, _gen_wiretype.NamedPrimitiveType{Type: 0x32, Name: "veyron2/storage.TagOp", Tags: []string(nil)}, _gen_wiretype.StructType{
[]_gen_wiretype.FieldType{
_gen_wiretype.FieldType{Type: 0x4b, Name: "Op"},
diff --git a/services/mgmt/node/node.vdl.go b/services/mgmt/node/node.vdl.go
index 0aff95a..4a922f3 100644
--- a/services/mgmt/node/node.vdl.go
+++ b/services/mgmt/node/node.vdl.go
@@ -14,7 +14,7 @@
_gen_ipc "veyron2/ipc"
_gen_naming "veyron2/naming"
_gen_rt "veyron2/rt"
- _gen_vdl "veyron2/vdl"
+ _gen_vdlutil "veyron2/vdl/vdlutil"
_gen_wiretype "veyron2/wiretype"
)
@@ -55,10 +55,10 @@
case _gen_ipc.Client:
client = o
default:
- return nil, _gen_vdl.ErrUnrecognizedOption
+ return nil, _gen_vdlutil.ErrUnrecognizedOption
}
default:
- return nil, _gen_vdl.ErrTooManyOptionsToBind
+ return nil, _gen_vdlutil.ErrTooManyOptionsToBind
}
stub := &clientStubConfig{client: client, name: name}
@@ -156,7 +156,7 @@
},
}
- result.TypeDefs = []_gen_vdl.Any{
+ result.TypeDefs = []_gen_vdlutil.Any{
_gen_wiretype.NamedPrimitiveType{Type: 0x1, Name: "error", Tags: []string(nil)}}
return result, nil
@@ -229,10 +229,10 @@
case _gen_ipc.Client:
client = o
default:
- return nil, _gen_vdl.ErrUnrecognizedOption
+ return nil, _gen_vdlutil.ErrUnrecognizedOption
}
default:
- return nil, _gen_vdl.ErrTooManyOptionsToBind
+ return nil, _gen_vdlutil.ErrTooManyOptionsToBind
}
stub := &clientStubNode{client: client, name: name}
stub.Node_ExcludingUniversal, _ = node.BindNode(name, client)
@@ -321,7 +321,7 @@
func (__gen_s *ServerStubNode) Signature(call _gen_ipc.ServerCall) (_gen_ipc.ServiceSignature, error) {
result := _gen_ipc.ServiceSignature{Methods: make(map[string]_gen_ipc.MethodSignature)}
- result.TypeDefs = []_gen_vdl.Any{}
+ result.TypeDefs = []_gen_vdlutil.Any{}
var ss _gen_ipc.ServiceSignature
var firstAdded int
ss, _ = __gen_s.ServerStubNode.Signature(call)
diff --git a/services/mgmt/repository/repository.vdl.go b/services/mgmt/repository/repository.vdl.go
index 8357d48..f6bcc37 100644
--- a/services/mgmt/repository/repository.vdl.go
+++ b/services/mgmt/repository/repository.vdl.go
@@ -20,7 +20,7 @@
_gen_ipc "veyron2/ipc"
_gen_naming "veyron2/naming"
_gen_rt "veyron2/rt"
- _gen_vdl "veyron2/vdl"
+ _gen_vdlutil "veyron2/vdl/vdlutil"
_gen_wiretype "veyron2/wiretype"
)
@@ -105,10 +105,10 @@
case _gen_ipc.Client:
client = o
default:
- return nil, _gen_vdl.ErrUnrecognizedOption
+ return nil, _gen_vdlutil.ErrUnrecognizedOption
}
default:
- return nil, _gen_vdl.ErrTooManyOptionsToBind
+ return nil, _gen_vdlutil.ErrTooManyOptionsToBind
}
stub := &clientStubApplication{client: client, name: name}
stub.Application_ExcludingUniversal, _ = repository.BindApplication(name, client)
@@ -236,7 +236,7 @@
},
}
- result.TypeDefs = []_gen_vdl.Any{
+ result.TypeDefs = []_gen_vdlutil.Any{
_gen_wiretype.StructType{
[]_gen_wiretype.FieldType{
_gen_wiretype.FieldType{Type: 0x3, Name: "Title"},
@@ -395,10 +395,10 @@
case _gen_ipc.Client:
client = o
default:
- return nil, _gen_vdl.ErrUnrecognizedOption
+ return nil, _gen_vdlutil.ErrUnrecognizedOption
}
default:
- return nil, _gen_vdl.ErrTooManyOptionsToBind
+ return nil, _gen_vdlutil.ErrTooManyOptionsToBind
}
stub := &clientStubProfile{client: client, name: name}
stub.Profile_ExcludingUniversal, _ = repository.BindProfile(name, client)
@@ -543,7 +543,7 @@
},
}
- result.TypeDefs = []_gen_vdl.Any{
+ result.TypeDefs = []_gen_vdlutil.Any{
_gen_wiretype.MapType{Key: 0x3, Elem: 0x3, Name: "", Tags: []string(nil)}, _gen_wiretype.StructType{
[]_gen_wiretype.FieldType{
_gen_wiretype.FieldType{Type: 0x3, Name: "Name"},
diff --git a/services/mgmt/root/root.vdl.go b/services/mgmt/root/root.vdl.go
index 5f62698..90f5103 100644
--- a/services/mgmt/root/root.vdl.go
+++ b/services/mgmt/root/root.vdl.go
@@ -12,7 +12,7 @@
_gen_ipc "veyron2/ipc"
_gen_naming "veyron2/naming"
_gen_rt "veyron2/rt"
- _gen_vdl "veyron2/vdl"
+ _gen_vdlutil "veyron2/vdl/vdlutil"
_gen_wiretype "veyron2/wiretype"
)
@@ -56,10 +56,10 @@
case _gen_ipc.Client:
client = o
default:
- return nil, _gen_vdl.ErrUnrecognizedOption
+ return nil, _gen_vdlutil.ErrUnrecognizedOption
}
default:
- return nil, _gen_vdl.ErrTooManyOptionsToBind
+ return nil, _gen_vdlutil.ErrTooManyOptionsToBind
}
stub := &clientStubRoot{client: client, name: name}
@@ -156,7 +156,7 @@
},
}
- result.TypeDefs = []_gen_vdl.Any{
+ result.TypeDefs = []_gen_vdlutil.Any{
_gen_wiretype.NamedPrimitiveType{Type: 0x1, Name: "error", Tags: []string(nil)}}
return result, nil
diff --git a/services/mounttable/lib/collection_test.vdl.go b/services/mounttable/lib/collection_test.vdl.go
index 986224c..75cf8fb 100644
--- a/services/mounttable/lib/collection_test.vdl.go
+++ b/services/mounttable/lib/collection_test.vdl.go
@@ -10,7 +10,7 @@
_gen_ipc "veyron2/ipc"
_gen_naming "veyron2/naming"
_gen_rt "veyron2/rt"
- _gen_vdl "veyron2/vdl"
+ _gen_vdlutil "veyron2/vdl/vdlutil"
_gen_wiretype "veyron2/wiretype"
)
@@ -62,10 +62,10 @@
case _gen_ipc.Client:
client = o
default:
- return nil, _gen_vdl.ErrUnrecognizedOption
+ return nil, _gen_vdlutil.ErrUnrecognizedOption
}
default:
- return nil, _gen_vdl.ErrTooManyOptionsToBind
+ return nil, _gen_vdlutil.ErrTooManyOptionsToBind
}
stub := &clientStubCollection{client: client, name: name}
@@ -183,7 +183,7 @@
},
}
- result.TypeDefs = []_gen_vdl.Any{
+ result.TypeDefs = []_gen_vdlutil.Any{
_gen_wiretype.NamedPrimitiveType{Type: 0x1, Name: "error", Tags: []string(nil)}, _gen_wiretype.NamedPrimitiveType{Type: 0x32, Name: "byte", Tags: []string(nil)}, _gen_wiretype.SliceType{Elem: 0x42, Name: "", Tags: []string(nil)}}
return result, nil
diff --git a/services/security/discharger.vdl.go b/services/security/discharger.vdl.go
index 34ab8fc..7a2b5a8 100644
--- a/services/security/discharger.vdl.go
+++ b/services/security/discharger.vdl.go
@@ -12,7 +12,7 @@
_gen_ipc "veyron2/ipc"
_gen_naming "veyron2/naming"
_gen_rt "veyron2/rt"
- _gen_vdl "veyron2/vdl"
+ _gen_vdlutil "veyron2/vdl/vdlutil"
_gen_wiretype "veyron2/wiretype"
)
@@ -28,7 +28,7 @@
// respectively. (not enforced here because vdl does not know these types)
// TODO(ataly,ashankar): Figure out a VDL representation for ThirdPartyCaveat
// and Discharge and use those here?
- Discharge(ctx _gen_context.T, Caveat _gen_vdl.Any, opts ..._gen_ipc.CallOpt) (reply _gen_vdl.Any, err error)
+ Discharge(ctx _gen_context.T, Caveat _gen_vdlutil.Any, opts ..._gen_ipc.CallOpt) (reply _gen_vdlutil.Any, err error)
}
type Discharger interface {
_gen_ipc.UniversalServiceMethods
@@ -45,7 +45,7 @@
// respectively. (not enforced here because vdl does not know these types)
// TODO(ataly,ashankar): Figure out a VDL representation for ThirdPartyCaveat
// and Discharge and use those here?
- Discharge(context _gen_ipc.ServerContext, Caveat _gen_vdl.Any) (reply _gen_vdl.Any, err error)
+ Discharge(context _gen_ipc.ServerContext, Caveat _gen_vdlutil.Any) (reply _gen_vdlutil.Any, err error)
}
// BindDischarger returns the client stub implementing the Discharger
@@ -65,10 +65,10 @@
case _gen_ipc.Client:
client = o
default:
- return nil, _gen_vdl.ErrUnrecognizedOption
+ return nil, _gen_vdlutil.ErrUnrecognizedOption
}
default:
- return nil, _gen_vdl.ErrTooManyOptionsToBind
+ return nil, _gen_vdlutil.ErrTooManyOptionsToBind
}
stub := &clientStubDischarger{client: client, name: name}
@@ -91,7 +91,7 @@
name string
}
-func (__gen_c *clientStubDischarger) Discharge(ctx _gen_context.T, Caveat _gen_vdl.Any, opts ..._gen_ipc.CallOpt) (reply _gen_vdl.Any, err error) {
+func (__gen_c *clientStubDischarger) Discharge(ctx _gen_context.T, Caveat _gen_vdlutil.Any, opts ..._gen_ipc.CallOpt) (reply _gen_vdlutil.Any, err error) {
var call _gen_ipc.Call
if call, err = __gen_c.client.StartCall(ctx, __gen_c.name, "Discharge", []interface{}{Caveat}, opts...); err != nil {
return
@@ -166,7 +166,7 @@
},
}
- result.TypeDefs = []_gen_vdl.Any{
+ result.TypeDefs = []_gen_vdlutil.Any{
_gen_wiretype.NamedPrimitiveType{Type: 0x1, Name: "anydata", Tags: []string(nil)}, _gen_wiretype.NamedPrimitiveType{Type: 0x1, Name: "error", Tags: []string(nil)}}
return result, nil
@@ -190,7 +190,7 @@
return
}
-func (__gen_s *ServerStubDischarger) Discharge(call _gen_ipc.ServerCall, Caveat _gen_vdl.Any) (reply _gen_vdl.Any, err error) {
+func (__gen_s *ServerStubDischarger) Discharge(call _gen_ipc.ServerCall, Caveat _gen_vdlutil.Any) (reply _gen_vdlutil.Any, err error) {
reply, err = __gen_s.service.Discharge(call, Caveat)
return
}
diff --git a/services/security/simpledischarged/main.go b/services/security/simpledischarged/main.go
index bb1db9f..427942d 100644
--- a/services/security/simpledischarged/main.go
+++ b/services/security/simpledischarged/main.go
@@ -12,7 +12,7 @@
"veyron2/ipc"
"veyron2/rt"
"veyron2/security"
- "veyron2/vdl"
+ "veyron2/vdl/vdlutil"
)
// TODO(ataly, andreser): ideally, the expiration time (and other caveats) of
@@ -40,8 +40,8 @@
expiration time.Duration
}
-func (d *discharged) Discharge(ctx ipc.ServerContext, Caveat vdl.Any) (
- Discharge vdl.Any, err error) {
+func (d *discharged) Discharge(ctx ipc.ServerContext, Caveat vdlutil.Any) (
+ Discharge vdlutil.Any, err error) {
caveat, ok := Caveat.(security.ThirdPartyCaveat)
if !ok {
err = errors.New("unknown caveat")
diff --git a/services/store/memstore/query/eval.go b/services/store/memstore/query/eval.go
index 10a490d..cd89615 100644
--- a/services/store/memstore/query/eval.go
+++ b/services/store/memstore/query/eval.go
@@ -20,7 +20,7 @@
"veyron2/security"
"veyron2/services/store"
"veyron2/storage"
- "veyron2/vdl"
+ "veyron2/vdl/vdlutil"
)
// maxChannelSize is the maximum size of the channels used for concurrent
@@ -533,7 +533,7 @@
vlog.VI(2).Info("selection: ", result.Name)
sel := &store.QueryResult{
Name: result.Name,
- Fields: make(map[string]vdl.Any),
+ Fields: make(map[string]vdlutil.Any),
}
for _, a := range e.subpipelines {
// We create a new channel for each intermediate result, so there's no need to
@@ -1031,7 +1031,7 @@
return entry.Value
}
-func mapKeys(m map[string]vdl.Any) string {
+func mapKeys(m map[string]vdlutil.Any) string {
s := make([]string, 0, len(m))
for key, _ := range m {
s = append(s, key)
diff --git a/services/store/memstore/query/eval_test.go b/services/store/memstore/query/eval_test.go
index 148ace0..282eaa0 100644
--- a/services/store/memstore/query/eval_test.go
+++ b/services/store/memstore/query/eval_test.go
@@ -13,7 +13,7 @@
"veyron2/security"
"veyron2/services/store"
"veyron2/storage"
- "veyron2/vdl"
+ "veyron2/vdl/vdlutil"
"veyron2/vlog"
)
@@ -308,25 +308,25 @@
{
"", "'teams/cardinals' | {Name}",
[]*store.QueryResult{
- &store.QueryResult{0, "teams/cardinals", map[string]vdl.Any{"Name": "cardinals"}, nil},
+ &store.QueryResult{0, "teams/cardinals", map[string]vdlutil.Any{"Name": "cardinals"}, nil},
},
},
{
"teams", "'cardinals' | {Name}",
[]*store.QueryResult{
- &store.QueryResult{0, "cardinals", map[string]vdl.Any{"Name": "cardinals"}, nil},
+ &store.QueryResult{0, "cardinals", map[string]vdlutil.Any{"Name": "cardinals"}, nil},
},
},
{
"teams/cardinals", ". | {Name}",
[]*store.QueryResult{
- &store.QueryResult{0, "", map[string]vdl.Any{"Name": "cardinals"}, nil},
+ &store.QueryResult{0, "", map[string]vdlutil.Any{"Name": "cardinals"}, nil},
},
},
{
"", "'teams/cardinals' | {Name as Name}",
[]*store.QueryResult{
- &store.QueryResult{0, "teams/cardinals", map[string]vdl.Any{"Name": "cardinals"}, nil},
+ &store.QueryResult{0, "teams/cardinals", map[string]vdlutil.Any{"Name": "cardinals"}, nil},
},
},
{
@@ -335,7 +335,7 @@
&store.QueryResult{
0,
"teams/cardinals",
- map[string]vdl.Any{
+ map[string]vdlutil.Any{
"myname": "cardinals",
"myloc": "CA",
},
@@ -349,7 +349,7 @@
&store.QueryResult{
0,
"teams/cardinals",
- map[string]vdl.Any{
+ map[string]vdlutil.Any{
"myname": "cardinals",
"myloc": "CA",
},
@@ -368,7 +368,7 @@
&store.QueryResult{
0,
"teams/bears",
- map[string]vdl.Any{
+ map[string]vdlutil.Any{
"myname": "bears",
"drinkers": store.NestedResult(1),
"nondrinkers": store.NestedResult(2),
@@ -378,7 +378,7 @@
&store.QueryResult{
0,
"teams/cardinals",
- map[string]vdl.Any{
+ map[string]vdlutil.Any{
"myname": "cardinals",
"drinkers": store.NestedResult(3),
"nondrinkers": store.NestedResult(4),
@@ -394,7 +394,7 @@
&store.QueryResult{
0,
"teams/sharks",
- map[string]vdl.Any{
+ map[string]vdlutil.Any{
"myname": "sharks",
"drinkers": store.NestedResult(5),
"nondrinkers": store.NestedResult(6),
diff --git a/services/store/raw/service.vdl.go b/services/store/raw/service.vdl.go
index 9e532c0..ca92493 100644
--- a/services/store/raw/service.vdl.go
+++ b/services/store/raw/service.vdl.go
@@ -18,7 +18,7 @@
_gen_ipc "veyron2/ipc"
_gen_naming "veyron2/naming"
_gen_rt "veyron2/rt"
- _gen_vdl "veyron2/vdl"
+ _gen_vdlutil "veyron2/vdl/vdlutil"
_gen_wiretype "veyron2/wiretype"
)
@@ -38,7 +38,7 @@
// 2) The entry is the store root immediately after the update.
IsRoot bool
// Value is value stored at this entry.
- Value _gen_vdl.Any
+ Value _gen_vdlutil.Any
// Tags specify permissions on this entry.
Tags storage.TagList
// Dir is the implicit directory of this entry, and may contain references
@@ -224,10 +224,10 @@
case _gen_ipc.Client:
client = o
default:
- return nil, _gen_vdl.ErrUnrecognizedOption
+ return nil, _gen_vdlutil.ErrUnrecognizedOption
}
default:
- return nil, _gen_vdl.ErrTooManyOptionsToBind
+ return nil, _gen_vdlutil.ErrTooManyOptionsToBind
}
stub := &clientStubStore{client: client, name: name}
@@ -342,7 +342,7 @@
OutStream: 72,
}
- result.TypeDefs = []_gen_vdl.Any{
+ result.TypeDefs = []_gen_vdlutil.Any{
_gen_wiretype.NamedPrimitiveType{Type: 0x32, Name: "byte", Tags: []string(nil)}, _gen_wiretype.SliceType{Elem: 0x41, Name: "veyron2/services/watch.ResumeMarker", Tags: []string(nil)}, _gen_wiretype.StructType{
[]_gen_wiretype.FieldType{
_gen_wiretype.FieldType{Type: 0x42, Name: "ResumeMarker"},
diff --git a/services/store/server/object.go b/services/store/server/object.go
index f29112e..8f9b02c 100644
--- a/services/store/server/object.go
+++ b/services/store/server/object.go
@@ -11,7 +11,7 @@
"veyron2/services/store"
"veyron2/services/watch"
"veyron2/storage"
- "veyron2/vdl"
+ "veyron2/vdl/vdlutil"
)
type object struct {
@@ -65,7 +65,7 @@
}
}
-func attrsFromAnyData(attrs []vdl.Any) ([]storage.Attr, error) {
+func attrsFromAnyData(attrs []vdlutil.Any) ([]storage.Attr, error) {
typedAttrs := make([]storage.Attr, len(attrs))
for i, x := range attrs {
a, ok := x.(storage.Attr)
@@ -77,8 +77,8 @@
return typedAttrs, nil
}
-func attrsToAnyData(attrs []storage.Attr) []vdl.Any {
- uattrs := make([]vdl.Any, len(attrs))
+func attrsToAnyData(attrs []storage.Attr) []vdlutil.Any {
+ uattrs := make([]vdlutil.Any, len(attrs))
for i, x := range attrs {
uattrs[i] = x
}
@@ -110,7 +110,7 @@
}
// Put modifies the value of the Object.
-func (o *object) Put(ctx ipc.ServerContext, tid store.TransactionID, val vdl.Any) (store.Stat, error) {
+func (o *object) Put(ctx ipc.ServerContext, tid store.TransactionID, val vdlutil.Any) (store.Stat, error) {
t, err := o.server.findTransaction(ctx, tid)
if err != nil {
return nullStat, err
@@ -134,7 +134,7 @@
// SetAttr changes the attributes of the entry, such as permissions and
// replication groups. Attributes are associated with the value, not the
// path.
-func (o *object) SetAttr(ctx ipc.ServerContext, tid store.TransactionID, attrs []vdl.Any) error {
+func (o *object) SetAttr(ctx ipc.ServerContext, tid store.TransactionID, attrs []vdlutil.Any) error {
t, err := o.server.findTransaction(ctx, tid)
if err != nil {
return err
diff --git a/services/store/server/server.go b/services/store/server/server.go
index 3afa161..7b37e6e 100644
--- a/services/store/server/server.go
+++ b/services/store/server/server.go
@@ -16,7 +16,7 @@
"veyron2/ipc"
"veyron2/security"
"veyron2/services/store"
- "veyron2/vdl"
+ "veyron2/vdl/vdlutil"
"veyron2/verror"
)
@@ -195,7 +195,7 @@
}
// CreateTransaction creates a transaction.
-func (s *Server) CreateTransaction(ctx ipc.ServerContext, id store.TransactionID, opts []vdl.Any) error {
+func (s *Server) CreateTransaction(ctx ipc.ServerContext, id store.TransactionID, opts []vdlutil.Any) error {
s.mutex.Lock()
defer s.mutex.Unlock()
diff --git a/services/wspr/wsprd/lib/signature.go b/services/wspr/wsprd/lib/signature.go
index a0a60e0..54dd136 100644
--- a/services/wspr/wsprd/lib/signature.go
+++ b/services/wspr/wsprd/lib/signature.go
@@ -2,7 +2,7 @@
import (
"veyron2/ipc"
- "veyron2/vdl"
+ "veyron2/vdl/vdlutil"
"veyron2/wiretype"
)
@@ -13,7 +13,7 @@
var (
anydataType = wiretype.NamedPrimitiveType{
- Name: "veyron2/vdl.AnyData",
+ Name: "veyron2/vdlutil.AnyData",
Type: wiretype.TypeIDInterface,
}
errType = wiretype.NamedPrimitiveType{
@@ -91,7 +91,7 @@
ss.Methods[uppercaseFirstCharacter(name)] = ms
}
- ss.TypeDefs = []vdl.Any{anydataType, errType}
+ ss.TypeDefs = []vdlutil.Any{anydataType, errType}
return ss, nil
}
diff --git a/services/wspr/wsprd/lib/signature_manager_test.go b/services/wspr/wsprd/lib/signature_manager_test.go
index 0271fbd..ac60393 100644
--- a/services/wspr/wsprd/lib/signature_manager_test.go
+++ b/services/wspr/wsprd/lib/signature_manager_test.go
@@ -7,7 +7,7 @@
mocks_ipc "veyron/runtimes/google/testing/mocks/ipc"
"veyron2/ipc"
"veyron2/rt"
- "veyron2/vdl"
+ "veyron2/vdl/vdlutil"
"veyron2/wiretype"
)
@@ -18,9 +18,9 @@
func expectedSignature() ipc.ServiceSignature {
return ipc.ServiceSignature{
Methods: make(map[string]ipc.MethodSignature),
- TypeDefs: []vdl.Any{
+ TypeDefs: []vdlutil.Any{
wiretype.NamedPrimitiveType{
- Name: "veyron2/vdl.AnyData",
+ Name: "veyron2/vdlutil.AnyData",
Type: wiretype.TypeIDInterface,
},
},
diff --git a/services/wspr/wsprd/lib/signature_test.go b/services/wspr/wsprd/lib/signature_test.go
index 70f5803..e8e1f4f 100644
--- a/services/wspr/wsprd/lib/signature_test.go
+++ b/services/wspr/wsprd/lib/signature_test.go
@@ -5,7 +5,7 @@
"testing"
"veyron2/ipc"
- "veyron2/vdl"
+ "veyron2/vdl/vdlutil"
"veyron2/wiretype"
)
@@ -44,7 +44,7 @@
OutStream: wiretype.TypeIDString,
},
},
- TypeDefs: []vdl.Any{
+ TypeDefs: []vdlutil.Any{
anydataType,
errType,
},
@@ -105,7 +105,7 @@
OutStream: anydataTypeID,
},
},
- TypeDefs: []vdl.Any{
+ TypeDefs: []vdlutil.Any{
anydataType,
errType,
},
diff --git a/services/wspr/wsprd/lib/wspr_test.go b/services/wspr/wsprd/lib/wspr_test.go
index f8d6b9f..018270d 100644
--- a/services/wspr/wsprd/lib/wspr_test.go
+++ b/services/wspr/wsprd/lib/wspr_test.go
@@ -12,7 +12,7 @@
"veyron2/ipc"
"veyron2/naming"
"veyron2/rt"
- "veyron2/vdl"
+ "veyron2/vdl/vdlutil"
"veyron2/verror"
"veyron2/vlog"
"veyron2/vom"
@@ -85,7 +85,7 @@
InStream: 36,
OutStream: 36,
}
- result.TypeDefs = []vdl.Any{
+ result.TypeDefs = []vdlutil.Any{
wiretype.NamedPrimitiveType{Type: 0x1, Name: "error", Tags: []string(nil)}}
return result, nil
diff --git a/tools/vrpc/impl/impl.go b/tools/vrpc/impl/impl.go
index aca51a3..fa06375 100644
--- a/tools/vrpc/impl/impl.go
+++ b/tools/vrpc/impl/impl.go
@@ -12,7 +12,7 @@
"veyron2/context"
"veyron2/ipc"
"veyron2/rt"
- "veyron2/vdl"
+ "veyron2/vdl/vdlutil"
"veyron2/vom"
"veyron2/wiretype"
@@ -224,8 +224,8 @@
}
// formatWiretype generates a string representation of the specified type.
-func formatWiretype(td []vdl.Any, tid wiretype.TypeID) string {
- var wt vdl.Any
+func formatWiretype(td []vdlutil.Any, tid wiretype.TypeID) string {
+ var wt vdlutil.Any
if tid >= wiretype.TypeIDFirst {
wt = td[tid-wiretype.TypeIDFirst]
} else {
@@ -269,7 +269,7 @@
}
}
-func formatSignature(name string, ms ipc.MethodSignature, defs []vdl.Any) string {
+func formatSignature(name string, ms ipc.MethodSignature, defs []vdlutil.Any) string {
var buf bytes.Buffer
fmt.Fprintf(&buf, "func %s(", name)
for index, arg := range ms.InArgs {
diff --git a/tools/vrpc/test_base/test_base.vdl.go b/tools/vrpc/test_base/test_base.vdl.go
index 958f64e..9332b43 100644
--- a/tools/vrpc/test_base/test_base.vdl.go
+++ b/tools/vrpc/test_base/test_base.vdl.go
@@ -10,7 +10,7 @@
_gen_ipc "veyron2/ipc"
_gen_naming "veyron2/naming"
_gen_rt "veyron2/rt"
- _gen_vdl "veyron2/vdl"
+ _gen_vdlutil "veyron2/vdl/vdlutil"
_gen_wiretype "veyron2/wiretype"
)
@@ -153,10 +153,10 @@
case _gen_ipc.Client:
client = o
default:
- return nil, _gen_vdl.ErrUnrecognizedOption
+ return nil, _gen_vdlutil.ErrUnrecognizedOption
}
default:
- return nil, _gen_vdl.ErrTooManyOptionsToBind
+ return nil, _gen_vdlutil.ErrTooManyOptionsToBind
}
stub := &clientStubTypeTester{client: client, name: name}
@@ -659,7 +659,7 @@
OutStream: 2,
}
- result.TypeDefs = []_gen_vdl.Any{
+ result.TypeDefs = []_gen_vdlutil.Any{
_gen_wiretype.NamedPrimitiveType{Type: 0x1, Name: "error", Tags: []string(nil)}, _gen_wiretype.NamedPrimitiveType{Type: 0x32, Name: "byte", Tags: []string(nil)}, _gen_wiretype.ArrayType{Elem: 0x42, Len: 0x2, Name: "", Tags: []string(nil)}, _gen_wiretype.MapType{Key: 0x42, Elem: 0x42, Name: "", Tags: []string(nil)}, _gen_wiretype.SliceType{Elem: 0x42, Name: "", Tags: []string(nil)}, _gen_wiretype.StructType{
[]_gen_wiretype.FieldType{
_gen_wiretype.FieldType{Type: 0x24, Name: "X"},