veyron2/vdl: Move all *.idl files to *.vdl, re-generate all
files, and remove veyron2/idl. This marks the completion of the
transition from IDL to VDL; new features will all be developed
using VDL.
Change-Id: I7b382938f54c3a3f8b08630b19558078078ae4ab
diff --git a/examples/boxes/boxes.idl b/examples/boxes/boxes.vdl
similarity index 100%
rename from examples/boxes/boxes.idl
rename to examples/boxes/boxes.vdl
diff --git a/examples/boxes/boxes.idl.go b/examples/boxes/boxes.vdl.go
similarity index 96%
rename from examples/boxes/boxes.idl.go
rename to examples/boxes/boxes.vdl.go
index 0238770..4253837 100644
--- a/examples/boxes/boxes.idl.go
+++ b/examples/boxes/boxes.vdl.go
@@ -1,4 +1,4 @@
-// This file was auto-generated by the veyron idl tool.
+// This file was auto-generated by the veyron vdl tool.
// Source: boxes.idl
// Boxes is an android app that uses veyron to share views
@@ -8,10 +8,10 @@
import (
// The non-user imports are prefixed with "_gen_" to prevent collisions.
_gen_veyron2 "veyron2"
- _gen_idl "veyron2/idl"
_gen_ipc "veyron2/ipc"
_gen_naming "veyron2/naming"
_gen_rt "veyron2/rt"
+ _gen_vdl "veyron2/vdl"
_gen_wiretype "veyron2/wiretype"
)
@@ -34,12 +34,11 @@
// Add endpoint information to the signalling server.
Add(Endpoint string, opts ..._gen_ipc.ClientCallOpt) (err error)
-
// Get endpoint information about a peer.
Get(opts ..._gen_ipc.ClientCallOpt) (reply string, err error)
}
type BoxSignalling interface {
- _gen_idl.TagGetter
+ _gen_vdl.TagGetter
// UnresolveStep returns the names for the remote service, rooted at the
// service's immediate namespace ancestor.
UnresolveStep(opts ..._gen_ipc.ClientCallOpt) ([]string, error)
@@ -51,7 +50,6 @@
// Add endpoint information to the signalling server.
Add(context _gen_ipc.Context, Endpoint string) (err error)
-
// Get endpoint information about a peer.
Get(context _gen_ipc.Context) (reply string, err error)
}
@@ -73,10 +71,10 @@
case _gen_ipc.Client:
client = o
default:
- return nil, _gen_idl.ErrUnrecognizedOption
+ return nil, _gen_vdl.ErrUnrecognizedOption
}
default:
- return nil, _gen_idl.ErrTooManyOptionsToBind
+ return nil, _gen_vdl.ErrTooManyOptionsToBind
}
stub := &clientStubBoxSignalling{client: client, name: name}
@@ -165,7 +163,7 @@
},
}
- result.TypeDefs = []_gen_idl.AnyData{
+ result.TypeDefs = []_gen_vdl.Any{
_gen_wiretype.NamedPrimitiveType{Type: 0x1, Name: "error", Tags: []string(nil)}}
return result, nil
@@ -222,7 +220,7 @@
Draw(opts ..._gen_ipc.ClientCallOpt) (reply DrawInterfaceDrawStream, err error)
}
type DrawInterface interface {
- _gen_idl.TagGetter
+ _gen_vdl.TagGetter
// UnresolveStep returns the names for the remote service, rooted at the
// service's immediate namespace ancestor.
UnresolveStep(opts ..._gen_ipc.ClientCallOpt) ([]string, error)
@@ -334,10 +332,10 @@
case _gen_ipc.Client:
client = o
default:
- return nil, _gen_idl.ErrUnrecognizedOption
+ return nil, _gen_vdl.ErrUnrecognizedOption
}
default:
- return nil, _gen_idl.ErrTooManyOptionsToBind
+ return nil, _gen_vdl.ErrTooManyOptionsToBind
}
stub := &clientStubDrawInterface{client: client, name: name}
@@ -406,13 +404,13 @@
OutStream: 67,
}
- result.TypeDefs = []_gen_idl.AnyData{
+ result.TypeDefs = []_gen_vdl.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: "BoxId"},
_gen_wiretype.FieldType{Type: 0x42, Name: "Points"},
},
- "Box", []string(nil)},
+ "veyron/examples/boxes.Box", []string(nil)},
}
return result, nil
diff --git a/examples/fortune/fortune.idl b/examples/fortune/fortune.vdl
similarity index 100%
rename from examples/fortune/fortune.idl
rename to examples/fortune/fortune.vdl
diff --git a/examples/fortune/fortune.idl.go b/examples/fortune/fortune.vdl.go
similarity index 95%
rename from examples/fortune/fortune.idl.go
rename to examples/fortune/fortune.vdl.go
index 6978533..f245e9b 100644
--- a/examples/fortune/fortune.idl.go
+++ b/examples/fortune/fortune.vdl.go
@@ -1,4 +1,4 @@
-// This file was auto-generated by the veyron idl tool.
+// This file was auto-generated by the veyron vdl tool.
// Source: fortune.idl
package fortune
@@ -8,10 +8,10 @@
// The non-user imports are prefixed with "_gen_" to prevent collisions.
_gen_veyron2 "veyron2"
- _gen_idl "veyron2/idl"
_gen_ipc "veyron2/ipc"
_gen_naming "veyron2/naming"
_gen_rt "veyron2/rt"
+ _gen_vdl "veyron2/vdl"
_gen_wiretype "veyron2/wiretype"
)
@@ -25,12 +25,11 @@
// Get returns a random fortune.
Get(opts ..._gen_ipc.ClientCallOpt) (reply string, err error)
-
// Add stores a fortune in the set used by Get.
Add(Fortune string, opts ..._gen_ipc.ClientCallOpt) (err error)
}
type Fortune interface {
- _gen_idl.TagGetter
+ _gen_vdl.TagGetter
// UnresolveStep returns the names for the remote service, rooted at the
// service's immediate namespace ancestor.
UnresolveStep(opts ..._gen_ipc.ClientCallOpt) ([]string, error)
@@ -42,7 +41,6 @@
// Get returns a random fortune.
Get(context _gen_ipc.Context) (reply string, err error)
-
// Add stores a fortune in the set used by Get.
Add(context _gen_ipc.Context, Fortune string) (err error)
}
@@ -64,10 +62,10 @@
case _gen_ipc.Client:
client = o
default:
- return nil, _gen_idl.ErrUnrecognizedOption
+ return nil, _gen_vdl.ErrUnrecognizedOption
}
default:
- return nil, _gen_idl.ErrTooManyOptionsToBind
+ return nil, _gen_vdl.ErrTooManyOptionsToBind
}
stub := &clientStubFortune{client: client, name: name}
@@ -156,7 +154,7 @@
},
}
- result.TypeDefs = []_gen_idl.AnyData{
+ result.TypeDefs = []_gen_vdl.Any{
_gen_wiretype.NamedPrimitiveType{Type: 0x1, Name: "error", Tags: []string(nil)}}
return result, nil
diff --git a/examples/inspector/inspector.idl b/examples/inspector/inspector.vdl
similarity index 100%
rename from examples/inspector/inspector.idl
rename to examples/inspector/inspector.vdl
diff --git a/examples/inspector/inspector.idl.go b/examples/inspector/inspector.vdl.go
similarity index 96%
rename from examples/inspector/inspector.idl.go
rename to examples/inspector/inspector.vdl.go
index 6b860e1..4197d52 100644
--- a/examples/inspector/inspector.idl.go
+++ b/examples/inspector/inspector.vdl.go
@@ -1,4 +1,4 @@
-// This file was auto-generated by the veyron idl tool.
+// This file was auto-generated by the veyron vdl tool.
// Source: inspector.idl
package inspector
@@ -6,10 +6,10 @@
import (
// The non-user imports are prefixed with "_gen_" to prevent collisions.
_gen_veyron2 "veyron2"
- _gen_idl "veyron2/idl"
_gen_ipc "veyron2/ipc"
_gen_naming "veyron2/naming"
_gen_rt "veyron2/rt"
+ _gen_vdl "veyron2/vdl"
_gen_wiretype "veyron2/wiretype"
)
@@ -32,11 +32,10 @@
// clients.
type Inspector_InternalNoTagGetter interface {
Ls(Glob string, opts ..._gen_ipc.ClientCallOpt) (reply InspectorLsStream, err error)
-
LsDetails(Glob string, opts ..._gen_ipc.ClientCallOpt) (reply InspectorLsDetailsStream, err error)
}
type Inspector interface {
- _gen_idl.TagGetter
+ _gen_vdl.TagGetter
// UnresolveStep returns the names for the remote service, rooted at the
// service's immediate namespace ancestor.
UnresolveStep(opts ..._gen_ipc.ClientCallOpt) ([]string, error)
@@ -46,7 +45,6 @@
// InspectorService is the interface the server implements.
type InspectorService interface {
Ls(context _gen_ipc.Context, Glob string, stream InspectorServiceLsStream) (err error)
-
LsDetails(context _gen_ipc.Context, Glob string, stream InspectorServiceLsDetailsStream) (err error)
}
@@ -175,10 +173,10 @@
case _gen_ipc.Client:
client = o
default:
- return nil, _gen_idl.ErrUnrecognizedOption
+ return nil, _gen_vdl.ErrUnrecognizedOption
}
default:
- return nil, _gen_idl.ErrTooManyOptionsToBind
+ return nil, _gen_vdl.ErrTooManyOptionsToBind
}
stub := &clientStubInspector{client: client, name: name}
@@ -268,7 +266,7 @@
OutStream: 66,
}
- result.TypeDefs = []_gen_idl.AnyData{
+ result.TypeDefs = []_gen_vdl.Any{
_gen_wiretype.NamedPrimitiveType{Type: 0x1, Name: "error", Tags: []string(nil)}, _gen_wiretype.StructType{
[]_gen_wiretype.FieldType{
_gen_wiretype.FieldType{Type: 0x3, Name: "Name"},
@@ -278,7 +276,7 @@
_gen_wiretype.FieldType{Type: 0x24, Name: "ModNano"},
_gen_wiretype.FieldType{Type: 0x2, Name: "IsDir"},
},
- "Details", []string(nil)},
+ "veyron/examples/inspector.Details", []string(nil)},
}
return result, nil
diff --git a/examples/rockpaperscissors/service.idl b/examples/rockpaperscissors/service.vdl
similarity index 100%
rename from examples/rockpaperscissors/service.idl
rename to examples/rockpaperscissors/service.vdl
diff --git a/examples/rockpaperscissors/service.idl.go b/examples/rockpaperscissors/service.vdl.go
similarity index 93%
rename from examples/rockpaperscissors/service.idl.go
rename to examples/rockpaperscissors/service.vdl.go
index b87dfc3..b9f5100 100644
--- a/examples/rockpaperscissors/service.idl.go
+++ b/examples/rockpaperscissors/service.vdl.go
@@ -1,4 +1,4 @@
-// This file was auto-generated by the veyron idl tool.
+// This file was auto-generated by the veyron vdl tool.
// Source: service.idl
package rockpaperscissors
@@ -6,10 +6,10 @@
import (
// The non-user imports are prefixed with "_gen_" to prevent collisions.
_gen_veyron2 "veyron2"
- _gen_idl "veyron2/idl"
_gen_ipc "veyron2/ipc"
_gen_naming "veyron2/naming"
_gen_rt "veyron2/rt"
+ _gen_vdl "veyron2/vdl"
_gen_wiretype "veyron2/wiretype"
)
@@ -17,38 +17,20 @@
type GameID struct {
ID string
}
-type GameTypeTag byte
// GameOptions specifies the parameters of a game.
type GameOptions struct {
NumRounds int32 // The number of rounds that a player must win to win the game.
GameType GameTypeTag // The type of game to play: Classic or LizardSpock.
}
+
+type GameTypeTag byte
+
type PlayerAction struct {
Move string // The move that the player wants to make.
Quit bool // Whether the player wants to quit the game.
}
-// WinnerTag is a type used to indicate whether a round or a game was a draw,
-// was won by player 1 or was won by player 2.
-type WinnerTag byte
-
-// Round represents the state of a round.
-type Round struct {
- Moves [2]string // Each player's move.
- Winner WinnerTag // Who won the round.
- StartTimeNS int64 // The time at which the round started.
- EndTimeNS int64 // The time at which the round ended.
-}
-type ScoreCard struct {
- Opts GameOptions // The game options.
- Judge string // The name of the judge.
- Players []string // The name of the players.
- Rounds []Round // The outcome of each round.
- StartTimeNS int64 // The time at which the game started.
- EndTimeNS int64 // The time at which the game ended.
- Winner WinnerTag // Who won the game.
-}
type JudgeAction struct {
PlayerNum int32 // The player's number.
OpponentName string // The name of the opponent.
@@ -57,11 +39,33 @@
Score ScoreCard // The result of the game. Not always present.
}
+// Round represents the state of a round.
+type Round struct {
+ Moves [2]string // Each player's move.
+ Winner WinnerTag // Who won the round.
+ StartTimeNS int64 // The time at which the round started.
+ EndTimeNS int64 // The time at which the round ended.
+}
+
+// WinnerTag is a type used to indicate whether a round or a game was a draw,
+// was won by player 1 or was won by player 2.
+type WinnerTag byte
+
// PlayResult is the value returned by the Play method. It indicates the outcome of the game.
type PlayResult struct {
YouWon bool // True if the player receiving the result won the game.
}
+type ScoreCard struct {
+ Opts GameOptions // The game options.
+ Judge string // The name of the judge.
+ Players []string // The name of the players.
+ Rounds []Round // The outcome of each round.
+ StartTimeNS int64 // The time at which the game started.
+ EndTimeNS int64 // The time at which the game ended.
+ Winner WinnerTag // Who won the game.
+}
+
const (
Classic = GameTypeTag(0) // Rock-Paper-Scissors
@@ -74,6 +78,666 @@
Player2 = WinnerTag(2)
)
+// Judge is the interface the client binds and uses.
+// Judge_InternalNoTagGetter is the interface without the TagGetter
+// and UnresolveStep methods (both framework-added, rathern than user-defined),
+// to enable embedding without method collisions. Not to be used directly by
+// clients.
+type Judge_InternalNoTagGetter interface {
+
+ // CreateGame creates a new game with the given game options and returns a game
+ // identifier that can be used by the players to join the game.
+ CreateGame(Opts GameOptions, opts ..._gen_ipc.ClientCallOpt) (reply GameID, err error)
+ // Play lets a player join an existing game and play.
+ Play(ID GameID, opts ..._gen_ipc.ClientCallOpt) (reply JudgePlayStream, err error)
+}
+type Judge interface {
+ _gen_vdl.TagGetter
+ // UnresolveStep returns the names for the remote service, rooted at the
+ // service's immediate namespace ancestor.
+ UnresolveStep(opts ..._gen_ipc.ClientCallOpt) ([]string, error)
+ Judge_InternalNoTagGetter
+}
+
+// JudgeService is the interface the server implements.
+type JudgeService interface {
+
+ // CreateGame creates a new game with the given game options and returns a game
+ // identifier that can be used by the players to join the game.
+ CreateGame(context _gen_ipc.Context, Opts GameOptions) (reply GameID, err error)
+ // Play lets a player join an existing game and play.
+ Play(context _gen_ipc.Context, ID GameID, stream JudgeServicePlayStream) (reply PlayResult, err error)
+}
+
+// JudgePlayStream is the interface for streaming responses of the method
+// Play in the service interface Judge.
+type JudgePlayStream interface {
+
+ // Send places the item onto the output stream, blocking if there is no buffer
+ // space available.
+ Send(item PlayerAction) error
+
+ // CloseSend indicates to the server that no more items will be sent; server
+ // Recv calls will receive io.EOF after all sent items. Subsequent calls to
+ // Send on the client will fail. This is an optional call - it's used by
+ // streaming clients that need the server to receive the io.EOF terminator.
+ CloseSend() error
+
+ // 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 JudgeAction, err error)
+
+ // Finish closes the stream and returns the positional return values for
+ // call.
+ Finish() (reply PlayResult, err error)
+
+ // Cancel cancels the RPC, notifying the server to stop processing.
+ Cancel()
+}
+
+// Implementation of the JudgePlayStream interface that is not exported.
+type implJudgePlayStream struct {
+ clientCall _gen_ipc.ClientCall
+}
+
+func (c *implJudgePlayStream) Send(item PlayerAction) error {
+ return c.clientCall.Send(item)
+}
+
+func (c *implJudgePlayStream) CloseSend() error {
+ return c.clientCall.CloseSend()
+}
+
+func (c *implJudgePlayStream) Recv() (item JudgeAction, err error) {
+ err = c.clientCall.Recv(&item)
+ return
+}
+
+func (c *implJudgePlayStream) Finish() (reply PlayResult, err error) {
+ if ierr := c.clientCall.Finish(&reply, &err); ierr != nil {
+ err = ierr
+ }
+ return
+}
+
+func (c *implJudgePlayStream) Cancel() {
+ c.clientCall.Cancel()
+}
+
+// JudgeServicePlayStream is the interface for streaming responses of the method
+// Play in the service interface Judge.
+type JudgeServicePlayStream interface {
+ // Send places the item onto the output stream, blocking if there is no buffer
+ // space available.
+ Send(item JudgeAction) 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.
+ Recv() (item PlayerAction, err error)
+}
+
+// Implementation of the JudgeServicePlayStream interface that is not exported.
+type implJudgeServicePlayStream struct {
+ serverCall _gen_ipc.ServerCall
+}
+
+func (s *implJudgeServicePlayStream) Send(item JudgeAction) error {
+ return s.serverCall.Send(item)
+}
+
+func (s *implJudgeServicePlayStream) Recv() (item PlayerAction, err error) {
+ err = s.serverCall.Recv(&item)
+ return
+}
+
+// BindJudge returns the client stub implementing the Judge
+// interface.
+//
+// If no _gen_ipc.Client is specified, the default _gen_ipc.Client in the
+// global Runtime is used.
+func BindJudge(name string, opts ..._gen_ipc.BindOpt) (Judge, error) {
+ var client _gen_ipc.Client
+ switch len(opts) {
+ case 0:
+ client = _gen_rt.R().Client()
+ case 1:
+ switch o := opts[0].(type) {
+ case _gen_veyron2.Runtime:
+ client = o.Client()
+ case _gen_ipc.Client:
+ client = o
+ default:
+ return nil, _gen_vdl.ErrUnrecognizedOption
+ }
+ default:
+ return nil, _gen_vdl.ErrTooManyOptionsToBind
+ }
+ stub := &clientStubJudge{client: client, name: name}
+
+ return stub, nil
+}
+
+// NewServerJudge creates a new server stub.
+//
+// It takes a regular server implementing the JudgeService
+// interface, and returns a new server stub.
+func NewServerJudge(server JudgeService) interface{} {
+ return &ServerStubJudge{
+ service: server,
+ }
+}
+
+// clientStubJudge implements Judge.
+type clientStubJudge struct {
+ client _gen_ipc.Client
+ name string
+}
+
+func (c *clientStubJudge) GetMethodTags(method string) []interface{} {
+ return GetJudgeMethodTags(method)
+}
+
+func (__gen_c *clientStubJudge) CreateGame(Opts GameOptions, opts ..._gen_ipc.ClientCallOpt) (reply GameID, err error) {
+ var call _gen_ipc.ClientCall
+ if call, err = __gen_c.client.StartCall(__gen_c.name, "CreateGame", []interface{}{Opts}, opts...); err != nil {
+ return
+ }
+ if ierr := call.Finish(&reply, &err); ierr != nil {
+ err = ierr
+ }
+ return
+}
+
+func (__gen_c *clientStubJudge) Play(ID GameID, opts ..._gen_ipc.ClientCallOpt) (reply JudgePlayStream, err error) {
+ var call _gen_ipc.ClientCall
+ if call, err = __gen_c.client.StartCall(__gen_c.name, "Play", []interface{}{ID}, opts...); err != nil {
+ return
+ }
+ reply = &implJudgePlayStream{clientCall: call}
+ return
+}
+
+func (c *clientStubJudge) UnresolveStep(opts ..._gen_ipc.ClientCallOpt) (reply []string, err error) {
+ var call _gen_ipc.ClientCall
+ if call, err = c.client.StartCall(c.name, "UnresolveStep", nil, opts...); err != nil {
+ return
+ }
+ if ierr := call.Finish(&reply, &err); ierr != nil {
+ err = ierr
+ }
+ return
+}
+
+// ServerStubJudge wraps a server that implements
+// JudgeService and provides an object that satisfies
+// the requirements of veyron2/ipc.ReflectInvoker.
+type ServerStubJudge struct {
+ service JudgeService
+}
+
+func (s *ServerStubJudge) GetMethodTags(method string) []interface{} {
+ return GetJudgeMethodTags(method)
+}
+
+func (s *ServerStubJudge) Signature(call _gen_ipc.ServerCall) (_gen_ipc.ServiceSignature, error) {
+ result := _gen_ipc.ServiceSignature{Methods: make(map[string]_gen_ipc.MethodSignature)}
+ result.Methods["CreateGame"] = _gen_ipc.MethodSignature{
+ InArgs: []_gen_ipc.MethodArgument{
+ {Name: "Opts", Type: 66},
+ },
+ OutArgs: []_gen_ipc.MethodArgument{
+ {Name: "", Type: 67},
+ {Name: "", Type: 68},
+ },
+ }
+ result.Methods["Play"] = _gen_ipc.MethodSignature{
+ InArgs: []_gen_ipc.MethodArgument{
+ {Name: "ID", Type: 67},
+ },
+ OutArgs: []_gen_ipc.MethodArgument{
+ {Name: "", Type: 69},
+ {Name: "", Type: 68},
+ },
+ InStream: 70,
+ OutStream: 76,
+ }
+
+ result.TypeDefs = []_gen_vdl.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"},
+ _gen_wiretype.FieldType{Type: 0x41, Name: "GameType"},
+ },
+ "veyron/examples/rockpaperscissors.GameOptions", []string(nil)},
+ _gen_wiretype.StructType{
+ []_gen_wiretype.FieldType{
+ _gen_wiretype.FieldType{Type: 0x3, Name: "ID"},
+ },
+ "veyron/examples/rockpaperscissors.GameID", []string(nil)},
+ _gen_wiretype.NamedPrimitiveType{Type: 0x1, Name: "error", Tags: []string(nil)}, _gen_wiretype.StructType{
+ []_gen_wiretype.FieldType{
+ _gen_wiretype.FieldType{Type: 0x2, Name: "YouWon"},
+ },
+ "veyron/examples/rockpaperscissors.PlayResult", []string(nil)},
+ _gen_wiretype.StructType{
+ []_gen_wiretype.FieldType{
+ _gen_wiretype.FieldType{Type: 0x3, Name: "Move"},
+ _gen_wiretype.FieldType{Type: 0x2, Name: "Quit"},
+ },
+ "veyron/examples/rockpaperscissors.PlayerAction", []string(nil)},
+ _gen_wiretype.ArrayType{Elem: 0x3, Len: 0x2, Name: "", Tags: []string(nil)}, _gen_wiretype.NamedPrimitiveType{Type: 0x32, Name: "veyron/examples/rockpaperscissors.WinnerTag", Tags: []string(nil)}, _gen_wiretype.StructType{
+ []_gen_wiretype.FieldType{
+ _gen_wiretype.FieldType{Type: 0x47, Name: "Moves"},
+ _gen_wiretype.FieldType{Type: 0x48, Name: "Winner"},
+ _gen_wiretype.FieldType{Type: 0x25, Name: "StartTimeNS"},
+ _gen_wiretype.FieldType{Type: 0x25, Name: "EndTimeNS"},
+ },
+ "veyron/examples/rockpaperscissors.Round", []string(nil)},
+ _gen_wiretype.SliceType{Elem: 0x49, Name: "", Tags: []string(nil)}, _gen_wiretype.StructType{
+ []_gen_wiretype.FieldType{
+ _gen_wiretype.FieldType{Type: 0x42, Name: "Opts"},
+ _gen_wiretype.FieldType{Type: 0x3, Name: "Judge"},
+ _gen_wiretype.FieldType{Type: 0x3d, Name: "Players"},
+ _gen_wiretype.FieldType{Type: 0x4a, Name: "Rounds"},
+ _gen_wiretype.FieldType{Type: 0x25, Name: "StartTimeNS"},
+ _gen_wiretype.FieldType{Type: 0x25, Name: "EndTimeNS"},
+ _gen_wiretype.FieldType{Type: 0x48, Name: "Winner"},
+ },
+ "veyron/examples/rockpaperscissors.ScoreCard", []string(nil)},
+ _gen_wiretype.StructType{
+ []_gen_wiretype.FieldType{
+ _gen_wiretype.FieldType{Type: 0x24, Name: "PlayerNum"},
+ _gen_wiretype.FieldType{Type: 0x3, Name: "OpponentName"},
+ _gen_wiretype.FieldType{Type: 0x3d, Name: "MoveOptions"},
+ _gen_wiretype.FieldType{Type: 0x49, Name: "RoundResult"},
+ _gen_wiretype.FieldType{Type: 0x4b, Name: "Score"},
+ },
+ "veyron/examples/rockpaperscissors.JudgeAction", []string(nil)},
+ }
+
+ return result, nil
+}
+
+func (s *ServerStubJudge) UnresolveStep(call _gen_ipc.ServerCall) (reply []string, err error) {
+ if unresolver, ok := s.service.(_gen_ipc.Unresolver); ok {
+ return unresolver.UnresolveStep(call)
+ }
+ if call.Server() == nil {
+ return
+ }
+ var published []string
+ if published, err = call.Server().Published(); err != nil || published == nil {
+ return
+ }
+ reply = make([]string, len(published))
+ for i, p := range published {
+ reply[i] = _gen_naming.Join(p, call.Name())
+ }
+ return
+}
+
+func (__gen_s *ServerStubJudge) CreateGame(call _gen_ipc.ServerCall, Opts GameOptions) (reply GameID, err error) {
+ reply, err = __gen_s.service.CreateGame(call, Opts)
+ return
+}
+
+func (__gen_s *ServerStubJudge) Play(call _gen_ipc.ServerCall, ID GameID) (reply PlayResult, err error) {
+ stream := &implJudgeServicePlayStream{serverCall: call}
+ reply, err = __gen_s.service.Play(call, ID, stream)
+ return
+}
+
+func GetJudgeMethodTags(method string) []interface{} {
+ switch method {
+ case "CreateGame":
+ return []interface{}{}
+ case "Play":
+ return []interface{}{}
+ default:
+ return nil
+ }
+}
+
+// Player can receive challenges from other players.
+// Player is the interface the client binds and uses.
+// Player_InternalNoTagGetter is the interface without the TagGetter
+// and UnresolveStep methods (both framework-added, rathern than user-defined),
+// to enable embedding without method collisions. Not to be used directly by
+// clients.
+type Player_InternalNoTagGetter interface {
+
+ // Challenge is used by other players to challenge this player to a game. If
+ // the challenge is accepted, the method returns true.
+ Challenge(Address string, ID GameID, opts ..._gen_ipc.ClientCallOpt) (reply bool, err error)
+}
+type Player interface {
+ _gen_vdl.TagGetter
+ // UnresolveStep returns the names for the remote service, rooted at the
+ // service's immediate namespace ancestor.
+ UnresolveStep(opts ..._gen_ipc.ClientCallOpt) ([]string, error)
+ Player_InternalNoTagGetter
+}
+
+// PlayerService is the interface the server implements.
+type PlayerService interface {
+
+ // Challenge is used by other players to challenge this player to a game. If
+ // the challenge is accepted, the method returns true.
+ Challenge(context _gen_ipc.Context, Address string, ID GameID) (reply bool, err error)
+}
+
+// BindPlayer returns the client stub implementing the Player
+// interface.
+//
+// If no _gen_ipc.Client is specified, the default _gen_ipc.Client in the
+// global Runtime is used.
+func BindPlayer(name string, opts ..._gen_ipc.BindOpt) (Player, error) {
+ var client _gen_ipc.Client
+ switch len(opts) {
+ case 0:
+ client = _gen_rt.R().Client()
+ case 1:
+ switch o := opts[0].(type) {
+ case _gen_veyron2.Runtime:
+ client = o.Client()
+ case _gen_ipc.Client:
+ client = o
+ default:
+ return nil, _gen_vdl.ErrUnrecognizedOption
+ }
+ default:
+ return nil, _gen_vdl.ErrTooManyOptionsToBind
+ }
+ stub := &clientStubPlayer{client: client, name: name}
+
+ return stub, nil
+}
+
+// NewServerPlayer creates a new server stub.
+//
+// It takes a regular server implementing the PlayerService
+// interface, and returns a new server stub.
+func NewServerPlayer(server PlayerService) interface{} {
+ return &ServerStubPlayer{
+ service: server,
+ }
+}
+
+// clientStubPlayer implements Player.
+type clientStubPlayer struct {
+ client _gen_ipc.Client
+ name string
+}
+
+func (c *clientStubPlayer) GetMethodTags(method string) []interface{} {
+ return GetPlayerMethodTags(method)
+}
+
+func (__gen_c *clientStubPlayer) Challenge(Address string, ID GameID, opts ..._gen_ipc.ClientCallOpt) (reply bool, err error) {
+ var call _gen_ipc.ClientCall
+ if call, err = __gen_c.client.StartCall(__gen_c.name, "Challenge", []interface{}{Address, ID}, opts...); err != nil {
+ return
+ }
+ if ierr := call.Finish(&reply, &err); ierr != nil {
+ err = ierr
+ }
+ return
+}
+
+func (c *clientStubPlayer) UnresolveStep(opts ..._gen_ipc.ClientCallOpt) (reply []string, err error) {
+ var call _gen_ipc.ClientCall
+ if call, err = c.client.StartCall(c.name, "UnresolveStep", nil, opts...); err != nil {
+ return
+ }
+ if ierr := call.Finish(&reply, &err); ierr != nil {
+ err = ierr
+ }
+ return
+}
+
+// ServerStubPlayer wraps a server that implements
+// PlayerService and provides an object that satisfies
+// the requirements of veyron2/ipc.ReflectInvoker.
+type ServerStubPlayer struct {
+ service PlayerService
+}
+
+func (s *ServerStubPlayer) GetMethodTags(method string) []interface{} {
+ return GetPlayerMethodTags(method)
+}
+
+func (s *ServerStubPlayer) Signature(call _gen_ipc.ServerCall) (_gen_ipc.ServiceSignature, error) {
+ result := _gen_ipc.ServiceSignature{Methods: make(map[string]_gen_ipc.MethodSignature)}
+ result.Methods["Challenge"] = _gen_ipc.MethodSignature{
+ InArgs: []_gen_ipc.MethodArgument{
+ {Name: "Address", Type: 3},
+ {Name: "ID", Type: 65},
+ },
+ OutArgs: []_gen_ipc.MethodArgument{
+ {Name: "", Type: 2},
+ {Name: "", Type: 66},
+ },
+ }
+
+ result.TypeDefs = []_gen_vdl.Any{
+ _gen_wiretype.StructType{
+ []_gen_wiretype.FieldType{
+ _gen_wiretype.FieldType{Type: 0x3, Name: "ID"},
+ },
+ "veyron/examples/rockpaperscissors.GameID", []string(nil)},
+ _gen_wiretype.NamedPrimitiveType{Type: 0x1, Name: "error", Tags: []string(nil)}}
+
+ return result, nil
+}
+
+func (s *ServerStubPlayer) UnresolveStep(call _gen_ipc.ServerCall) (reply []string, err error) {
+ if unresolver, ok := s.service.(_gen_ipc.Unresolver); ok {
+ return unresolver.UnresolveStep(call)
+ }
+ if call.Server() == nil {
+ return
+ }
+ var published []string
+ if published, err = call.Server().Published(); err != nil || published == nil {
+ return
+ }
+ reply = make([]string, len(published))
+ for i, p := range published {
+ reply[i] = _gen_naming.Join(p, call.Name())
+ }
+ return
+}
+
+func (__gen_s *ServerStubPlayer) Challenge(call _gen_ipc.ServerCall, Address string, ID GameID) (reply bool, err error) {
+ reply, err = __gen_s.service.Challenge(call, Address, ID)
+ return
+}
+
+func GetPlayerMethodTags(method string) []interface{} {
+ switch method {
+ case "Challenge":
+ return []interface{}{}
+ default:
+ return nil
+ }
+}
+
+// ScoreKeeper receives the outcome of games from Judges.
+// ScoreKeeper is the interface the client binds and uses.
+// ScoreKeeper_InternalNoTagGetter is the interface without the TagGetter
+// and UnresolveStep methods (both framework-added, rathern than user-defined),
+// to enable embedding without method collisions. Not to be used directly by
+// clients.
+type ScoreKeeper_InternalNoTagGetter interface {
+ Record(Score ScoreCard, opts ..._gen_ipc.ClientCallOpt) (err error)
+}
+type ScoreKeeper interface {
+ _gen_vdl.TagGetter
+ // UnresolveStep returns the names for the remote service, rooted at the
+ // service's immediate namespace ancestor.
+ UnresolveStep(opts ..._gen_ipc.ClientCallOpt) ([]string, error)
+ ScoreKeeper_InternalNoTagGetter
+}
+
+// ScoreKeeperService is the interface the server implements.
+type ScoreKeeperService interface {
+ Record(context _gen_ipc.Context, Score ScoreCard) (err error)
+}
+
+// BindScoreKeeper returns the client stub implementing the ScoreKeeper
+// interface.
+//
+// If no _gen_ipc.Client is specified, the default _gen_ipc.Client in the
+// global Runtime is used.
+func BindScoreKeeper(name string, opts ..._gen_ipc.BindOpt) (ScoreKeeper, error) {
+ var client _gen_ipc.Client
+ switch len(opts) {
+ case 0:
+ client = _gen_rt.R().Client()
+ case 1:
+ switch o := opts[0].(type) {
+ case _gen_veyron2.Runtime:
+ client = o.Client()
+ case _gen_ipc.Client:
+ client = o
+ default:
+ return nil, _gen_vdl.ErrUnrecognizedOption
+ }
+ default:
+ return nil, _gen_vdl.ErrTooManyOptionsToBind
+ }
+ stub := &clientStubScoreKeeper{client: client, name: name}
+
+ return stub, nil
+}
+
+// NewServerScoreKeeper creates a new server stub.
+//
+// It takes a regular server implementing the ScoreKeeperService
+// interface, and returns a new server stub.
+func NewServerScoreKeeper(server ScoreKeeperService) interface{} {
+ return &ServerStubScoreKeeper{
+ service: server,
+ }
+}
+
+// clientStubScoreKeeper implements ScoreKeeper.
+type clientStubScoreKeeper struct {
+ client _gen_ipc.Client
+ name string
+}
+
+func (c *clientStubScoreKeeper) GetMethodTags(method string) []interface{} {
+ return GetScoreKeeperMethodTags(method)
+}
+
+func (__gen_c *clientStubScoreKeeper) Record(Score ScoreCard, opts ..._gen_ipc.ClientCallOpt) (err error) {
+ var call _gen_ipc.ClientCall
+ if call, err = __gen_c.client.StartCall(__gen_c.name, "Record", []interface{}{Score}, opts...); err != nil {
+ return
+ }
+ if ierr := call.Finish(&err); ierr != nil {
+ err = ierr
+ }
+ return
+}
+
+func (c *clientStubScoreKeeper) UnresolveStep(opts ..._gen_ipc.ClientCallOpt) (reply []string, err error) {
+ var call _gen_ipc.ClientCall
+ if call, err = c.client.StartCall(c.name, "UnresolveStep", nil, opts...); err != nil {
+ return
+ }
+ if ierr := call.Finish(&reply, &err); ierr != nil {
+ err = ierr
+ }
+ return
+}
+
+// ServerStubScoreKeeper wraps a server that implements
+// ScoreKeeperService and provides an object that satisfies
+// the requirements of veyron2/ipc.ReflectInvoker.
+type ServerStubScoreKeeper struct {
+ service ScoreKeeperService
+}
+
+func (s *ServerStubScoreKeeper) GetMethodTags(method string) []interface{} {
+ return GetScoreKeeperMethodTags(method)
+}
+
+func (s *ServerStubScoreKeeper) Signature(call _gen_ipc.ServerCall) (_gen_ipc.ServiceSignature, error) {
+ result := _gen_ipc.ServiceSignature{Methods: make(map[string]_gen_ipc.MethodSignature)}
+ result.Methods["Record"] = _gen_ipc.MethodSignature{
+ InArgs: []_gen_ipc.MethodArgument{
+ {Name: "Score", Type: 71},
+ },
+ OutArgs: []_gen_ipc.MethodArgument{
+ {Name: "", Type: 72},
+ },
+ }
+
+ result.TypeDefs = []_gen_vdl.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"},
+ _gen_wiretype.FieldType{Type: 0x41, Name: "GameType"},
+ },
+ "veyron/examples/rockpaperscissors.GameOptions", []string(nil)},
+ _gen_wiretype.ArrayType{Elem: 0x3, Len: 0x2, Name: "", Tags: []string(nil)}, _gen_wiretype.NamedPrimitiveType{Type: 0x32, Name: "veyron/examples/rockpaperscissors.WinnerTag", Tags: []string(nil)}, _gen_wiretype.StructType{
+ []_gen_wiretype.FieldType{
+ _gen_wiretype.FieldType{Type: 0x43, Name: "Moves"},
+ _gen_wiretype.FieldType{Type: 0x44, Name: "Winner"},
+ _gen_wiretype.FieldType{Type: 0x25, Name: "StartTimeNS"},
+ _gen_wiretype.FieldType{Type: 0x25, Name: "EndTimeNS"},
+ },
+ "veyron/examples/rockpaperscissors.Round", []string(nil)},
+ _gen_wiretype.SliceType{Elem: 0x45, Name: "", Tags: []string(nil)}, _gen_wiretype.StructType{
+ []_gen_wiretype.FieldType{
+ _gen_wiretype.FieldType{Type: 0x42, Name: "Opts"},
+ _gen_wiretype.FieldType{Type: 0x3, Name: "Judge"},
+ _gen_wiretype.FieldType{Type: 0x3d, Name: "Players"},
+ _gen_wiretype.FieldType{Type: 0x46, Name: "Rounds"},
+ _gen_wiretype.FieldType{Type: 0x25, Name: "StartTimeNS"},
+ _gen_wiretype.FieldType{Type: 0x25, Name: "EndTimeNS"},
+ _gen_wiretype.FieldType{Type: 0x44, Name: "Winner"},
+ },
+ "veyron/examples/rockpaperscissors.ScoreCard", []string(nil)},
+ _gen_wiretype.NamedPrimitiveType{Type: 0x1, Name: "error", Tags: []string(nil)}}
+
+ return result, nil
+}
+
+func (s *ServerStubScoreKeeper) UnresolveStep(call _gen_ipc.ServerCall) (reply []string, err error) {
+ if unresolver, ok := s.service.(_gen_ipc.Unresolver); ok {
+ return unresolver.UnresolveStep(call)
+ }
+ if call.Server() == nil {
+ return
+ }
+ var published []string
+ if published, err = call.Server().Published(); err != nil || published == nil {
+ return
+ }
+ reply = make([]string, len(published))
+ for i, p := range published {
+ reply[i] = _gen_naming.Join(p, call.Name())
+ }
+ return
+}
+
+func (__gen_s *ServerStubScoreKeeper) Record(call _gen_ipc.ServerCall, Score ScoreCard) (err error) {
+ err = __gen_s.service.Record(call, Score)
+ return
+}
+
+func GetScoreKeeperMethodTags(method string) []interface{} {
+ switch method {
+ case "Record":
+ return []interface{}{}
+ default:
+ return nil
+ }
+}
+
// RockPaperScissors is the interface the client binds and uses.
// RockPaperScissors_InternalNoTagGetter is the interface without the TagGetter
// and UnresolveStep methods (both framework-added, rathern than user-defined),
@@ -81,13 +745,13 @@
// clients.
type RockPaperScissors_InternalNoTagGetter interface {
Judge_InternalNoTagGetter
-
+ // Player can receive challenges from other players.
Player_InternalNoTagGetter
-
+ // ScoreKeeper receives the outcome of games from Judges.
ScoreKeeper_InternalNoTagGetter
}
type RockPaperScissors interface {
- _gen_idl.TagGetter
+ _gen_vdl.TagGetter
// UnresolveStep returns the names for the remote service, rooted at the
// service's immediate namespace ancestor.
UnresolveStep(opts ..._gen_ipc.ClientCallOpt) ([]string, error)
@@ -97,9 +761,9 @@
// RockPaperScissorsService is the interface the server implements.
type RockPaperScissorsService interface {
JudgeService
-
+ // Player can receive challenges from other players.
PlayerService
-
+ // ScoreKeeper receives the outcome of games from Judges.
ScoreKeeperService
}
@@ -120,10 +784,10 @@
case _gen_ipc.Client:
client = o
default:
- return nil, _gen_idl.ErrUnrecognizedOption
+ return nil, _gen_vdl.ErrUnrecognizedOption
}
default:
- return nil, _gen_idl.ErrTooManyOptionsToBind
+ return nil, _gen_vdl.ErrTooManyOptionsToBind
}
stub := &clientStubRockPaperScissors{client: client, name: name}
stub.Judge_InternalNoTagGetter, _ = BindJudge(name, client)
@@ -189,7 +853,7 @@
func (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_idl.AnyData{}
+ result.TypeDefs = []_gen_vdl.Any{}
var ss _gen_ipc.ServiceSignature
var firstAdded int
ss, _ = s.ServerStubJudge.Signature(call)
@@ -382,665 +1046,3 @@
}
return nil
}
-
-// Judge is the interface the client binds and uses.
-// Judge_InternalNoTagGetter is the interface without the TagGetter
-// and UnresolveStep methods (both framework-added, rathern than user-defined),
-// to enable embedding without method collisions. Not to be used directly by
-// clients.
-type Judge_InternalNoTagGetter interface {
-
- // CreateGame creates a new game with the given game options and returns a game
- // identifier that can be used by the players to join the game.
- CreateGame(Opts GameOptions, opts ..._gen_ipc.ClientCallOpt) (reply GameID, err error)
-
- // Play lets a player join an existing game and play.
- Play(ID GameID, opts ..._gen_ipc.ClientCallOpt) (reply JudgePlayStream, err error)
-}
-type Judge interface {
- _gen_idl.TagGetter
- // UnresolveStep returns the names for the remote service, rooted at the
- // service's immediate namespace ancestor.
- UnresolveStep(opts ..._gen_ipc.ClientCallOpt) ([]string, error)
- Judge_InternalNoTagGetter
-}
-
-// JudgeService is the interface the server implements.
-type JudgeService interface {
-
- // CreateGame creates a new game with the given game options and returns a game
- // identifier that can be used by the players to join the game.
- CreateGame(context _gen_ipc.Context, Opts GameOptions) (reply GameID, err error)
-
- // Play lets a player join an existing game and play.
- Play(context _gen_ipc.Context, ID GameID, stream JudgeServicePlayStream) (reply PlayResult, err error)
-}
-
-// JudgePlayStream is the interface for streaming responses of the method
-// Play in the service interface Judge.
-type JudgePlayStream interface {
-
- // Send places the item onto the output stream, blocking if there is no buffer
- // space available.
- Send(item PlayerAction) error
-
- // CloseSend indicates to the server that no more items will be sent; server
- // Recv calls will receive io.EOF after all sent items. Subsequent calls to
- // Send on the client will fail. This is an optional call - it's used by
- // streaming clients that need the server to receive the io.EOF terminator.
- CloseSend() error
-
- // 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 JudgeAction, err error)
-
- // Finish closes the stream and returns the positional return values for
- // call.
- Finish() (reply PlayResult, err error)
-
- // Cancel cancels the RPC, notifying the server to stop processing.
- Cancel()
-}
-
-// Implementation of the JudgePlayStream interface that is not exported.
-type implJudgePlayStream struct {
- clientCall _gen_ipc.ClientCall
-}
-
-func (c *implJudgePlayStream) Send(item PlayerAction) error {
- return c.clientCall.Send(item)
-}
-
-func (c *implJudgePlayStream) CloseSend() error {
- return c.clientCall.CloseSend()
-}
-
-func (c *implJudgePlayStream) Recv() (item JudgeAction, err error) {
- err = c.clientCall.Recv(&item)
- return
-}
-
-func (c *implJudgePlayStream) Finish() (reply PlayResult, err error) {
- if ierr := c.clientCall.Finish(&reply, &err); ierr != nil {
- err = ierr
- }
- return
-}
-
-func (c *implJudgePlayStream) Cancel() {
- c.clientCall.Cancel()
-}
-
-// JudgeServicePlayStream is the interface for streaming responses of the method
-// Play in the service interface Judge.
-type JudgeServicePlayStream interface {
- // Send places the item onto the output stream, blocking if there is no buffer
- // space available.
- Send(item JudgeAction) 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.
- Recv() (item PlayerAction, err error)
-}
-
-// Implementation of the JudgeServicePlayStream interface that is not exported.
-type implJudgeServicePlayStream struct {
- serverCall _gen_ipc.ServerCall
-}
-
-func (s *implJudgeServicePlayStream) Send(item JudgeAction) error {
- return s.serverCall.Send(item)
-}
-
-func (s *implJudgeServicePlayStream) Recv() (item PlayerAction, err error) {
- err = s.serverCall.Recv(&item)
- return
-}
-
-// BindJudge returns the client stub implementing the Judge
-// interface.
-//
-// If no _gen_ipc.Client is specified, the default _gen_ipc.Client in the
-// global Runtime is used.
-func BindJudge(name string, opts ..._gen_ipc.BindOpt) (Judge, error) {
- var client _gen_ipc.Client
- switch len(opts) {
- case 0:
- client = _gen_rt.R().Client()
- case 1:
- switch o := opts[0].(type) {
- case _gen_veyron2.Runtime:
- client = o.Client()
- case _gen_ipc.Client:
- client = o
- default:
- return nil, _gen_idl.ErrUnrecognizedOption
- }
- default:
- return nil, _gen_idl.ErrTooManyOptionsToBind
- }
- stub := &clientStubJudge{client: client, name: name}
-
- return stub, nil
-}
-
-// NewServerJudge creates a new server stub.
-//
-// It takes a regular server implementing the JudgeService
-// interface, and returns a new server stub.
-func NewServerJudge(server JudgeService) interface{} {
- return &ServerStubJudge{
- service: server,
- }
-}
-
-// clientStubJudge implements Judge.
-type clientStubJudge struct {
- client _gen_ipc.Client
- name string
-}
-
-func (c *clientStubJudge) GetMethodTags(method string) []interface{} {
- return GetJudgeMethodTags(method)
-}
-
-func (__gen_c *clientStubJudge) CreateGame(Opts GameOptions, opts ..._gen_ipc.ClientCallOpt) (reply GameID, err error) {
- var call _gen_ipc.ClientCall
- if call, err = __gen_c.client.StartCall(__gen_c.name, "CreateGame", []interface{}{Opts}, opts...); err != nil {
- return
- }
- if ierr := call.Finish(&reply, &err); ierr != nil {
- err = ierr
- }
- return
-}
-
-func (__gen_c *clientStubJudge) Play(ID GameID, opts ..._gen_ipc.ClientCallOpt) (reply JudgePlayStream, err error) {
- var call _gen_ipc.ClientCall
- if call, err = __gen_c.client.StartCall(__gen_c.name, "Play", []interface{}{ID}, opts...); err != nil {
- return
- }
- reply = &implJudgePlayStream{clientCall: call}
- return
-}
-
-func (c *clientStubJudge) UnresolveStep(opts ..._gen_ipc.ClientCallOpt) (reply []string, err error) {
- var call _gen_ipc.ClientCall
- if call, err = c.client.StartCall(c.name, "UnresolveStep", nil, opts...); err != nil {
- return
- }
- if ierr := call.Finish(&reply, &err); ierr != nil {
- err = ierr
- }
- return
-}
-
-// ServerStubJudge wraps a server that implements
-// JudgeService and provides an object that satisfies
-// the requirements of veyron2/ipc.ReflectInvoker.
-type ServerStubJudge struct {
- service JudgeService
-}
-
-func (s *ServerStubJudge) GetMethodTags(method string) []interface{} {
- return GetJudgeMethodTags(method)
-}
-
-func (s *ServerStubJudge) Signature(call _gen_ipc.ServerCall) (_gen_ipc.ServiceSignature, error) {
- result := _gen_ipc.ServiceSignature{Methods: make(map[string]_gen_ipc.MethodSignature)}
- result.Methods["CreateGame"] = _gen_ipc.MethodSignature{
- InArgs: []_gen_ipc.MethodArgument{
- {Name: "Opts", Type: 66},
- },
- OutArgs: []_gen_ipc.MethodArgument{
- {Name: "", Type: 67},
- {Name: "", Type: 68},
- },
- }
- result.Methods["Play"] = _gen_ipc.MethodSignature{
- InArgs: []_gen_ipc.MethodArgument{
- {Name: "ID", Type: 67},
- },
- OutArgs: []_gen_ipc.MethodArgument{
- {Name: "", Type: 69},
- {Name: "", Type: 68},
- },
- InStream: 70,
- OutStream: 76,
- }
-
- result.TypeDefs = []_gen_idl.AnyData{
- _gen_wiretype.NamedPrimitiveType{Type: 0x32, Name: "GameTypeTag", Tags: []string(nil)}, _gen_wiretype.StructType{
- []_gen_wiretype.FieldType{
- _gen_wiretype.FieldType{Type: 0x24, Name: "NumRounds"},
- _gen_wiretype.FieldType{Type: 0x41, Name: "GameType"},
- },
- "GameOptions", []string(nil)},
- _gen_wiretype.StructType{
- []_gen_wiretype.FieldType{
- _gen_wiretype.FieldType{Type: 0x3, Name: "ID"},
- },
- "GameID", []string(nil)},
- _gen_wiretype.NamedPrimitiveType{Type: 0x1, Name: "error", Tags: []string(nil)}, _gen_wiretype.StructType{
- []_gen_wiretype.FieldType{
- _gen_wiretype.FieldType{Type: 0x2, Name: "YouWon"},
- },
- "PlayResult", []string(nil)},
- _gen_wiretype.StructType{
- []_gen_wiretype.FieldType{
- _gen_wiretype.FieldType{Type: 0x3, Name: "Move"},
- _gen_wiretype.FieldType{Type: 0x2, Name: "Quit"},
- },
- "PlayerAction", []string(nil)},
- _gen_wiretype.ArrayType{Elem: 0x3, Len: 0x2, Name: "", Tags: []string(nil)}, _gen_wiretype.NamedPrimitiveType{Type: 0x32, Name: "WinnerTag", Tags: []string(nil)}, _gen_wiretype.StructType{
- []_gen_wiretype.FieldType{
- _gen_wiretype.FieldType{Type: 0x47, Name: "Moves"},
- _gen_wiretype.FieldType{Type: 0x48, Name: "Winner"},
- _gen_wiretype.FieldType{Type: 0x25, Name: "StartTimeNS"},
- _gen_wiretype.FieldType{Type: 0x25, Name: "EndTimeNS"},
- },
- "Round", []string(nil)},
- _gen_wiretype.SliceType{Elem: 0x49, Name: "", Tags: []string(nil)}, _gen_wiretype.StructType{
- []_gen_wiretype.FieldType{
- _gen_wiretype.FieldType{Type: 0x42, Name: "Opts"},
- _gen_wiretype.FieldType{Type: 0x3, Name: "Judge"},
- _gen_wiretype.FieldType{Type: 0x3d, Name: "Players"},
- _gen_wiretype.FieldType{Type: 0x4a, Name: "Rounds"},
- _gen_wiretype.FieldType{Type: 0x25, Name: "StartTimeNS"},
- _gen_wiretype.FieldType{Type: 0x25, Name: "EndTimeNS"},
- _gen_wiretype.FieldType{Type: 0x48, Name: "Winner"},
- },
- "ScoreCard", []string(nil)},
- _gen_wiretype.StructType{
- []_gen_wiretype.FieldType{
- _gen_wiretype.FieldType{Type: 0x24, Name: "PlayerNum"},
- _gen_wiretype.FieldType{Type: 0x3, Name: "OpponentName"},
- _gen_wiretype.FieldType{Type: 0x3d, Name: "MoveOptions"},
- _gen_wiretype.FieldType{Type: 0x49, Name: "RoundResult"},
- _gen_wiretype.FieldType{Type: 0x4b, Name: "Score"},
- },
- "JudgeAction", []string(nil)},
- }
-
- return result, nil
-}
-
-func (s *ServerStubJudge) UnresolveStep(call _gen_ipc.ServerCall) (reply []string, err error) {
- if unresolver, ok := s.service.(_gen_ipc.Unresolver); ok {
- return unresolver.UnresolveStep(call)
- }
- if call.Server() == nil {
- return
- }
- var published []string
- if published, err = call.Server().Published(); err != nil || published == nil {
- return
- }
- reply = make([]string, len(published))
- for i, p := range published {
- reply[i] = _gen_naming.Join(p, call.Name())
- }
- return
-}
-
-func (__gen_s *ServerStubJudge) CreateGame(call _gen_ipc.ServerCall, Opts GameOptions) (reply GameID, err error) {
- reply, err = __gen_s.service.CreateGame(call, Opts)
- return
-}
-
-func (__gen_s *ServerStubJudge) Play(call _gen_ipc.ServerCall, ID GameID) (reply PlayResult, err error) {
- stream := &implJudgeServicePlayStream{serverCall: call}
- reply, err = __gen_s.service.Play(call, ID, stream)
- return
-}
-
-func GetJudgeMethodTags(method string) []interface{} {
- switch method {
- case "CreateGame":
- return []interface{}{}
- case "Play":
- return []interface{}{}
- default:
- return nil
- }
-}
-
-// Player can receive challenges from other players.
-// Player is the interface the client binds and uses.
-// Player_InternalNoTagGetter is the interface without the TagGetter
-// and UnresolveStep methods (both framework-added, rathern than user-defined),
-// to enable embedding without method collisions. Not to be used directly by
-// clients.
-type Player_InternalNoTagGetter interface {
-
- // Challenge is used by other players to challenge this player to a game. If
- // the challenge is accepted, the method returns true.
- Challenge(Address string, ID GameID, opts ..._gen_ipc.ClientCallOpt) (reply bool, err error)
-}
-type Player interface {
- _gen_idl.TagGetter
- // UnresolveStep returns the names for the remote service, rooted at the
- // service's immediate namespace ancestor.
- UnresolveStep(opts ..._gen_ipc.ClientCallOpt) ([]string, error)
- Player_InternalNoTagGetter
-}
-
-// PlayerService is the interface the server implements.
-type PlayerService interface {
-
- // Challenge is used by other players to challenge this player to a game. If
- // the challenge is accepted, the method returns true.
- Challenge(context _gen_ipc.Context, Address string, ID GameID) (reply bool, err error)
-}
-
-// BindPlayer returns the client stub implementing the Player
-// interface.
-//
-// If no _gen_ipc.Client is specified, the default _gen_ipc.Client in the
-// global Runtime is used.
-func BindPlayer(name string, opts ..._gen_ipc.BindOpt) (Player, error) {
- var client _gen_ipc.Client
- switch len(opts) {
- case 0:
- client = _gen_rt.R().Client()
- case 1:
- switch o := opts[0].(type) {
- case _gen_veyron2.Runtime:
- client = o.Client()
- case _gen_ipc.Client:
- client = o
- default:
- return nil, _gen_idl.ErrUnrecognizedOption
- }
- default:
- return nil, _gen_idl.ErrTooManyOptionsToBind
- }
- stub := &clientStubPlayer{client: client, name: name}
-
- return stub, nil
-}
-
-// NewServerPlayer creates a new server stub.
-//
-// It takes a regular server implementing the PlayerService
-// interface, and returns a new server stub.
-func NewServerPlayer(server PlayerService) interface{} {
- return &ServerStubPlayer{
- service: server,
- }
-}
-
-// clientStubPlayer implements Player.
-type clientStubPlayer struct {
- client _gen_ipc.Client
- name string
-}
-
-func (c *clientStubPlayer) GetMethodTags(method string) []interface{} {
- return GetPlayerMethodTags(method)
-}
-
-func (__gen_c *clientStubPlayer) Challenge(Address string, ID GameID, opts ..._gen_ipc.ClientCallOpt) (reply bool, err error) {
- var call _gen_ipc.ClientCall
- if call, err = __gen_c.client.StartCall(__gen_c.name, "Challenge", []interface{}{Address, ID}, opts...); err != nil {
- return
- }
- if ierr := call.Finish(&reply, &err); ierr != nil {
- err = ierr
- }
- return
-}
-
-func (c *clientStubPlayer) UnresolveStep(opts ..._gen_ipc.ClientCallOpt) (reply []string, err error) {
- var call _gen_ipc.ClientCall
- if call, err = c.client.StartCall(c.name, "UnresolveStep", nil, opts...); err != nil {
- return
- }
- if ierr := call.Finish(&reply, &err); ierr != nil {
- err = ierr
- }
- return
-}
-
-// ServerStubPlayer wraps a server that implements
-// PlayerService and provides an object that satisfies
-// the requirements of veyron2/ipc.ReflectInvoker.
-type ServerStubPlayer struct {
- service PlayerService
-}
-
-func (s *ServerStubPlayer) GetMethodTags(method string) []interface{} {
- return GetPlayerMethodTags(method)
-}
-
-func (s *ServerStubPlayer) Signature(call _gen_ipc.ServerCall) (_gen_ipc.ServiceSignature, error) {
- result := _gen_ipc.ServiceSignature{Methods: make(map[string]_gen_ipc.MethodSignature)}
- result.Methods["Challenge"] = _gen_ipc.MethodSignature{
- InArgs: []_gen_ipc.MethodArgument{
- {Name: "Address", Type: 3},
- {Name: "ID", Type: 65},
- },
- OutArgs: []_gen_ipc.MethodArgument{
- {Name: "", Type: 2},
- {Name: "", Type: 66},
- },
- }
-
- result.TypeDefs = []_gen_idl.AnyData{
- _gen_wiretype.StructType{
- []_gen_wiretype.FieldType{
- _gen_wiretype.FieldType{Type: 0x3, Name: "ID"},
- },
- "GameID", []string(nil)},
- _gen_wiretype.NamedPrimitiveType{Type: 0x1, Name: "error", Tags: []string(nil)}}
-
- return result, nil
-}
-
-func (s *ServerStubPlayer) UnresolveStep(call _gen_ipc.ServerCall) (reply []string, err error) {
- if unresolver, ok := s.service.(_gen_ipc.Unresolver); ok {
- return unresolver.UnresolveStep(call)
- }
- if call.Server() == nil {
- return
- }
- var published []string
- if published, err = call.Server().Published(); err != nil || published == nil {
- return
- }
- reply = make([]string, len(published))
- for i, p := range published {
- reply[i] = _gen_naming.Join(p, call.Name())
- }
- return
-}
-
-func (__gen_s *ServerStubPlayer) Challenge(call _gen_ipc.ServerCall, Address string, ID GameID) (reply bool, err error) {
- reply, err = __gen_s.service.Challenge(call, Address, ID)
- return
-}
-
-func GetPlayerMethodTags(method string) []interface{} {
- switch method {
- case "Challenge":
- return []interface{}{}
- default:
- return nil
- }
-}
-
-// ScoreKeeper receives the outcome of games from Judges.
-// ScoreKeeper is the interface the client binds and uses.
-// ScoreKeeper_InternalNoTagGetter is the interface without the TagGetter
-// and UnresolveStep methods (both framework-added, rathern than user-defined),
-// to enable embedding without method collisions. Not to be used directly by
-// clients.
-type ScoreKeeper_InternalNoTagGetter interface {
- Record(Score ScoreCard, opts ..._gen_ipc.ClientCallOpt) (err error)
-}
-type ScoreKeeper interface {
- _gen_idl.TagGetter
- // UnresolveStep returns the names for the remote service, rooted at the
- // service's immediate namespace ancestor.
- UnresolveStep(opts ..._gen_ipc.ClientCallOpt) ([]string, error)
- ScoreKeeper_InternalNoTagGetter
-}
-
-// ScoreKeeperService is the interface the server implements.
-type ScoreKeeperService interface {
- Record(context _gen_ipc.Context, Score ScoreCard) (err error)
-}
-
-// BindScoreKeeper returns the client stub implementing the ScoreKeeper
-// interface.
-//
-// If no _gen_ipc.Client is specified, the default _gen_ipc.Client in the
-// global Runtime is used.
-func BindScoreKeeper(name string, opts ..._gen_ipc.BindOpt) (ScoreKeeper, error) {
- var client _gen_ipc.Client
- switch len(opts) {
- case 0:
- client = _gen_rt.R().Client()
- case 1:
- switch o := opts[0].(type) {
- case _gen_veyron2.Runtime:
- client = o.Client()
- case _gen_ipc.Client:
- client = o
- default:
- return nil, _gen_idl.ErrUnrecognizedOption
- }
- default:
- return nil, _gen_idl.ErrTooManyOptionsToBind
- }
- stub := &clientStubScoreKeeper{client: client, name: name}
-
- return stub, nil
-}
-
-// NewServerScoreKeeper creates a new server stub.
-//
-// It takes a regular server implementing the ScoreKeeperService
-// interface, and returns a new server stub.
-func NewServerScoreKeeper(server ScoreKeeperService) interface{} {
- return &ServerStubScoreKeeper{
- service: server,
- }
-}
-
-// clientStubScoreKeeper implements ScoreKeeper.
-type clientStubScoreKeeper struct {
- client _gen_ipc.Client
- name string
-}
-
-func (c *clientStubScoreKeeper) GetMethodTags(method string) []interface{} {
- return GetScoreKeeperMethodTags(method)
-}
-
-func (__gen_c *clientStubScoreKeeper) Record(Score ScoreCard, opts ..._gen_ipc.ClientCallOpt) (err error) {
- var call _gen_ipc.ClientCall
- if call, err = __gen_c.client.StartCall(__gen_c.name, "Record", []interface{}{Score}, opts...); err != nil {
- return
- }
- if ierr := call.Finish(&err); ierr != nil {
- err = ierr
- }
- return
-}
-
-func (c *clientStubScoreKeeper) UnresolveStep(opts ..._gen_ipc.ClientCallOpt) (reply []string, err error) {
- var call _gen_ipc.ClientCall
- if call, err = c.client.StartCall(c.name, "UnresolveStep", nil, opts...); err != nil {
- return
- }
- if ierr := call.Finish(&reply, &err); ierr != nil {
- err = ierr
- }
- return
-}
-
-// ServerStubScoreKeeper wraps a server that implements
-// ScoreKeeperService and provides an object that satisfies
-// the requirements of veyron2/ipc.ReflectInvoker.
-type ServerStubScoreKeeper struct {
- service ScoreKeeperService
-}
-
-func (s *ServerStubScoreKeeper) GetMethodTags(method string) []interface{} {
- return GetScoreKeeperMethodTags(method)
-}
-
-func (s *ServerStubScoreKeeper) Signature(call _gen_ipc.ServerCall) (_gen_ipc.ServiceSignature, error) {
- result := _gen_ipc.ServiceSignature{Methods: make(map[string]_gen_ipc.MethodSignature)}
- result.Methods["Record"] = _gen_ipc.MethodSignature{
- InArgs: []_gen_ipc.MethodArgument{
- {Name: "Score", Type: 71},
- },
- OutArgs: []_gen_ipc.MethodArgument{
- {Name: "", Type: 72},
- },
- }
-
- result.TypeDefs = []_gen_idl.AnyData{
- _gen_wiretype.NamedPrimitiveType{Type: 0x32, Name: "GameTypeTag", Tags: []string(nil)}, _gen_wiretype.StructType{
- []_gen_wiretype.FieldType{
- _gen_wiretype.FieldType{Type: 0x24, Name: "NumRounds"},
- _gen_wiretype.FieldType{Type: 0x41, Name: "GameType"},
- },
- "GameOptions", []string(nil)},
- _gen_wiretype.ArrayType{Elem: 0x3, Len: 0x2, Name: "", Tags: []string(nil)}, _gen_wiretype.NamedPrimitiveType{Type: 0x32, Name: "WinnerTag", Tags: []string(nil)}, _gen_wiretype.StructType{
- []_gen_wiretype.FieldType{
- _gen_wiretype.FieldType{Type: 0x43, Name: "Moves"},
- _gen_wiretype.FieldType{Type: 0x44, Name: "Winner"},
- _gen_wiretype.FieldType{Type: 0x25, Name: "StartTimeNS"},
- _gen_wiretype.FieldType{Type: 0x25, Name: "EndTimeNS"},
- },
- "Round", []string(nil)},
- _gen_wiretype.SliceType{Elem: 0x45, Name: "", Tags: []string(nil)}, _gen_wiretype.StructType{
- []_gen_wiretype.FieldType{
- _gen_wiretype.FieldType{Type: 0x42, Name: "Opts"},
- _gen_wiretype.FieldType{Type: 0x3, Name: "Judge"},
- _gen_wiretype.FieldType{Type: 0x3d, Name: "Players"},
- _gen_wiretype.FieldType{Type: 0x46, Name: "Rounds"},
- _gen_wiretype.FieldType{Type: 0x25, Name: "StartTimeNS"},
- _gen_wiretype.FieldType{Type: 0x25, Name: "EndTimeNS"},
- _gen_wiretype.FieldType{Type: 0x44, Name: "Winner"},
- },
- "ScoreCard", []string(nil)},
- _gen_wiretype.NamedPrimitiveType{Type: 0x1, Name: "error", Tags: []string(nil)}}
-
- return result, nil
-}
-
-func (s *ServerStubScoreKeeper) UnresolveStep(call _gen_ipc.ServerCall) (reply []string, err error) {
- if unresolver, ok := s.service.(_gen_ipc.Unresolver); ok {
- return unresolver.UnresolveStep(call)
- }
- if call.Server() == nil {
- return
- }
- var published []string
- if published, err = call.Server().Published(); err != nil || published == nil {
- return
- }
- reply = make([]string, len(published))
- for i, p := range published {
- reply[i] = _gen_naming.Join(p, call.Name())
- }
- return
-}
-
-func (__gen_s *ServerStubScoreKeeper) Record(call _gen_ipc.ServerCall, Score ScoreCard) (err error) {
- err = __gen_s.service.Record(call, Score)
- return
-}
-
-func GetScoreKeeperMethodTags(method string) []interface{} {
- switch method {
- case "Record":
- return []interface{}{}
- default:
- return nil
- }
-}
diff --git a/examples/storage/mdb/schema/schema.idl b/examples/storage/mdb/schema/schema.vdl
similarity index 100%
rename from examples/storage/mdb/schema/schema.idl
rename to examples/storage/mdb/schema/schema.vdl
diff --git a/examples/storage/mdb/schema/schema.idl.go b/examples/storage/mdb/schema/schema.vdl.go
similarity index 94%
rename from examples/storage/mdb/schema/schema.idl.go
rename to examples/storage/mdb/schema/schema.vdl.go
index 3f7d253..06ab428 100644
--- a/examples/storage/mdb/schema/schema.idl.go
+++ b/examples/storage/mdb/schema/schema.vdl.go
@@ -1,4 +1,4 @@
-// This file was auto-generated by the veyron idl tool.
+// This file was auto-generated by the veyron vdl tool.
// Source: schema.idl
package schema
diff --git a/examples/todos/schema/schema.idl b/examples/todos/schema/schema.vdl
similarity index 100%
rename from examples/todos/schema/schema.idl
rename to examples/todos/schema/schema.vdl
diff --git a/examples/todos/schema/schema.idl.go b/examples/todos/schema/schema.vdl.go
similarity index 86%
rename from examples/todos/schema/schema.idl.go
rename to examples/todos/schema/schema.vdl.go
index 9a6c338..2aec1c9 100644
--- a/examples/todos/schema/schema.idl.go
+++ b/examples/todos/schema/schema.vdl.go
@@ -1,4 +1,4 @@
-// This file was auto-generated by the veyron idl tool.
+// This file was auto-generated by the veyron vdl tool.
// Source: schema.idl
package schema
diff --git a/examples/tunnel/tunnel.idl b/examples/tunnel/tunnel.vdl
similarity index 100%
rename from examples/tunnel/tunnel.idl
rename to examples/tunnel/tunnel.vdl
diff --git a/examples/tunnel/tunnel.idl.go b/examples/tunnel/tunnel.vdl.go
similarity index 96%
rename from examples/tunnel/tunnel.idl.go
rename to examples/tunnel/tunnel.vdl.go
index e0b59ad..f9261af 100644
--- a/examples/tunnel/tunnel.idl.go
+++ b/examples/tunnel/tunnel.vdl.go
@@ -1,4 +1,4 @@
-// This file was auto-generated by the veyron idl tool.
+// This file was auto-generated by the veyron vdl tool.
// Source: tunnel.idl
package tunnel
@@ -8,10 +8,10 @@
// The non-user imports are prefixed with "_gen_" to prevent collisions.
_gen_veyron2 "veyron2"
- _gen_idl "veyron2/idl"
_gen_ipc "veyron2/ipc"
_gen_naming "veyron2/naming"
_gen_rt "veyron2/rt"
+ _gen_vdl "veyron2/vdl"
_gen_wiretype "veyron2/wiretype"
)
@@ -21,6 +21,7 @@
Rows uint32 // Window size.
Cols uint32
}
+
type ClientShellPacket struct {
// Bytes going to the shell's stdin.
Stdin []byte
@@ -28,6 +29,7 @@
Rows uint32
Cols uint32
}
+
type ServerShellPacket struct {
// Bytes coming from the shell's stdout.
Stdout []byte
@@ -47,7 +49,6 @@
// data received from that network connection is sent back in the reply
// stream.
Forward(network string, address string, opts ..._gen_ipc.ClientCallOpt) (reply TunnelForwardStream, err error)
-
// The Shell method is used to either run shell commands remotely, or to open
// an interactive shell. The data received over the byte stream is sent to the
// shell's stdin, and the data received from the shell's stdout and stderr is
@@ -56,7 +57,7 @@
Shell(command string, shellOpts ShellOpts, opts ..._gen_ipc.ClientCallOpt) (reply TunnelShellStream, err error)
}
type Tunnel interface {
- _gen_idl.TagGetter
+ _gen_vdl.TagGetter
// UnresolveStep returns the names for the remote service, rooted at the
// service's immediate namespace ancestor.
UnresolveStep(opts ..._gen_ipc.ClientCallOpt) ([]string, error)
@@ -71,7 +72,6 @@
// data received from that network connection is sent back in the reply
// stream.
Forward(context _gen_ipc.Context, network string, address string, stream TunnelServiceForwardStream) (err error)
-
// The Shell method is used to either run shell commands remotely, or to open
// an interactive shell. The data received over the byte stream is sent to the
// shell's stdin, and the data received from the shell's stdout and stderr is
@@ -259,10 +259,10 @@
case _gen_ipc.Client:
client = o
default:
- return nil, _gen_idl.ErrUnrecognizedOption
+ return nil, _gen_vdl.ErrUnrecognizedOption
}
default:
- return nil, _gen_idl.ErrTooManyOptionsToBind
+ return nil, _gen_vdl.ErrTooManyOptionsToBind
}
stub := &clientStubTunnel{client: client, name: name}
@@ -355,7 +355,7 @@
OutStream: 70,
}
- result.TypeDefs = []_gen_idl.AnyData{
+ result.TypeDefs = []_gen_vdl.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"},
@@ -363,20 +363,20 @@
_gen_wiretype.FieldType{Type: 0x34, Name: "Rows"},
_gen_wiretype.FieldType{Type: 0x34, Name: "Cols"},
},
- "ShellOpts", []string(nil)},
+ "veyron/examples/tunnel.ShellOpts", []string(nil)},
_gen_wiretype.StructType{
[]_gen_wiretype.FieldType{
_gen_wiretype.FieldType{Type: 0x43, Name: "Stdin"},
_gen_wiretype.FieldType{Type: 0x34, Name: "Rows"},
_gen_wiretype.FieldType{Type: 0x34, Name: "Cols"},
},
- "ClientShellPacket", []string(nil)},
+ "veyron/examples/tunnel.ClientShellPacket", []string(nil)},
_gen_wiretype.StructType{
[]_gen_wiretype.FieldType{
_gen_wiretype.FieldType{Type: 0x43, Name: "Stdout"},
_gen_wiretype.FieldType{Type: 0x43, Name: "Stderr"},
},
- "ServerShellPacket", []string(nil)},
+ "veyron/examples/tunnel.ServerShellPacket", []string(nil)},
}
return result, nil
diff --git a/examples/wspr_sample/cache.idl b/examples/wspr_sample/cache.vdl
similarity index 91%
rename from examples/wspr_sample/cache.idl
rename to examples/wspr_sample/cache.vdl
index e7279ef..8d86471 100644
--- a/examples/wspr_sample/cache.idl
+++ b/examples/wspr_sample/cache.vdl
@@ -3,11 +3,11 @@
// A Cache service mimics the memcache interface.
type Cache interface {
// Set sets a value for a key.
- Set(key string, value anydata) error
+ Set(key string, value any) error
// Get returns the value for a key. If the value is not found, returns
// a not found error.
- Get(key string) (anydata, error)
+ Get(key string) (any, error)
// Same as Get, but casts the return argument to an byte.
GetAsByte(key string) (byte, error)
@@ -31,7 +31,7 @@
GetAsError(key string) (error, error)
// AsMap returns the full contents of the cache as a map.
- AsMap() (map[string]anydata, error)
+ AsMap() (map[string]any, error)
// KeyValuePairs returns the full contents of the cache as a slice of pairs.
KeyValuePairs() ([]KeyValuePair, error)
@@ -49,11 +49,11 @@
Size() (int64, error)
// MultiGet sets up a stream that allows fetching multiple keys.
- MultiGet() stream<string, anydata> error
+ MultiGet() stream<string, any> error
}
// KeyValuePair is a representation of a cached key and value pair.
type KeyValuePair struct {
Key string
- Value anydata
+ Value any
}
diff --git a/examples/wspr_sample/cache.idl.go b/examples/wspr_sample/cache.vdl.go
similarity index 94%
rename from examples/wspr_sample/cache.idl.go
rename to examples/wspr_sample/cache.vdl.go
index 869ac42..b8238ea 100644
--- a/examples/wspr_sample/cache.idl.go
+++ b/examples/wspr_sample/cache.vdl.go
@@ -1,4 +1,4 @@
-// This file was auto-generated by the veyron idl tool.
+// This file was auto-generated by the veyron vdl tool.
// Source: cache.idl
package sample
@@ -6,17 +6,17 @@
import (
// The non-user imports are prefixed with "_gen_" to prevent collisions.
_gen_veyron2 "veyron2"
- _gen_idl "veyron2/idl"
_gen_ipc "veyron2/ipc"
_gen_naming "veyron2/naming"
_gen_rt "veyron2/rt"
+ _gen_vdl "veyron2/vdl"
_gen_wiretype "veyron2/wiretype"
)
// KeyValuePair is a representation of a cached key and value pair.
type KeyValuePair struct {
Key string
- Value _gen_idl.AnyData
+ Value _gen_vdl.Any
}
// A Cache service mimics the memcache interface.
@@ -28,65 +28,48 @@
type Cache_InternalNoTagGetter interface {
// Set sets a value for a key.
- Set(key string, value _gen_idl.AnyData, opts ..._gen_ipc.ClientCallOpt) (err error)
-
+ Set(key string, value _gen_vdl.Any, opts ..._gen_ipc.ClientCallOpt) (err error)
// Get returns the value for a key. If the value is not found, returns
// a not found error.
- Get(key string, opts ..._gen_ipc.ClientCallOpt) (reply _gen_idl.AnyData, err error)
-
+ Get(key string, opts ..._gen_ipc.ClientCallOpt) (reply _gen_vdl.Any, err error)
// Same as Get, but casts the return argument to an byte.
GetAsByte(key string, opts ..._gen_ipc.ClientCallOpt) (reply byte, err error)
-
// Same as Get, but casts the return argument to an int32.
GetAsInt32(key string, opts ..._gen_ipc.ClientCallOpt) (reply int32, err error)
-
// Same as Get, but casts the return argument to an int64.
GetAsInt64(key string, opts ..._gen_ipc.ClientCallOpt) (reply int64, err error)
-
// Same as Get, but casts the return argument to an uint32.
GetAsUint32(key string, opts ..._gen_ipc.ClientCallOpt) (reply uint32, err error)
-
// Same as Get, but casts the return argument to an uint64.
GetAsUint64(key string, opts ..._gen_ipc.ClientCallOpt) (reply uint64, err error)
-
// Same as Get, but casts the return argument to an float32.
GetAsFloat32(key string, opts ..._gen_ipc.ClientCallOpt) (reply float32, err error)
-
// Same as Get, but casts the return argument to an float64.
GetAsFloat64(key string, opts ..._gen_ipc.ClientCallOpt) (reply float64, err error)
-
// Same as Get, but casts the return argument to a string.
GetAsString(key string, opts ..._gen_ipc.ClientCallOpt) (reply string, err error)
-
// Same as Get, but casts the return argument to a bool.
GetAsBool(key string, opts ..._gen_ipc.ClientCallOpt) (reply bool, err error)
-
// Same as Get, but casts the return argument to an error.
GetAsError(key string, opts ..._gen_ipc.ClientCallOpt) (reply error, err error)
-
// AsMap returns the full contents of the cache as a map.
- AsMap(opts ..._gen_ipc.ClientCallOpt) (reply map[string]_gen_idl.AnyData, err error)
-
+ AsMap(opts ..._gen_ipc.ClientCallOpt) (reply map[string]_gen_vdl.Any, err error)
// KeyValuePairs returns the full contents of the cache as a slice of pairs.
KeyValuePairs(opts ..._gen_ipc.ClientCallOpt) (reply []KeyValuePair, err error)
-
// MostRecentSet returns the key and value and the timestamp for the most
// recent set operation
// TODO(bprosnitz) support type types and change time to native time type
MostRecentSet(opts ..._gen_ipc.ClientCallOpt) (value KeyValuePair, time int64, err error)
-
// KeyPage indexes into the keys (in alphanumerically sorted order) and
// returns the indexth page of 10 keys.
KeyPage(index int64, opts ..._gen_ipc.ClientCallOpt) (reply [10]string, err error)
-
// Size returns the total number of entries in the cache.
Size(opts ..._gen_ipc.ClientCallOpt) (reply int64, err error)
-
// MultiGet sets up a stream that allows fetching multiple keys.
MultiGet(opts ..._gen_ipc.ClientCallOpt) (reply CacheMultiGetStream, err error)
}
type Cache interface {
- _gen_idl.TagGetter
+ _gen_vdl.TagGetter
// UnresolveStep returns the names for the remote service, rooted at the
// service's immediate namespace ancestor.
UnresolveStep(opts ..._gen_ipc.ClientCallOpt) ([]string, error)
@@ -97,60 +80,43 @@
type CacheService interface {
// Set sets a value for a key.
- Set(context _gen_ipc.Context, key string, value _gen_idl.AnyData) (err error)
-
+ Set(context _gen_ipc.Context, key string, value _gen_vdl.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.Context, key string) (reply _gen_idl.AnyData, err error)
-
+ Get(context _gen_ipc.Context, key string) (reply _gen_vdl.Any, err error)
// Same as Get, but casts the return argument to an byte.
GetAsByte(context _gen_ipc.Context, key string) (reply byte, err error)
-
// Same as Get, but casts the return argument to an int32.
GetAsInt32(context _gen_ipc.Context, key string) (reply int32, err error)
-
// Same as Get, but casts the return argument to an int64.
GetAsInt64(context _gen_ipc.Context, key string) (reply int64, err error)
-
// Same as Get, but casts the return argument to an uint32.
GetAsUint32(context _gen_ipc.Context, key string) (reply uint32, err error)
-
// Same as Get, but casts the return argument to an uint64.
GetAsUint64(context _gen_ipc.Context, key string) (reply uint64, err error)
-
// Same as Get, but casts the return argument to an float32.
GetAsFloat32(context _gen_ipc.Context, key string) (reply float32, err error)
-
// Same as Get, but casts the return argument to an float64.
GetAsFloat64(context _gen_ipc.Context, key string) (reply float64, err error)
-
// Same as Get, but casts the return argument to a string.
GetAsString(context _gen_ipc.Context, key string) (reply string, err error)
-
// Same as Get, but casts the return argument to a bool.
GetAsBool(context _gen_ipc.Context, key string) (reply bool, err error)
-
// Same as Get, but casts the return argument to an error.
GetAsError(context _gen_ipc.Context, key string) (reply error, err error)
-
// AsMap returns the full contents of the cache as a map.
- AsMap(context _gen_ipc.Context) (reply map[string]_gen_idl.AnyData, err error)
-
+ AsMap(context _gen_ipc.Context) (reply map[string]_gen_vdl.Any, err error)
// KeyValuePairs returns the full contents of the cache as a slice of pairs.
KeyValuePairs(context _gen_ipc.Context) (reply []KeyValuePair, err error)
-
// MostRecentSet returns the key and value and the timestamp for the most
// recent set operation
// TODO(bprosnitz) support type types and change time to native time type
MostRecentSet(context _gen_ipc.Context) (value KeyValuePair, time int64, err error)
-
// KeyPage indexes into the keys (in alphanumerically sorted order) and
// returns the indexth page of 10 keys.
KeyPage(context _gen_ipc.Context, index int64) (reply [10]string, err error)
-
// Size returns the total number of entries in the cache.
Size(context _gen_ipc.Context) (reply int64, err error)
-
// MultiGet sets up a stream that allows fetching multiple keys.
MultiGet(context _gen_ipc.Context, stream CacheServiceMultiGetStream) (err error)
}
@@ -171,7 +137,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_idl.AnyData, err error)
+ Recv() (item _gen_vdl.Any, err error)
// Finish closes the stream and returns the positional return values for
// call.
@@ -194,7 +160,7 @@
return c.clientCall.CloseSend()
}
-func (c *implCacheMultiGetStream) Recv() (item _gen_idl.AnyData, err error) {
+func (c *implCacheMultiGetStream) Recv() (item _gen_vdl.Any, err error) {
err = c.clientCall.Recv(&item)
return
}
@@ -215,7 +181,7 @@
type CacheServiceMultiGetStream interface {
// Send places the item onto the output stream, blocking if there is no buffer
// space available.
- Send(item _gen_idl.AnyData) error
+ Send(item _gen_vdl.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.
@@ -227,7 +193,7 @@
serverCall _gen_ipc.ServerCall
}
-func (s *implCacheServiceMultiGetStream) Send(item _gen_idl.AnyData) error {
+func (s *implCacheServiceMultiGetStream) Send(item _gen_vdl.Any) error {
return s.serverCall.Send(item)
}
@@ -253,10 +219,10 @@
case _gen_ipc.Client:
client = o
default:
- return nil, _gen_idl.ErrUnrecognizedOption
+ return nil, _gen_vdl.ErrUnrecognizedOption
}
default:
- return nil, _gen_idl.ErrTooManyOptionsToBind
+ return nil, _gen_vdl.ErrTooManyOptionsToBind
}
stub := &clientStubCache{client: client, name: name}
@@ -283,7 +249,7 @@
return GetCacheMethodTags(method)
}
-func (__gen_c *clientStubCache) Set(key string, value _gen_idl.AnyData, opts ..._gen_ipc.ClientCallOpt) (err error) {
+func (__gen_c *clientStubCache) Set(key string, value _gen_vdl.Any, opts ..._gen_ipc.ClientCallOpt) (err error) {
var call _gen_ipc.ClientCall
if call, err = __gen_c.client.StartCall(__gen_c.name, "Set", []interface{}{key, value}, opts...); err != nil {
return
@@ -294,7 +260,7 @@
return
}
-func (__gen_c *clientStubCache) Get(key string, opts ..._gen_ipc.ClientCallOpt) (reply _gen_idl.AnyData, err error) {
+func (__gen_c *clientStubCache) Get(key string, opts ..._gen_ipc.ClientCallOpt) (reply _gen_vdl.Any, err error) {
var call _gen_ipc.ClientCall
if call, err = __gen_c.client.StartCall(__gen_c.name, "Get", []interface{}{key}, opts...); err != nil {
return
@@ -415,7 +381,7 @@
return
}
-func (__gen_c *clientStubCache) AsMap(opts ..._gen_ipc.ClientCallOpt) (reply map[string]_gen_idl.AnyData, err error) {
+func (__gen_c *clientStubCache) AsMap(opts ..._gen_ipc.ClientCallOpt) (reply map[string]_gen_vdl.Any, err error) {
var call _gen_ipc.ClientCall
if call, err = __gen_c.client.StartCall(__gen_c.name, "AsMap", nil, opts...); err != nil {
return
@@ -658,13 +624,13 @@
},
}
- result.TypeDefs = []_gen_idl.AnyData{
+ result.TypeDefs = []_gen_vdl.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"},
_gen_wiretype.FieldType{Type: 0x41, Name: "Value"},
},
- "KeyValuePair", []string(nil)},
+ "veyron/examples/wspr_sample.KeyValuePair", []string(nil)},
_gen_wiretype.SliceType{Elem: 0x45, Name: "", Tags: []string(nil)}, _gen_wiretype.ArrayType{Elem: 0x3, Len: 0xa, Name: "", Tags: []string(nil)}}
return result, nil
@@ -688,12 +654,12 @@
return
}
-func (__gen_s *ServerStubCache) Set(call _gen_ipc.ServerCall, key string, value _gen_idl.AnyData) (err error) {
+func (__gen_s *ServerStubCache) Set(call _gen_ipc.ServerCall, key string, value _gen_vdl.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_idl.AnyData, err error) {
+func (__gen_s *ServerStubCache) Get(call _gen_ipc.ServerCall, key string) (reply _gen_vdl.Any, err error) {
reply, err = __gen_s.service.Get(call, key)
return
}
@@ -748,7 +714,7 @@
return
}
-func (__gen_s *ServerStubCache) AsMap(call _gen_ipc.ServerCall) (reply map[string]_gen_idl.AnyData, err error) {
+func (__gen_s *ServerStubCache) AsMap(call _gen_ipc.ServerCall) (reply map[string]_gen_vdl.Any, err error) {
reply, err = __gen_s.service.AsMap(call)
return
}
diff --git a/examples/wspr_sample/error_thrower.idl b/examples/wspr_sample/error_thrower.vdl
similarity index 100%
rename from examples/wspr_sample/error_thrower.idl
rename to examples/wspr_sample/error_thrower.vdl
diff --git a/examples/wspr_sample/error_thrower.idl.go b/examples/wspr_sample/error_thrower.vdl.go
similarity index 97%
rename from examples/wspr_sample/error_thrower.idl.go
rename to examples/wspr_sample/error_thrower.vdl.go
index 520aa36..6e81dbd 100644
--- a/examples/wspr_sample/error_thrower.idl.go
+++ b/examples/wspr_sample/error_thrower.vdl.go
@@ -1,4 +1,4 @@
-// This file was auto-generated by the veyron idl tool.
+// This file was auto-generated by the veyron vdl tool.
// Source: error_thrower.idl
package sample
@@ -6,10 +6,10 @@
import (
// The non-user imports are prefixed with "_gen_" to prevent collisions.
_gen_veyron2 "veyron2"
- _gen_idl "veyron2/idl"
_gen_ipc "veyron2/ipc"
_gen_naming "veyron2/naming"
_gen_rt "veyron2/rt"
+ _gen_vdl "veyron2/vdl"
_gen_wiretype "veyron2/wiretype"
)
@@ -23,36 +23,27 @@
// Throws veyron2/vError.Aborted error
ThrowAborted(opts ..._gen_ipc.ClientCallOpt) (err error)
-
// Throws veyron2/vError.BadArg error
ThrowBadArg(opts ..._gen_ipc.ClientCallOpt) (err error)
-
// Throws veyron2/vError.BadProtocol error
ThrowBadProtocol(opts ..._gen_ipc.ClientCallOpt) (err error)
-
// Throws veyron2/vError.Internal error
ThrowInternal(opts ..._gen_ipc.ClientCallOpt) (err error)
-
// Throws veyron2/vError.NotAuthorized error
ThrowNotAuthorized(opts ..._gen_ipc.ClientCallOpt) (err error)
-
// Throws veyron2/vError.NotFound error
ThrowNotFound(opts ..._gen_ipc.ClientCallOpt) (err error)
-
// Throws veyron2/vError.Unknown error
ThrowUnknown(opts ..._gen_ipc.ClientCallOpt) (err error)
-
// Throws normal Go error
ThrowGoError(opts ..._gen_ipc.ClientCallOpt) (err error)
-
// Throws custom error created by using Standard
ThrowCustomStandardError(opts ..._gen_ipc.ClientCallOpt) (err error)
-
// Lists all errors Ids available in veyron2/verror
ListAllBuiltInErrorIDs(opts ..._gen_ipc.ClientCallOpt) (reply []string, err error)
}
type ErrorThrower interface {
- _gen_idl.TagGetter
+ _gen_vdl.TagGetter
// UnresolveStep returns the names for the remote service, rooted at the
// service's immediate namespace ancestor.
UnresolveStep(opts ..._gen_ipc.ClientCallOpt) ([]string, error)
@@ -64,31 +55,22 @@
// Throws veyron2/vError.Aborted error
ThrowAborted(context _gen_ipc.Context) (err error)
-
// Throws veyron2/vError.BadArg error
ThrowBadArg(context _gen_ipc.Context) (err error)
-
// Throws veyron2/vError.BadProtocol error
ThrowBadProtocol(context _gen_ipc.Context) (err error)
-
// Throws veyron2/vError.Internal error
ThrowInternal(context _gen_ipc.Context) (err error)
-
// Throws veyron2/vError.NotAuthorized error
ThrowNotAuthorized(context _gen_ipc.Context) (err error)
-
// Throws veyron2/vError.NotFound error
ThrowNotFound(context _gen_ipc.Context) (err error)
-
// Throws veyron2/vError.Unknown error
ThrowUnknown(context _gen_ipc.Context) (err error)
-
// Throws normal Go error
ThrowGoError(context _gen_ipc.Context) (err error)
-
// Throws custom error created by using Standard
ThrowCustomStandardError(context _gen_ipc.Context) (err error)
-
// Lists all errors Ids available in veyron2/verror
ListAllBuiltInErrorIDs(context _gen_ipc.Context) (reply []string, err error)
}
@@ -110,10 +92,10 @@
case _gen_ipc.Client:
client = o
default:
- return nil, _gen_idl.ErrUnrecognizedOption
+ return nil, _gen_vdl.ErrUnrecognizedOption
}
default:
- return nil, _gen_idl.ErrTooManyOptionsToBind
+ return nil, _gen_vdl.ErrTooManyOptionsToBind
}
stub := &clientStubErrorThrower{client: client, name: name}
@@ -336,7 +318,7 @@
},
}
- result.TypeDefs = []_gen_idl.AnyData{
+ result.TypeDefs = []_gen_vdl.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 9ce3e79..f039400 100644
--- a/examples/wspr_sample/sampled/lib/cache_impl.go
+++ b/examples/wspr_sample/sampled/lib/cache_impl.go
@@ -7,8 +7,8 @@
"sort"
"time"
- "veyron2/idl"
"veyron2/ipc"
+ "veyron2/vdl"
"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]idl.AnyData
+ cache map[string]vdl.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]idl.AnyData)}
+ return &cacheImpl{cache: make(map[string]vdl.Any)}
}
// Set sets a value for a key. This should never return an error.
-func (c *cacheImpl) Set(_ ipc.Context, key string, value idl.AnyData) error {
+func (c *cacheImpl) Set(_ ipc.Context, key string, value vdl.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.Context, key string) (idl.AnyData, error) {
+func (c *cacheImpl) Get(_ ipc.Context, key string) (vdl.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.Context) (map[string]idl.AnyData, error) {
+func (c *cacheImpl) AsMap(ipc.Context) (map[string]vdl.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 79c8c06..6b51edb 100644
--- a/examples/wspr_sample/sampled/lib/sampled_test.go
+++ b/examples/wspr_sample/sampled/lib/sampled_test.go
@@ -6,10 +6,10 @@
"testing"
"time"
- "veyron2/idl"
"veyron2/ipc"
"veyron2/naming"
"veyron2/rt"
+ "veyron2/vdl"
"veyron2/verror"
hps "veyron/examples/wspr_sample"
@@ -93,7 +93,7 @@
// settable mirrors the cache's Set method to provide a consistent way to populate test cases.
type settable interface {
- Set(key string, val idl.AnyData, opts ...ipc.ClientCallOpt) error
+ Set(key string, val vdl.Any, opts ...ipc.ClientCallOpt) error
}
// populateObject populates a settable with 12 values.
@@ -164,9 +164,9 @@
}
// settableMap is a map that implements the settable interface.
-type settableMap map[string]idl.AnyData
+type settableMap map[string]vdl.Any
-func (sm settableMap) Set(key string, val idl.AnyData, opts ...ipc.ClientCallOpt) error {
+func (sm settableMap) Set(key string, val vdl.Any, opts ...ipc.ClientCallOpt) error {
sm[key] = val
return nil
}
@@ -181,7 +181,7 @@
t.Fatal("error calling AsMap: ", err)
}
- m := settableMap(make(map[string]idl.AnyData))
+ m := settableMap(make(map[string]vdl.Any))
if err := populateObject(m); err != nil {
t.Fatal("error populating map: ", err)
}
@@ -204,7 +204,7 @@
t.Fatal("error calling KeyValuePairs: ", err)
}
- m := settableMap(make(map[string]idl.AnyData))
+ m := settableMap(make(map[string]vdl.Any))
if err := populateObject(m); err != nil {
t.Fatal("error populating map: ", err)
}
diff --git a/runtimes/google/vsync/vsync.idl b/runtimes/google/vsync/vsync.vdl
similarity index 100%
rename from runtimes/google/vsync/vsync.idl
rename to runtimes/google/vsync/vsync.vdl
diff --git a/runtimes/google/vsync/vsync.idl.go b/runtimes/google/vsync/vsync.vdl.go
similarity index 81%
rename from runtimes/google/vsync/vsync.idl.go
rename to runtimes/google/vsync/vsync.vdl.go
index fdbc33e..5448603 100644
--- a/runtimes/google/vsync/vsync.idl.go
+++ b/runtimes/google/vsync/vsync.vdl.go
@@ -1,4 +1,4 @@
-// This file was auto-generated by the veyron idl tool.
+// This file was auto-generated by the veyron vdl tool.
// Source: vsync.idl
package vsync
@@ -10,10 +10,10 @@
// The non-user imports are prefixed with "_gen_" to prevent collisions.
_gen_veyron2 "veyron2"
- _gen_idl "veyron2/idl"
_gen_ipc "veyron2/ipc"
_gen_naming "veyron2/naming"
_gen_rt "veyron2/rt"
+ _gen_vdl "veyron2/vdl"
_gen_wiretype "veyron2/wiretype"
)
@@ -29,21 +29,6 @@
// GenVector is the generation vector.
type GenVector map[DeviceID]GenID
-// LogValue represents an object mutation within a transaction.
-type LogValue struct {
- // Mutation is the store mutation representing the change in the object.
- Mutation raw.Mutation
- // SyncTime is the timestamp of the mutation when it arrives at the Sync server.
- SyncTime int64
- // Delete indicates whether the mutation resulted in the object being
- // deleted from the store.
- Delete bool
- // Continue tracks the transaction boundaries in a range of mutations.
- // It is set to true in all transaction mutations except the last one
- // in which it is set to false to mark the end of the transaction.
- Continue bool
-}
-
// LogRec represents a single log record that is exchanged between two
// peers.
//
@@ -70,6 +55,21 @@
Value LogValue
}
+// LogValue represents an object mutation within a transaction.
+type LogValue struct {
+ // Mutation is the store mutation representing the change in the object.
+ Mutation raw.Mutation
+ // SyncTime is the timestamp of the mutation when it arrives at the Sync server.
+ SyncTime int64
+ // Delete indicates whether the mutation resulted in the object being
+ // deleted from the store.
+ Delete bool
+ // Continue tracks the transaction boundaries in a range of mutations.
+ // It is set to true in all transaction mutations except the last one
+ // in which it is set to false to mark the end of the transaction.
+ Continue bool
+}
+
// Sync allows a device to GetDeltas from another device.
// Sync is the interface the client binds and uses.
// Sync_InternalNoTagGetter is the interface without the TagGetter
@@ -83,7 +83,7 @@
GetDeltas(In GenVector, ClientID DeviceID, opts ..._gen_ipc.ClientCallOpt) (reply SyncGetDeltasStream, err error)
}
type Sync interface {
- _gen_idl.TagGetter
+ _gen_vdl.TagGetter
// UnresolveStep returns the names for the remote service, rooted at the
// service's immediate namespace ancestor.
UnresolveStep(opts ..._gen_ipc.ClientCallOpt) ([]string, error)
@@ -169,10 +169,10 @@
case _gen_ipc.Client:
client = o
default:
- return nil, _gen_idl.ErrUnrecognizedOption
+ return nil, _gen_vdl.ErrUnrecognizedOption
}
default:
- return nil, _gen_idl.ErrTooManyOptionsToBind
+ return nil, _gen_vdl.ErrTooManyOptionsToBind
}
stub := &clientStubSync{client: client, name: name}
@@ -242,41 +242,41 @@
{Name: "Err", Type: 68},
},
- OutStream: 83,
+ OutStream: 82,
}
- result.TypeDefs = []_gen_idl.AnyData{
- _gen_wiretype.NamedPrimitiveType{Type: 0x3, Name: "DeviceID", Tags: []string(nil)}, _gen_wiretype.NamedPrimitiveType{Type: 0x35, Name: "GenID", Tags: []string(nil)}, _gen_wiretype.MapType{Key: 0x41, Elem: 0x42, Name: "GenVector", Tags: []string(nil)}, _gen_wiretype.NamedPrimitiveType{Type: 0x1, Name: "error", Tags: []string(nil)}, _gen_wiretype.NamedPrimitiveType{Type: 0x35, Name: "LSN", Tags: []string(nil)}, _gen_wiretype.NamedPrimitiveType{Type: 0x32, Name: "byte", Tags: []string(nil)}, _gen_wiretype.ArrayType{Elem: 0x46, Len: 0x10, Name: "storage.ID", Tags: []string(nil)}, _gen_wiretype.NamedPrimitiveType{Type: 0x35, Name: "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: "TagOp", Tags: []string(nil)}, _gen_wiretype.ArrayType{Elem: 0x46, Len: 0x10, Name: "ID", Tags: []string(nil)}, _gen_wiretype.StructType{
+ result.TypeDefs = []_gen_vdl.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"},
- _gen_wiretype.FieldType{Type: 0x4c, Name: "ACL"},
+ _gen_wiretype.FieldType{Type: 0x47, Name: "ACL"},
},
- "Tag", []string(nil)},
- _gen_wiretype.SliceType{Elem: 0x4d, Name: "storage.TagList", Tags: []string(nil)}, _gen_wiretype.StructType{
+ "veyron2/storage.Tag", []string(nil)},
+ _gen_wiretype.SliceType{Elem: 0x4c, Name: "veyron2/storage.TagList", Tags: []string(nil)}, _gen_wiretype.StructType{
[]_gen_wiretype.FieldType{
_gen_wiretype.FieldType{Type: 0x3, Name: "Name"},
- _gen_wiretype.FieldType{Type: 0x4c, Name: "ID"},
+ _gen_wiretype.FieldType{Type: 0x47, Name: "ID"},
},
- "storage.DEntry", []string(nil)},
- _gen_wiretype.SliceType{Elem: 0x4f, Name: "", Tags: []string(nil)}, _gen_wiretype.StructType{
+ "veyron2/storage.DEntry", []string(nil)},
+ _gen_wiretype.SliceType{Elem: 0x4e, Name: "", Tags: []string(nil)}, _gen_wiretype.StructType{
[]_gen_wiretype.FieldType{
_gen_wiretype.FieldType{Type: 0x47, Name: "ID"},
_gen_wiretype.FieldType{Type: 0x48, Name: "PriorVersion"},
_gen_wiretype.FieldType{Type: 0x48, Name: "Version"},
_gen_wiretype.FieldType{Type: 0x2, Name: "IsRoot"},
_gen_wiretype.FieldType{Type: 0x4a, Name: "Value"},
- _gen_wiretype.FieldType{Type: 0x4e, Name: "Tags"},
- _gen_wiretype.FieldType{Type: 0x50, Name: "Dir"},
+ _gen_wiretype.FieldType{Type: 0x4d, Name: "Tags"},
+ _gen_wiretype.FieldType{Type: 0x4f, Name: "Dir"},
},
- "raw.Mutation", []string(nil)},
+ "veyron/services/store/raw.Mutation", []string(nil)},
_gen_wiretype.StructType{
[]_gen_wiretype.FieldType{
- _gen_wiretype.FieldType{Type: 0x51, Name: "Mutation"},
+ _gen_wiretype.FieldType{Type: 0x50, Name: "Mutation"},
_gen_wiretype.FieldType{Type: 0x25, Name: "SyncTime"},
_gen_wiretype.FieldType{Type: 0x2, Name: "Delete"},
_gen_wiretype.FieldType{Type: 0x2, Name: "Continue"},
},
- "LogValue", []string(nil)},
+ "veyron/runtimes/google/vsync.LogValue", []string(nil)},
_gen_wiretype.StructType{
[]_gen_wiretype.FieldType{
_gen_wiretype.FieldType{Type: 0x41, Name: "DevID"},
@@ -285,9 +285,9 @@
_gen_wiretype.FieldType{Type: 0x47, Name: "ObjID"},
_gen_wiretype.FieldType{Type: 0x48, Name: "CurVers"},
_gen_wiretype.FieldType{Type: 0x49, Name: "Parents"},
- _gen_wiretype.FieldType{Type: 0x52, Name: "Value"},
+ _gen_wiretype.FieldType{Type: 0x51, Name: "Value"},
},
- "LogRec", []string(nil)},
+ "veyron/runtimes/google/vsync.LogRec", []string(nil)},
}
return result, nil
diff --git a/services/mgmt/application/application.idl b/services/mgmt/application/application.vdl
similarity index 100%
rename from services/mgmt/application/application.idl
rename to services/mgmt/application/application.vdl
diff --git a/services/mgmt/application/application.idl.go b/services/mgmt/application/application.vdl.go
similarity index 84%
rename from services/mgmt/application/application.idl.go
rename to services/mgmt/application/application.vdl.go
index 9ae6e21..59c82de 100644
--- a/services/mgmt/application/application.idl.go
+++ b/services/mgmt/application/application.vdl.go
@@ -1,4 +1,4 @@
-// This file was auto-generated by the veyron idl tool.
+// This file was auto-generated by the veyron vdl tool.
// Source: application.idl
// Package application contains implementation of the interface for
@@ -12,10 +12,10 @@
// The non-user imports are prefixed with "_gen_" to prevent collisions.
_gen_veyron2 "veyron2"
- _gen_idl "veyron2/idl"
_gen_ipc "veyron2/ipc"
_gen_naming "veyron2/naming"
_gen_rt "veyron2/rt"
+ _gen_vdl "veyron2/vdl"
_gen_wiretype "veyron2/wiretype"
)
@@ -28,13 +28,26 @@
// to enable embedding without method collisions. Not to be used directly by
// clients.
type Repository_InternalNoTagGetter interface {
- application.Repository_InternalNoTagGetter
+ // Repository provides access to application envelopes. An
+ // application envelope is identified by an application name and an
+ // application version, which are specified through the veyron name,
+ // and a profile name, which is specified using a method argument.
+ //
+ // Example:
+ // /apps/search/v1.Match([]string{"base", "media"})
+ // returns an application envelope that can be used for downloading
+ // and executing the "search" application, version "v1", runnable
+ // on either the "base" or "media" profile.
+ //
+ // Further, we envision that there will be special "latest" and
+ // "release" versions that will be symbolic links whose mapping is
+ // maintained by a mount table.
+ application.Repository_InternalNoTagGetter
// Put adds the given tuple of application version (specified
// through the veyron name suffix) and application envelope to all
// of the given application profiles.
Put(Profiles []string, Envelope application.Envelope, opts ..._gen_ipc.ClientCallOpt) (err error)
-
// Remove removes the application envelope for the given profile
// name and application version (specified through the veyron name
// suffix). If no version is specified as part of the suffix, the
@@ -45,7 +58,7 @@
Remove(Profile string, opts ..._gen_ipc.ClientCallOpt) (err error)
}
type Repository interface {
- _gen_idl.TagGetter
+ _gen_vdl.TagGetter
// UnresolveStep returns the names for the remote service, rooted at the
// service's immediate namespace ancestor.
UnresolveStep(opts ..._gen_ipc.ClientCallOpt) ([]string, error)
@@ -54,13 +67,26 @@
// RepositoryService is the interface the server implements.
type RepositoryService interface {
- application.RepositoryService
+ // Repository provides access to application envelopes. An
+ // application envelope is identified by an application name and an
+ // application version, which are specified through the veyron name,
+ // and a profile name, which is specified using a method argument.
+ //
+ // Example:
+ // /apps/search/v1.Match([]string{"base", "media"})
+ // returns an application envelope that can be used for downloading
+ // and executing the "search" application, version "v1", runnable
+ // on either the "base" or "media" profile.
+ //
+ // Further, we envision that there will be special "latest" and
+ // "release" versions that will be symbolic links whose mapping is
+ // maintained by a mount table.
+ application.RepositoryService
// Put adds the given tuple of application version (specified
// through the veyron name suffix) and application envelope to all
// of the given application profiles.
Put(context _gen_ipc.Context, Profiles []string, Envelope application.Envelope) (err error)
-
// Remove removes the application envelope for the given profile
// name and application version (specified through the veyron name
// suffix). If no version is specified as part of the suffix, the
@@ -88,10 +114,10 @@
case _gen_ipc.Client:
client = o
default:
- return nil, _gen_idl.ErrUnrecognizedOption
+ return nil, _gen_vdl.ErrUnrecognizedOption
}
default:
- return nil, _gen_idl.ErrTooManyOptionsToBind
+ return nil, _gen_vdl.ErrTooManyOptionsToBind
}
stub := &clientStubRepository{client: client, name: name}
stub.Repository_InternalNoTagGetter, _ = application.BindRepository(name, client)
@@ -188,14 +214,14 @@
},
}
- result.TypeDefs = []_gen_idl.AnyData{
+ result.TypeDefs = []_gen_vdl.Any{
_gen_wiretype.StructType{
[]_gen_wiretype.FieldType{
_gen_wiretype.FieldType{Type: 0x3d, Name: "Args"},
_gen_wiretype.FieldType{Type: 0x3, Name: "Binary"},
_gen_wiretype.FieldType{Type: 0x3d, Name: "Env"},
},
- "public.Envelope", []string(nil)},
+ "veyron2/services/mgmt/application.Envelope", []string(nil)},
_gen_wiretype.NamedPrimitiveType{Type: 0x1, Name: "error", Tags: []string(nil)}}
var ss _gen_ipc.ServiceSignature
var firstAdded int
diff --git a/services/mgmt/profile/profile.idl b/services/mgmt/profile/profile.vdl
similarity index 98%
rename from services/mgmt/profile/profile.idl
rename to services/mgmt/profile/profile.vdl
index 493c9b5..80f3a7b 100644
--- a/services/mgmt/profile/profile.idl
+++ b/services/mgmt/profile/profile.vdl
@@ -34,7 +34,7 @@
// Format is the file format of the application binary.
Format Format
// Libraries is a set of libraries the application binary depends on.
- Libraries map[Library]struct{}
+ Libraries set[Library]
// A human-friendly concise label for the profile, e.g. "linux-media"
Label string
// A human-friendly description of the profile.
diff --git a/services/mgmt/profile/profile.idl.go b/services/mgmt/profile/profile.vdl.go
similarity index 89%
rename from services/mgmt/profile/profile.idl.go
rename to services/mgmt/profile/profile.vdl.go
index fcd8683..2c3ba6a 100644
--- a/services/mgmt/profile/profile.idl.go
+++ b/services/mgmt/profile/profile.vdl.go
@@ -1,4 +1,4 @@
-// This file was auto-generated by the veyron idl tool.
+// This file was auto-generated by the veyron vdl tool.
// Source: profile.idl
// Package profile contains implementation and internal interfaces and
@@ -12,10 +12,10 @@
// The non-user imports are prefixed with "_gen_" to prevent collisions.
_gen_veyron2 "veyron2"
- _gen_idl "veyron2/idl"
_gen_ipc "veyron2/ipc"
_gen_naming "veyron2/naming"
_gen_rt "veyron2/rt"
+ _gen_vdl "veyron2/vdl"
_gen_wiretype "veyron2/wiretype"
)
@@ -46,8 +46,7 @@
// Format is the file format of the application binary.
Format Format
// Libraries is a set of libraries the application binary depends on.
- Libraries map[Library]struct {
- }
+ Libraries map[Library]struct{}
// A human-friendly concise label for the profile, e.g. "linux-media"
Label string
// A human-friendly description of the profile.
@@ -63,22 +62,24 @@
// to enable embedding without method collisions. Not to be used directly by
// clients.
type Profile_InternalNoTagGetter interface {
- profile.Profile_InternalNoTagGetter
+ // Profile abstracts a device's ability to run binaries, and hides
+ // specifics such as operating system, hardware architecture, and the
+ // set of installed libraries. Profiles describe binaries and devices,
+ // and are used to match them.
+ profile.Profile_InternalNoTagGetter
// Specification returns the profile specification for the profile
// identified through the veyron name suffix.
Specification(opts ..._gen_ipc.ClientCallOpt) (reply Specification, err error)
-
// Put sets the profile specification for the profile identified
// through the veyron name suffix.
Put(Specification Specification, opts ..._gen_ipc.ClientCallOpt) (err error)
-
// Remove removes the profile specification for the profile
// identified through the veyron name suffix.
Remove(opts ..._gen_ipc.ClientCallOpt) (err error)
}
type Profile interface {
- _gen_idl.TagGetter
+ _gen_vdl.TagGetter
// UnresolveStep returns the names for the remote service, rooted at the
// service's immediate namespace ancestor.
UnresolveStep(opts ..._gen_ipc.ClientCallOpt) ([]string, error)
@@ -87,16 +88,18 @@
// ProfileService is the interface the server implements.
type ProfileService interface {
- profile.ProfileService
+ // Profile abstracts a device's ability to run binaries, and hides
+ // specifics such as operating system, hardware architecture, and the
+ // set of installed libraries. Profiles describe binaries and devices,
+ // and are used to match them.
+ profile.ProfileService
// Specification returns the profile specification for the profile
// identified through the veyron name suffix.
Specification(context _gen_ipc.Context) (reply Specification, err error)
-
// Put sets the profile specification for the profile identified
// through the veyron name suffix.
Put(context _gen_ipc.Context, Specification Specification) (err error)
-
// Remove removes the profile specification for the profile
// identified through the veyron name suffix.
Remove(context _gen_ipc.Context) (err error)
@@ -119,10 +122,10 @@
case _gen_ipc.Client:
client = o
default:
- return nil, _gen_idl.ErrUnrecognizedOption
+ return nil, _gen_vdl.ErrUnrecognizedOption
}
default:
- return nil, _gen_idl.ErrTooManyOptionsToBind
+ return nil, _gen_vdl.ErrTooManyOptionsToBind
}
stub := &clientStubProfile{client: client, name: name}
stub.Profile_InternalNoTagGetter, _ = profile.BindProfile(name, client)
@@ -214,51 +217,48 @@
result := _gen_ipc.ServiceSignature{Methods: make(map[string]_gen_ipc.MethodSignature)}
result.Methods["Put"] = _gen_ipc.MethodSignature{
InArgs: []_gen_ipc.MethodArgument{
- {Name: "Specification", Type: 70},
+ {Name: "Specification", Type: 69},
},
OutArgs: []_gen_ipc.MethodArgument{
- {Name: "", Type: 71},
+ {Name: "", Type: 70},
},
}
result.Methods["Remove"] = _gen_ipc.MethodSignature{
InArgs: []_gen_ipc.MethodArgument{},
OutArgs: []_gen_ipc.MethodArgument{
- {Name: "", Type: 71},
+ {Name: "", Type: 70},
},
}
result.Methods["Specification"] = _gen_ipc.MethodSignature{
InArgs: []_gen_ipc.MethodArgument{},
OutArgs: []_gen_ipc.MethodArgument{
+ {Name: "", Type: 69},
{Name: "", Type: 70},
- {Name: "", Type: 71},
},
}
- result.TypeDefs = []_gen_idl.AnyData{
+ result.TypeDefs = []_gen_vdl.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"},
_gen_wiretype.FieldType{Type: 0x41, Name: "Attributes"},
},
- "Format", []string(nil)},
+ "veyron/services/mgmt/profile.Format", []string(nil)},
_gen_wiretype.StructType{
[]_gen_wiretype.FieldType{
_gen_wiretype.FieldType{Type: 0x3, Name: "Name"},
_gen_wiretype.FieldType{Type: 0x3, Name: "MajorVersion"},
_gen_wiretype.FieldType{Type: 0x3, Name: "MinorVersion"},
},
- "Library", []string(nil)},
- _gen_wiretype.StructType{
- nil,
- "", []string(nil)},
- _gen_wiretype.MapType{Key: 0x43, Elem: 0x44, Name: "", Tags: []string(nil)}, _gen_wiretype.StructType{
+ "veyron/services/mgmt/profile.Library", []string(nil)},
+ _gen_wiretype.MapType{Key: 0x43, Elem: 0x2, Name: "", Tags: []string(nil)}, _gen_wiretype.StructType{
[]_gen_wiretype.FieldType{
_gen_wiretype.FieldType{Type: 0x42, Name: "Format"},
- _gen_wiretype.FieldType{Type: 0x45, Name: "Libraries"},
+ _gen_wiretype.FieldType{Type: 0x44, Name: "Libraries"},
_gen_wiretype.FieldType{Type: 0x3, Name: "Label"},
_gen_wiretype.FieldType{Type: 0x3, Name: "Description"},
},
- "Specification", []string(nil)},
+ "veyron/services/mgmt/profile.Specification", []string(nil)},
_gen_wiretype.NamedPrimitiveType{Type: 0x1, Name: "error", Tags: []string(nil)}}
var ss _gen_ipc.ServiceSignature
var firstAdded int
diff --git a/services/mgmt/root/root.idl b/services/mgmt/root/root.vdl
similarity index 100%
rename from services/mgmt/root/root.idl
rename to services/mgmt/root/root.vdl
diff --git a/services/mgmt/root/root.idl.go b/services/mgmt/root/root.vdl.go
similarity index 95%
rename from services/mgmt/root/root.idl.go
rename to services/mgmt/root/root.vdl.go
index 28bad0f..a8b4217 100644
--- a/services/mgmt/root/root.idl.go
+++ b/services/mgmt/root/root.vdl.go
@@ -1,4 +1,4 @@
-// This file was auto-generated by the veyron idl tool.
+// This file was auto-generated by the veyron vdl tool.
// Source: root.idl
// Package root contains root process implementation and internal
@@ -8,10 +8,10 @@
import (
// The non-user imports are prefixed with "_gen_" to prevent collisions.
_gen_veyron2 "veyron2"
- _gen_idl "veyron2/idl"
_gen_ipc "veyron2/ipc"
_gen_naming "veyron2/naming"
_gen_rt "veyron2/rt"
+ _gen_vdl "veyron2/vdl"
_gen_wiretype "veyron2/wiretype"
)
@@ -29,7 +29,7 @@
Reset(Deadline uint64, opts ..._gen_ipc.ClientCallOpt) (err error)
}
type Root interface {
- _gen_idl.TagGetter
+ _gen_vdl.TagGetter
// UnresolveStep returns the names for the remote service, rooted at the
// service's immediate namespace ancestor.
UnresolveStep(opts ..._gen_ipc.ClientCallOpt) ([]string, error)
@@ -61,10 +61,10 @@
case _gen_ipc.Client:
client = o
default:
- return nil, _gen_idl.ErrUnrecognizedOption
+ return nil, _gen_vdl.ErrUnrecognizedOption
}
default:
- return nil, _gen_idl.ErrTooManyOptionsToBind
+ return nil, _gen_vdl.ErrTooManyOptionsToBind
}
stub := &clientStubRoot{client: client, name: name}
@@ -135,7 +135,7 @@
},
}
- result.TypeDefs = []_gen_idl.AnyData{
+ result.TypeDefs = []_gen_vdl.Any{
_gen_wiretype.NamedPrimitiveType{Type: 0x1, Name: "error", Tags: []string(nil)}}
return result, nil
diff --git a/services/mounttable/lib/collection_test.idl b/services/mounttable/lib/collection_test.vdl
similarity index 100%
rename from services/mounttable/lib/collection_test.idl
rename to services/mounttable/lib/collection_test.vdl
diff --git a/services/mounttable/lib/collection_test.idl.go b/services/mounttable/lib/collection_test.vdl.go
similarity index 96%
rename from services/mounttable/lib/collection_test.idl.go
rename to services/mounttable/lib/collection_test.vdl.go
index 3e84b01..7798184 100644
--- a/services/mounttable/lib/collection_test.idl.go
+++ b/services/mounttable/lib/collection_test.vdl.go
@@ -1,4 +1,4 @@
-// This file was auto-generated by the veyron idl tool.
+// This file was auto-generated by the veyron vdl tool.
// Source: collection_test.idl
package mounttable
@@ -6,10 +6,10 @@
import (
// The non-user imports are prefixed with "_gen_" to prevent collisions.
_gen_veyron2 "veyron2"
- _gen_idl "veyron2/idl"
_gen_ipc "veyron2/ipc"
_gen_naming "veyron2/naming"
_gen_rt "veyron2/rt"
+ _gen_vdl "veyron2/vdl"
_gen_wiretype "veyron2/wiretype"
)
@@ -25,13 +25,12 @@
// otherwise the call fails with an error. The Val must be no larger than
// MaxSize bytes.
Export(Val string, Overwrite bool, opts ..._gen_ipc.ClientCallOpt) (err error)
-
// Lookup retrieves the value associated with a name. Returns an error if
// there is no such binding.
Lookup(opts ..._gen_ipc.ClientCallOpt) (reply []byte, err error)
}
type Collection interface {
- _gen_idl.TagGetter
+ _gen_vdl.TagGetter
// UnresolveStep returns the names for the remote service, rooted at the
// service's immediate namespace ancestor.
UnresolveStep(opts ..._gen_ipc.ClientCallOpt) ([]string, error)
@@ -46,7 +45,6 @@
// otherwise the call fails with an error. The Val must be no larger than
// MaxSize bytes.
Export(context _gen_ipc.Context, Val string, Overwrite bool) (err error)
-
// Lookup retrieves the value associated with a name. Returns an error if
// there is no such binding.
Lookup(context _gen_ipc.Context) (reply []byte, err error)
@@ -69,10 +67,10 @@
case _gen_ipc.Client:
client = o
default:
- return nil, _gen_idl.ErrUnrecognizedOption
+ return nil, _gen_vdl.ErrUnrecognizedOption
}
default:
- return nil, _gen_idl.ErrTooManyOptionsToBind
+ return nil, _gen_vdl.ErrTooManyOptionsToBind
}
stub := &clientStubCollection{client: client, name: name}
@@ -162,7 +160,7 @@
},
}
- result.TypeDefs = []_gen_idl.AnyData{
+ result.TypeDefs = []_gen_vdl.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/store/memstore/query/eval.go b/services/store/memstore/query/eval.go
index 1de2738..c7fad68 100644
--- a/services/store/memstore/query/eval.go
+++ b/services/store/memstore/query/eval.go
@@ -12,13 +12,13 @@
"veyron/services/store/memstore/state"
"veyron/services/store/service"
- "veyron2/idl"
"veyron2/naming"
"veyron2/query"
"veyron2/query/parse"
"veyron2/security"
"veyron2/services/store"
"veyron2/storage"
+ "veyron2/vdl"
)
// maxChannelSize is the maximum size of the channels used for concurrent
@@ -473,7 +473,7 @@
func (e *selectionEvaluator) processSubpipelines(c *context, result *store.QueryResult) bool {
sel := &store.QueryResult{
Name: result.Name,
- Fields: make(map[string]idl.AnyData),
+ Fields: make(map[string]vdl.Any),
}
for _, a := range e.subpipelines {
// We create a new channel for each intermediate result, so there's no need to
@@ -813,7 +813,7 @@
return entry.Value
}
-func mapKeys(m map[string]idl.AnyData) string {
+func mapKeys(m map[string]vdl.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 fff4b4f..d77ac4a 100644
--- a/services/store/memstore/query/eval_test.go
+++ b/services/store/memstore/query/eval_test.go
@@ -5,8 +5,8 @@
"reflect"
"testing"
"time"
- "veyron2/idl"
"veyron2/services/store"
+ "veyron2/vdl"
"veyron/services/store/memstore/state"
@@ -160,25 +160,25 @@
{
"", "'teams/cardinals' | {Name}",
[]*store.QueryResult{
- &store.QueryResult{0, "teams/cardinals", map[string]idl.AnyData{"Name": "cardinals"}, nil},
+ &store.QueryResult{0, "teams/cardinals", map[string]vdl.Any{"Name": "cardinals"}, nil},
},
},
{
"teams", "'cardinals' | {Name}",
[]*store.QueryResult{
- &store.QueryResult{0, "cardinals", map[string]idl.AnyData{"Name": "cardinals"}, nil},
+ &store.QueryResult{0, "cardinals", map[string]vdl.Any{"Name": "cardinals"}, nil},
},
},
{
"teams/cardinals", ". | {Name}",
[]*store.QueryResult{
- &store.QueryResult{0, "", map[string]idl.AnyData{"Name": "cardinals"}, nil},
+ &store.QueryResult{0, "", map[string]vdl.Any{"Name": "cardinals"}, nil},
},
},
{
"", "'teams/cardinals' | {Name as Name}",
[]*store.QueryResult{
- &store.QueryResult{0, "teams/cardinals", map[string]idl.AnyData{"Name": "cardinals"}, nil},
+ &store.QueryResult{0, "teams/cardinals", map[string]vdl.Any{"Name": "cardinals"}, nil},
},
},
{
@@ -187,7 +187,7 @@
&store.QueryResult{
0,
"teams/cardinals",
- map[string]idl.AnyData{
+ map[string]vdl.Any{
"myname": "cardinals",
"myloc": "CA",
},
@@ -200,7 +200,7 @@
&store.QueryResult{
0,
"teams/cardinals",
- map[string]idl.AnyData{
+ map[string]vdl.Any{
"myname": "cardinals",
"myloc": "CA",
},
diff --git a/services/store/raw/service.idl b/services/store/raw/service.vdl
similarity index 98%
rename from services/store/raw/service.idl
rename to services/store/raw/service.vdl
index ec3f695..9d02376 100644
--- a/services/store/raw/service.idl
+++ b/services/store/raw/service.vdl
@@ -35,7 +35,7 @@
IsRoot bool
// Value is value stored at this entry.
- Value anydata
+ Value any
// Tags specify permissions on this entry.
Tags storage.TagList
diff --git a/services/store/raw/service.idl.go b/services/store/raw/service.vdl.go
similarity index 88%
rename from services/store/raw/service.idl.go
rename to services/store/raw/service.vdl.go
index 99b932a..9401bbc 100644
--- a/services/store/raw/service.idl.go
+++ b/services/store/raw/service.vdl.go
@@ -1,4 +1,4 @@
-// This file was auto-generated by the veyron idl tool.
+// This file was auto-generated by the veyron vdl tool.
// Source: service.idl
/*
@@ -14,10 +14,10 @@
// The non-user imports are prefixed with "_gen_" to prevent collisions.
_gen_veyron2 "veyron2"
- _gen_idl "veyron2/idl"
_gen_ipc "veyron2/ipc"
_gen_naming "veyron2/naming"
_gen_rt "veyron2/rt"
+ _gen_vdl "veyron2/vdl"
_gen_wiretype "veyron2/wiretype"
)
@@ -37,7 +37,7 @@
// 2) The entry is the store root immediately after the update.
IsRoot bool
// Value is value stored at this entry.
- Value _gen_idl.AnyData
+ Value _gen_vdl.Any
// Tags specify permissions on this entry.
Tags storage.TagList
// Dir is the implicit directory of this entry, and may contain references
@@ -59,15 +59,17 @@
// to enable embedding without method collisions. Not to be used directly by
// clients.
type Store_InternalNoTagGetter interface {
- watch.Watcher_InternalNoTagGetter
+ // Watcher allows a client to receive updates for changes to objects
+ // that match a query. See the package comments for details.
+ watch.Watcher_InternalNoTagGetter
// PutMutations atomically commits a stream of Mutations when the stream is
// closed. Mutations are not committed if the request is cancelled before
// the stream has been closed.
PutMutations(opts ..._gen_ipc.ClientCallOpt) (reply StorePutMutationsStream, err error)
}
type Store interface {
- _gen_idl.TagGetter
+ _gen_vdl.TagGetter
// UnresolveStep returns the names for the remote service, rooted at the
// service's immediate namespace ancestor.
UnresolveStep(opts ..._gen_ipc.ClientCallOpt) ([]string, error)
@@ -76,8 +78,10 @@
// StoreService is the interface the server implements.
type StoreService interface {
- watch.WatcherService
+ // Watcher allows a client to receive updates for changes to objects
+ // that match a query. See the package comments for details.
+ watch.WatcherService
// PutMutations atomically commits a stream of Mutations when the stream is
// closed. Mutations are not committed if the request is cancelled before
// the stream has been closed.
@@ -166,10 +170,10 @@
case _gen_ipc.Client:
client = o
default:
- return nil, _gen_idl.ErrUnrecognizedOption
+ return nil, _gen_vdl.ErrUnrecognizedOption
}
default:
- return nil, _gen_idl.ErrTooManyOptionsToBind
+ return nil, _gen_vdl.ErrTooManyOptionsToBind
}
stub := &clientStubStore{client: client, name: name}
stub.Watcher_InternalNoTagGetter, _ = watch.BindWatcher(name, client)
@@ -240,33 +244,33 @@
OutArgs: []_gen_ipc.MethodArgument{
{Name: "", Type: 65},
},
- InStream: 76,
+ InStream: 75,
}
- result.TypeDefs = []_gen_idl.AnyData{
- _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: 0x10, Name: "storage.ID", Tags: []string(nil)}, _gen_wiretype.NamedPrimitiveType{Type: 0x35, Name: "storage.Version", Tags: []string(nil)}, _gen_wiretype.NamedPrimitiveType{Type: 0x1, Name: "anydata", Tags: []string(nil)}, _gen_wiretype.NamedPrimitiveType{Type: 0x32, Name: "TagOp", Tags: []string(nil)}, _gen_wiretype.ArrayType{Elem: 0x42, Len: 0x10, Name: "ID", Tags: []string(nil)}, _gen_wiretype.StructType{
+ result.TypeDefs = []_gen_vdl.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: 0x10, Name: "veyron2/storage.ID", Tags: []string(nil)}, _gen_wiretype.NamedPrimitiveType{Type: 0x35, Name: "veyron2/storage.Version", 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: 0x46, Name: "Op"},
- _gen_wiretype.FieldType{Type: 0x47, Name: "ACL"},
+ _gen_wiretype.FieldType{Type: 0x43, Name: "ACL"},
},
- "Tag", []string(nil)},
- _gen_wiretype.SliceType{Elem: 0x48, Name: "storage.TagList", Tags: []string(nil)}, _gen_wiretype.StructType{
+ "veyron2/storage.Tag", []string(nil)},
+ _gen_wiretype.SliceType{Elem: 0x47, Name: "veyron2/storage.TagList", Tags: []string(nil)}, _gen_wiretype.StructType{
[]_gen_wiretype.FieldType{
_gen_wiretype.FieldType{Type: 0x3, Name: "Name"},
- _gen_wiretype.FieldType{Type: 0x47, Name: "ID"},
+ _gen_wiretype.FieldType{Type: 0x43, Name: "ID"},
},
- "storage.DEntry", []string(nil)},
- _gen_wiretype.SliceType{Elem: 0x4a, Name: "", Tags: []string(nil)}, _gen_wiretype.StructType{
+ "veyron2/storage.DEntry", []string(nil)},
+ _gen_wiretype.SliceType{Elem: 0x49, Name: "", Tags: []string(nil)}, _gen_wiretype.StructType{
[]_gen_wiretype.FieldType{
_gen_wiretype.FieldType{Type: 0x43, Name: "ID"},
_gen_wiretype.FieldType{Type: 0x44, Name: "PriorVersion"},
_gen_wiretype.FieldType{Type: 0x44, Name: "Version"},
_gen_wiretype.FieldType{Type: 0x2, Name: "IsRoot"},
_gen_wiretype.FieldType{Type: 0x45, Name: "Value"},
- _gen_wiretype.FieldType{Type: 0x49, Name: "Tags"},
- _gen_wiretype.FieldType{Type: 0x4b, Name: "Dir"},
+ _gen_wiretype.FieldType{Type: 0x48, Name: "Tags"},
+ _gen_wiretype.FieldType{Type: 0x4a, Name: "Dir"},
},
- "Mutation", []string(nil)},
+ "veyron/services/store/raw.Mutation", []string(nil)},
}
var ss _gen_ipc.ServiceSignature
var firstAdded int
diff --git a/services/store/server/object.go b/services/store/server/object.go
index 7e86e45..5ec1fa2 100644
--- a/services/store/server/object.go
+++ b/services/store/server/object.go
@@ -5,12 +5,12 @@
"veyron/services/store/service"
- "veyron2/idl"
"veyron2/ipc"
"veyron2/query"
"veyron2/services/mounttable"
"veyron2/services/store"
"veyron2/storage"
+ "veyron2/vdl"
)
type object struct {
@@ -64,7 +64,7 @@
}
}
-func attrsFromAnyData(attrs []idl.AnyData) ([]storage.Attr, error) {
+func attrsFromAnyData(attrs []vdl.Any) ([]storage.Attr, error) {
typedAttrs := make([]storage.Attr, len(attrs))
for i, x := range attrs {
a, ok := x.(storage.Attr)
@@ -76,8 +76,8 @@
return typedAttrs, nil
}
-func attrsToAnyData(attrs []storage.Attr) []idl.AnyData {
- uattrs := make([]idl.AnyData, len(attrs))
+func attrsToAnyData(attrs []storage.Attr) []vdl.Any {
+ uattrs := make([]vdl.Any, len(attrs))
for i, x := range attrs {
uattrs[i] = x
}
@@ -109,7 +109,7 @@
}
// Put modifies the value of the Object.
-func (o *object) Put(ctx ipc.Context, tid store.TransactionID, val idl.AnyData) (store.Stat, error) {
+func (o *object) Put(ctx ipc.Context, tid store.TransactionID, val vdl.Any) (store.Stat, error) {
t, ok := o.server.findTransaction(tid)
if !ok {
return nullStat, errTransactionDoesNotExist
@@ -133,7 +133,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.Context, tid store.TransactionID, attrs []idl.AnyData) error {
+func (o *object) SetAttr(ctx ipc.Context, tid store.TransactionID, attrs []vdl.Any) error {
t, ok := o.server.findTransaction(tid)
if !ok {
return errTransactionDoesNotExist
diff --git a/services/store/server/server.go b/services/store/server/server.go
index c148638..3a02f25 100644
--- a/services/store/server/server.go
+++ b/services/store/server/server.go
@@ -11,12 +11,12 @@
"veyron/services/store/raw"
"veyron/services/store/service"
- "veyron2/idl"
"veyron2/ipc"
"veyron2/security"
"veyron2/services/store"
"veyron2/services/watch"
"veyron2/storage"
+ "veyron2/vdl"
)
const (
@@ -152,7 +152,7 @@
}
// CreateTransaction creates a transaction.
-func (s *Server) CreateTransaction(_ ipc.Context, id store.TransactionID, opts []idl.AnyData) error {
+func (s *Server) CreateTransaction(_ ipc.Context, id store.TransactionID, opts []vdl.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 ac5a057..9dcf697 100644
--- a/services/wspr/wsprd/lib/signature.go
+++ b/services/wspr/wsprd/lib/signature.go
@@ -3,8 +3,8 @@
import (
"fmt"
- "veyron2/idl"
"veyron2/ipc"
+ "veyron2/vdl"
"veyron2/wiretype"
)
@@ -15,7 +15,7 @@
var (
anydataType = wiretype.NamedPrimitiveType{
- Name: "veyron2/idl.AnyData",
+ Name: "veyron2/vdl.AnyData",
Type: wiretype.TypeIDInterface,
}
errType = wiretype.NamedPrimitiveType{
@@ -93,7 +93,7 @@
ss.Methods[uppercaseFirstCharacter(name)] = ms
}
- ss.TypeDefs = []idl.AnyData{anydataType, errType}
+ ss.TypeDefs = []vdl.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 d2b0a35..db9a5a4 100644
--- a/services/wspr/wsprd/lib/signature_manager_test.go
+++ b/services/wspr/wsprd/lib/signature_manager_test.go
@@ -5,8 +5,8 @@
"testing"
mocks_ipc "veyron/runtimes/google/testing/mocks/ipc"
- "veyron2/idl"
"veyron2/ipc"
+ "veyron2/vdl"
"veyron2/wiretype"
)
@@ -17,9 +17,9 @@
func expectedSignature() ipc.ServiceSignature {
return ipc.ServiceSignature{
Methods: make(map[string]ipc.MethodSignature),
- TypeDefs: []idl.AnyData{
+ TypeDefs: []vdl.Any{
wiretype.NamedPrimitiveType{
- Name: "veyron2/idl.AnyData",
+ Name: "veyron2/vdl.AnyData",
Type: wiretype.TypeIDInterface,
},
},
diff --git a/services/wspr/wsprd/lib/signature_test.go b/services/wspr/wsprd/lib/signature_test.go
index 5e1f6cf..70f5803 100644
--- a/services/wspr/wsprd/lib/signature_test.go
+++ b/services/wspr/wsprd/lib/signature_test.go
@@ -4,8 +4,8 @@
"reflect"
"testing"
- "veyron2/idl"
"veyron2/ipc"
+ "veyron2/vdl"
"veyron2/wiretype"
)
@@ -44,7 +44,7 @@
OutStream: wiretype.TypeIDString,
},
},
- TypeDefs: []idl.AnyData{
+ TypeDefs: []vdl.Any{
anydataType,
errType,
},
@@ -105,7 +105,7 @@
OutStream: anydataTypeID,
},
},
- TypeDefs: []idl.AnyData{
+ TypeDefs: []vdl.Any{
anydataType,
errType,
},
diff --git a/services/wspr/wsprd/lib/wspr_test.go b/services/wspr/wsprd/lib/wspr_test.go
index 609d6b4..5177c94 100644
--- a/services/wspr/wsprd/lib/wspr_test.go
+++ b/services/wspr/wsprd/lib/wspr_test.go
@@ -6,10 +6,10 @@
"reflect"
"testing"
"veyron2"
- "veyron2/idl"
"veyron2/ipc"
"veyron2/naming"
"veyron2/rt"
+ "veyron2/vdl"
"veyron2/verror"
"veyron2/vlog"
"veyron2/wiretype"
@@ -80,7 +80,7 @@
InStream: 36,
OutStream: 36,
}
- result.TypeDefs = []idl.AnyData{
+ result.TypeDefs = []vdl.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 1bd148b..2547d20 100644
--- a/tools/vrpc/impl/impl.go
+++ b/tools/vrpc/impl/impl.go
@@ -9,9 +9,9 @@
idl_test_base "veyron/tools/vrpc/test_base"
"veyron2"
- "veyron2/idl"
"veyron2/ipc"
"veyron2/rt"
+ "veyron2/vdl"
"veyron2/vom"
"veyron2/wiretype"
@@ -221,8 +221,8 @@
}
// formatWiretype generates a string representation of the specified type.
-func formatWiretype(td []idl.AnyData, tid wiretype.TypeID) string {
- var wt idl.AnyData
+func formatWiretype(td []vdl.Any, tid wiretype.TypeID) string {
+ var wt vdl.Any
if tid >= wiretype.TypeIDFirst {
wt = td[tid-wiretype.TypeIDFirst]
} else {
@@ -266,7 +266,7 @@
}
}
-func formatSignature(name string, ms ipc.MethodSignature, defs []idl.AnyData) string {
+func formatSignature(name string, ms ipc.MethodSignature, defs []vdl.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.idl b/tools/vrpc/test_base/test_base.vdl
similarity index 100%
rename from tools/vrpc/test_base/test_base.idl
rename to tools/vrpc/test_base/test_base.vdl
diff --git a/tools/vrpc/test_base/test_base.idl.go b/tools/vrpc/test_base/test_base.vdl.go
similarity index 98%
rename from tools/vrpc/test_base/test_base.idl.go
rename to tools/vrpc/test_base/test_base.vdl.go
index fc3f670..b67f60b 100644
--- a/tools/vrpc/test_base/test_base.idl.go
+++ b/tools/vrpc/test_base/test_base.vdl.go
@@ -1,4 +1,4 @@
-// This file was auto-generated by the veyron idl tool.
+// This file was auto-generated by the veyron vdl tool.
// Source: test_base.idl
package test_base
@@ -6,10 +6,10 @@
import (
// The non-user imports are prefixed with "_gen_" to prevent collisions.
_gen_veyron2 "veyron2"
- _gen_idl "veyron2/idl"
_gen_ipc "veyron2/ipc"
_gen_naming "veyron2/naming"
_gen_rt "veyron2/rt"
+ _gen_vdl "veyron2/vdl"
_gen_wiretype "veyron2/wiretype"
)
@@ -27,50 +27,31 @@
// Methods to test support for generic types.
Bool(I1 bool, opts ..._gen_ipc.ClientCallOpt) (reply bool, err error)
-
Float32(I1 float32, opts ..._gen_ipc.ClientCallOpt) (reply float32, err error)
-
Float64(I1 float64, opts ..._gen_ipc.ClientCallOpt) (reply float64, err error)
-
Int32(I1 int32, opts ..._gen_ipc.ClientCallOpt) (reply int32, err error)
-
Int64(I1 int64, opts ..._gen_ipc.ClientCallOpt) (reply int64, err error)
-
String(I1 string, opts ..._gen_ipc.ClientCallOpt) (reply string, err error)
-
Byte(I1 byte, opts ..._gen_ipc.ClientCallOpt) (reply byte, err error)
-
UInt32(I1 uint32, opts ..._gen_ipc.ClientCallOpt) (reply uint32, err error)
-
UInt64(I1 uint64, opts ..._gen_ipc.ClientCallOpt) (reply uint64, err error)
-
// Methods to test support for composite types.
InputArray(I1 [2]byte, opts ..._gen_ipc.ClientCallOpt) (err error)
-
InputMap(I1 map[byte]byte, opts ..._gen_ipc.ClientCallOpt) (err error)
-
InputSlice(I1 []byte, opts ..._gen_ipc.ClientCallOpt) (err error)
-
InputStruct(I1 Struct, opts ..._gen_ipc.ClientCallOpt) (err error)
-
OutputArray(opts ..._gen_ipc.ClientCallOpt) (reply [2]byte, err error)
-
OutputMap(opts ..._gen_ipc.ClientCallOpt) (reply map[byte]byte, err error)
-
OutputSlice(opts ..._gen_ipc.ClientCallOpt) (reply []byte, err error)
-
OutputStruct(opts ..._gen_ipc.ClientCallOpt) (reply Struct, err error)
-
// Methods to test support for different number of arguments.
NoArguments(opts ..._gen_ipc.ClientCallOpt) (err error)
-
MultipleArguments(I1 int32, I2 int32, opts ..._gen_ipc.ClientCallOpt) (O1 int32, O2 int32, err error)
-
// Methods to test support for streaming.
StreamingOutput(NumStreamItems int32, StreamItem bool, opts ..._gen_ipc.ClientCallOpt) (reply TypeTesterStreamingOutputStream, err error)
}
type TypeTester interface {
- _gen_idl.TagGetter
+ _gen_vdl.TagGetter
// UnresolveStep returns the names for the remote service, rooted at the
// service's immediate namespace ancestor.
UnresolveStep(opts ..._gen_ipc.ClientCallOpt) ([]string, error)
@@ -82,45 +63,26 @@
// Methods to test support for generic types.
Bool(context _gen_ipc.Context, I1 bool) (reply bool, err error)
-
Float32(context _gen_ipc.Context, I1 float32) (reply float32, err error)
-
Float64(context _gen_ipc.Context, I1 float64) (reply float64, err error)
-
Int32(context _gen_ipc.Context, I1 int32) (reply int32, err error)
-
Int64(context _gen_ipc.Context, I1 int64) (reply int64, err error)
-
String(context _gen_ipc.Context, I1 string) (reply string, err error)
-
Byte(context _gen_ipc.Context, I1 byte) (reply byte, err error)
-
UInt32(context _gen_ipc.Context, I1 uint32) (reply uint32, err error)
-
UInt64(context _gen_ipc.Context, I1 uint64) (reply uint64, err error)
-
// Methods to test support for composite types.
InputArray(context _gen_ipc.Context, I1 [2]byte) (err error)
-
InputMap(context _gen_ipc.Context, I1 map[byte]byte) (err error)
-
InputSlice(context _gen_ipc.Context, I1 []byte) (err error)
-
InputStruct(context _gen_ipc.Context, I1 Struct) (err error)
-
OutputArray(context _gen_ipc.Context) (reply [2]byte, err error)
-
OutputMap(context _gen_ipc.Context) (reply map[byte]byte, err error)
-
OutputSlice(context _gen_ipc.Context) (reply []byte, err error)
-
OutputStruct(context _gen_ipc.Context) (reply Struct, err error)
-
// Methods to test support for different number of arguments.
NoArguments(context _gen_ipc.Context) (err error)
-
MultipleArguments(context _gen_ipc.Context, I1 int32, I2 int32) (O1 int32, O2 int32, err error)
-
// Methods to test support for streaming.
StreamingOutput(context _gen_ipc.Context, NumStreamItems int32, StreamItem bool, stream TypeTesterServiceStreamingOutputStream) (err error)
}
@@ -196,10 +158,10 @@
case _gen_ipc.Client:
client = o
default:
- return nil, _gen_idl.ErrUnrecognizedOption
+ return nil, _gen_vdl.ErrUnrecognizedOption
}
default:
- return nil, _gen_idl.ErrTooManyOptionsToBind
+ return nil, _gen_vdl.ErrTooManyOptionsToBind
}
stub := &clientStubTypeTester{client: client, name: name}
@@ -638,13 +600,13 @@
},
}
- result.TypeDefs = []_gen_idl.AnyData{
+ result.TypeDefs = []_gen_vdl.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"},
_gen_wiretype.FieldType{Type: 0x24, Name: "Y"},
},
- "Struct", []string(nil)},
+ "veyron/tools/vrpc/test_base.Struct", []string(nil)},
}
return result, nil