TBR x/ref: Rename ID->Id in VDL file
TBRing so nothing breaks before the tests finish
MultiPart: 3/3
Change-Id: If7482020c68457eeddfdd41e6b4394564be1cca8
diff --git a/examples/rps/rpsbot/impl.go b/examples/rps/rpsbot/impl.go
index 7fb6d02..969e898 100644
--- a/examples/rps/rpsbot/impl.go
+++ b/examples/rps/rpsbot/impl.go
@@ -34,19 +34,19 @@
return r.scoreKeeper
}
-func (r *RPS) CreateGame(call ipc.ServerCall, opts rps.GameOptions) (rps.GameID, error) {
+func (r *RPS) CreateGame(call ipc.ServerCall, opts rps.GameOptions) (rps.GameId, error) {
if vlog.V(1) {
b, _ := call.RemoteBlessings().ForCall(call)
vlog.Infof("CreateGame %+v from %v", opts, b)
}
names, _ := call.LocalBlessings().ForCall(call)
if len(names) == 0 {
- return rps.GameID{}, errors.New("no names provided for context")
+ return rps.GameId{}, errors.New("no names provided for context")
}
return r.judge.createGame(names[0], opts)
}
-func (r *RPS) Play(call rps.JudgePlayServerCall, id rps.GameID) (rps.PlayResult, error) {
+func (r *RPS) Play(call rps.JudgePlayServerCall, id rps.GameId) (rps.PlayResult, error) {
names, _ := call.RemoteBlessings().ForCall(call)
vlog.VI(1).Infof("Play %+v from %v", id, names)
if len(names) == 0 {
@@ -55,7 +55,7 @@
return r.judge.play(call, names[0], id)
}
-func (r *RPS) Challenge(call ipc.ServerCall, address string, id rps.GameID, opts rps.GameOptions) error {
+func (r *RPS) Challenge(call ipc.ServerCall, address string, id rps.GameId, opts rps.GameOptions) error {
b, _ := call.RemoteBlessings().ForCall(call)
vlog.VI(1).Infof("Challenge (%q, %+v, %+v) from %v", address, id, opts, b)
newctx, _ := vtrace.SetNewTrace(r.ctx)
diff --git a/examples/rps/rpsbot/judge.go b/examples/rps/rpsbot/judge.go
index 6eec5e3..5d57d2a 100644
--- a/examples/rps/rpsbot/judge.go
+++ b/examples/rps/rpsbot/judge.go
@@ -22,7 +22,7 @@
type Judge struct {
lock sync.Mutex
- games map[rps.GameID]*gameInfo
+ games map[rps.GameId]*gameInfo
gamesRun *counter.Counter
}
@@ -31,7 +31,7 @@
}
type gameInfo struct {
- id rps.GameID
+ id rps.GameId
startTime time.Time
score rps.ScoreCard
streams []sendStream
@@ -70,7 +70,7 @@
func NewJudge() *Judge {
return &Judge{
- games: make(map[rps.GameID]*gameInfo),
+ games: make(map[rps.GameId]*gameInfo),
gamesRun: stats.NewCounter("judge/games-run"),
}
}
@@ -80,11 +80,11 @@
}
// createGame handles a request to create a new game.
-func (j *Judge) createGame(ownName string, opts rps.GameOptions) (rps.GameID, error) {
+func (j *Judge) createGame(ownName string, opts rps.GameOptions) (rps.GameId, error) {
vlog.VI(1).Infof("createGame called")
score := rps.ScoreCard{Opts: opts, Judge: ownName}
now := time.Now()
- id := rps.GameID{ID: strconv.FormatInt(now.UnixNano(), 16)}
+ id := rps.GameId{Id: strconv.FormatInt(now.UnixNano(), 16)}
j.lock.Lock()
defer j.lock.Unlock()
@@ -109,7 +109,7 @@
}
// play interacts with a player for the duration of a game.
-func (j *Judge) play(call rps.JudgePlayServerCall, name string, id rps.GameID) (rps.PlayResult, error) {
+func (j *Judge) play(call rps.JudgePlayServerCall, name string, id rps.GameId) (rps.PlayResult, error) {
vlog.VI(1).Infof("play from %q for %v", name, id)
nilResult := rps.PlayResult{}
@@ -165,7 +165,7 @@
return rps.PlayResult{YouWon: scoreData.score.Winner == rps.WinnerTag(playerNum)}, nil
}
-func (j *Judge) manageGame(ctx *context.T, id rps.GameID) {
+func (j *Judge) manageGame(ctx *context.T, id rps.GameId) {
j.gamesRun.Incr(1)
j.lock.Lock()
info, exists := j.games[id]
@@ -272,7 +272,7 @@
return round, nil
}
-func (j *Judge) addPlayer(name string, id rps.GameID, stream rps.JudgePlayServerStream) (int, error) {
+func (j *Judge) addPlayer(name string, id rps.GameId, stream rps.JudgePlayServerStream) (int, error) {
j.lock.Lock()
defer j.lock.Unlock()
@@ -288,7 +288,7 @@
return len(info.streams), nil
}
-func (j *Judge) gameChannels(id rps.GameID) (chan playerInput, []chan rps.JudgeAction, chan scoreData, error) {
+func (j *Judge) gameChannels(id rps.GameId) (chan playerInput, []chan rps.JudgeAction, chan scoreData, error) {
j.lock.Lock()
defer j.lock.Unlock()
info, exists := j.games[id]
diff --git a/examples/rps/rpsbot/player.go b/examples/rps/rpsbot/player.go
index 4a02071..a66c17a 100644
--- a/examples/rps/rpsbot/player.go
+++ b/examples/rps/rpsbot/player.go
@@ -77,7 +77,7 @@
return nil
}
-func (p *Player) createGame(ctx *context.T, server string) (rps.GameID, rps.GameOptions, error) {
+func (p *Player) createGame(ctx *context.T, server string) (rps.GameId, rps.GameOptions, error) {
j := rps.RockPaperScissorsClient(server)
numRounds := 3 + rand.Intn(3)
gameType := rps.Classic
@@ -89,14 +89,14 @@
return gameId, gameOpts, err
}
-func (p *Player) sendChallenge(ctx *context.T, opponent, judge string, gameID rps.GameID, gameOpts rps.GameOptions) error {
+func (p *Player) sendChallenge(ctx *context.T, opponent, judge string, gameID rps.GameId, gameOpts rps.GameOptions) error {
o := rps.RockPaperScissorsClient(opponent)
return o.Challenge(ctx, judge, gameID, gameOpts)
}
// challenge receives an incoming challenge and starts to play a new game.
// Note that the new game will occur in a new context.
-func (p *Player) challenge(ctx *context.T, judge string, gameID rps.GameID, _ rps.GameOptions) error {
+func (p *Player) challenge(ctx *context.T, judge string, gameID rps.GameId, _ rps.GameOptions) error {
vlog.VI(1).Infof("challenge received: %s %v", judge, gameID)
go p.playGame(ctx, judge, gameID)
return nil
@@ -104,7 +104,7 @@
// playGame plays an entire game, which really only consists of reading
// commands from the server, and picking a random "move" when asked to.
-func (p *Player) playGame(outer *context.T, judge string, gameID rps.GameID) (rps.PlayResult, error) {
+func (p *Player) playGame(outer *context.T, judge string, gameID rps.GameId) (rps.PlayResult, error) {
ctx, cancel := context.WithTimeout(outer, 10*time.Minute)
defer cancel()
p.gamesInProgress.Incr(1)
diff --git a/examples/rps/rpsplayer/main.go b/examples/rps/rpsplayer/main.go
index 2b7b979..edc80ea 100644
--- a/examples/rps/rpsplayer/main.go
+++ b/examples/rps/rpsplayer/main.go
@@ -50,7 +50,7 @@
type gameChallenge struct {
address string
- id rps.GameID
+ id rps.GameId
opts rps.GameOptions
}
@@ -71,7 +71,7 @@
return prev
}
-func (i *impl) Challenge(call ipc.ServerCall, address string, id rps.GameID, opts rps.GameOptions) error {
+func (i *impl) Challenge(call ipc.ServerCall, address string, id rps.GameId, opts rps.GameOptions) error {
remote, _ := call.RemoteBlessings().ForCall(call)
vlog.VI(1).Infof("Challenge (%q, %+v) from %v", address, id, remote)
// When setDecline(true) returns, future challenges will be declined.
@@ -177,17 +177,17 @@
return nil
}
-func createGame(ctx *context.T, server string, opts rps.GameOptions) (rps.GameID, error) {
+func createGame(ctx *context.T, server string, opts rps.GameOptions) (rps.GameId, error) {
j := rps.RockPaperScissorsClient(server)
return j.CreateGame(ctx, opts)
}
-func sendChallenge(ctx *context.T, opponent, judge string, gameID rps.GameID, gameOpts rps.GameOptions) error {
+func sendChallenge(ctx *context.T, opponent, judge string, gameID rps.GameId, gameOpts rps.GameOptions) error {
o := rps.RockPaperScissorsClient(opponent)
return o.Challenge(ctx, judge, gameID, gameOpts)
}
-func playGame(outer *context.T, judge string, gameID rps.GameID) (rps.PlayResult, error) {
+func playGame(outer *context.T, judge string, gameID rps.GameId) (rps.PlayResult, error) {
ctx, cancel := context.WithTimeout(outer, 10*time.Minute)
defer cancel()
fmt.Println()
diff --git a/examples/rps/service.vdl b/examples/rps/service.vdl
index 9f09af9..674a0f4 100644
--- a/examples/rps/service.vdl
+++ b/examples/rps/service.vdl
@@ -25,14 +25,14 @@
type Judge 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) (GameID | error) {access.Write}
+ CreateGame(Opts GameOptions) (GameId | error) {access.Write}
// Play lets a player join an existing game and play.
- Play(ID GameID) stream<PlayerAction,JudgeAction> (PlayResult | error) {access.Write}
+ Play(Id GameId) stream<PlayerAction,JudgeAction> (PlayResult | error) {access.Write}
}
-// A GameID is used to uniquely identify a game within one Judge.
-type GameID struct {
- ID string
+// A GameId is used to uniquely identify a game within one Judge.
+type GameId struct {
+ Id string
}
// GameOptions specifies the parameters of a game.
@@ -91,7 +91,7 @@
type Player interface {
// Challenge is used by other players to challenge this player to a game. If
// the challenge is accepted, the method returns nil.
- Challenge(Address string, ID GameID, Opts GameOptions) error {access.Write}
+ Challenge(Address string, Id GameId, Opts GameOptions) error {access.Write}
}
// ScoreKeeper receives the outcome of games from Judges.
diff --git a/examples/rps/service.vdl.go b/examples/rps/service.vdl.go
index 1cb6535..5ff6e32 100644
--- a/examples/rps/service.vdl.go
+++ b/examples/rps/service.vdl.go
@@ -29,13 +29,13 @@
"v.io/v23/services/security/access"
)
-// A GameID is used to uniquely identify a game within one Judge.
-type GameID struct {
- ID string
+// A GameId is used to uniquely identify a game within one Judge.
+type GameId struct {
+ Id string
}
-func (GameID) __VDLReflect(struct {
- Name string "v.io/x/ref/examples/rps.GameID"
+func (GameId) __VDLReflect(struct {
+ Name string "v.io/x/ref/examples/rps.GameId"
}) {
}
@@ -219,7 +219,7 @@
}
func init() {
- vdl.Register((*GameID)(nil))
+ vdl.Register((*GameId)(nil))
vdl.Register((*GameOptions)(nil))
vdl.Register((*GameTypeTag)(nil))
vdl.Register((*PlayerAction)(nil))
@@ -247,9 +247,9 @@
type JudgeClientMethods 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(ctx *context.T, Opts GameOptions, opts ...ipc.CallOpt) (GameID, error)
+ CreateGame(ctx *context.T, Opts GameOptions, opts ...ipc.CallOpt) (GameId, error)
// Play lets a player join an existing game and play.
- Play(ctx *context.T, ID GameID, opts ...ipc.CallOpt) (JudgePlayClientCall, error)
+ Play(ctx *context.T, Id GameId, opts ...ipc.CallOpt) (JudgePlayClientCall, error)
}
// JudgeClientStub adds universal methods to JudgeClientMethods.
@@ -281,7 +281,7 @@
return v23.GetClient(ctx)
}
-func (c implJudgeClientStub) CreateGame(ctx *context.T, i0 GameOptions, opts ...ipc.CallOpt) (o0 GameID, err error) {
+func (c implJudgeClientStub) CreateGame(ctx *context.T, i0 GameOptions, opts ...ipc.CallOpt) (o0 GameId, err error) {
var call ipc.ClientCall
if call, err = c.c(ctx).StartCall(ctx, c.name, "CreateGame", []interface{}{i0}, opts...); err != nil {
return
@@ -290,7 +290,7 @@
return
}
-func (c implJudgeClientStub) Play(ctx *context.T, i0 GameID, opts ...ipc.CallOpt) (ocall JudgePlayClientCall, err error) {
+func (c implJudgeClientStub) Play(ctx *context.T, i0 GameId, opts ...ipc.CallOpt) (ocall JudgePlayClientCall, err error) {
var call ipc.ClientCall
if call, err = c.c(ctx).StartCall(ctx, c.name, "Play", []interface{}{i0}, opts...); err != nil {
return
@@ -406,9 +406,9 @@
type JudgeServerMethods 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(call ipc.ServerCall, Opts GameOptions) (GameID, error)
+ CreateGame(call ipc.ServerCall, Opts GameOptions) (GameId, error)
// Play lets a player join an existing game and play.
- Play(call JudgePlayServerCall, ID GameID) (PlayResult, error)
+ Play(call JudgePlayServerCall, Id GameId) (PlayResult, error)
}
// JudgeServerStubMethods is the server interface containing
@@ -418,9 +418,9 @@
type JudgeServerStubMethods 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(call ipc.ServerCall, Opts GameOptions) (GameID, error)
+ CreateGame(call ipc.ServerCall, Opts GameOptions) (GameId, error)
// Play lets a player join an existing game and play.
- Play(call *JudgePlayServerCallStub, ID GameID) (PlayResult, error)
+ Play(call *JudgePlayServerCallStub, Id GameId) (PlayResult, error)
}
// JudgeServerStub adds universal methods to JudgeServerStubMethods.
@@ -452,11 +452,11 @@
gs *ipc.GlobState
}
-func (s implJudgeServerStub) CreateGame(call ipc.ServerCall, i0 GameOptions) (GameID, error) {
+func (s implJudgeServerStub) CreateGame(call ipc.ServerCall, i0 GameOptions) (GameId, error) {
return s.impl.CreateGame(call, i0)
}
-func (s implJudgeServerStub) Play(call *JudgePlayServerCallStub, i0 GameID) (PlayResult, error) {
+func (s implJudgeServerStub) Play(call *JudgePlayServerCallStub, i0 GameId) (PlayResult, error) {
return s.impl.Play(call, i0)
}
@@ -483,7 +483,7 @@
{"Opts", ``}, // GameOptions
},
OutArgs: []ipc.ArgDesc{
- {"", ``}, // GameID
+ {"", ``}, // GameId
},
Tags: []*vdl.Value{vdl.ValueOf(access.Tag("Write"))},
},
@@ -491,7 +491,7 @@
Name: "Play",
Doc: "// Play lets a player join an existing game and play.",
InArgs: []ipc.ArgDesc{
- {"ID", ``}, // GameID
+ {"Id", ``}, // GameId
},
OutArgs: []ipc.ArgDesc{
{"", ``}, // PlayResult
@@ -592,7 +592,7 @@
type PlayerClientMethods interface {
// Challenge is used by other players to challenge this player to a game. If
// the challenge is accepted, the method returns nil.
- Challenge(ctx *context.T, Address string, ID GameID, Opts GameOptions, opts ...ipc.CallOpt) error
+ Challenge(ctx *context.T, Address string, Id GameId, Opts GameOptions, opts ...ipc.CallOpt) error
}
// PlayerClientStub adds universal methods to PlayerClientMethods.
@@ -624,7 +624,7 @@
return v23.GetClient(ctx)
}
-func (c implPlayerClientStub) Challenge(ctx *context.T, i0 string, i1 GameID, i2 GameOptions, opts ...ipc.CallOpt) (err error) {
+func (c implPlayerClientStub) Challenge(ctx *context.T, i0 string, i1 GameId, i2 GameOptions, opts ...ipc.CallOpt) (err error) {
var call ipc.ClientCall
if call, err = c.c(ctx).StartCall(ctx, c.name, "Challenge", []interface{}{i0, i1, i2}, opts...); err != nil {
return
@@ -640,7 +640,7 @@
type PlayerServerMethods interface {
// Challenge is used by other players to challenge this player to a game. If
// the challenge is accepted, the method returns nil.
- Challenge(call ipc.ServerCall, Address string, ID GameID, Opts GameOptions) error
+ Challenge(call ipc.ServerCall, Address string, Id GameId, Opts GameOptions) error
}
// PlayerServerStubMethods is the server interface containing
@@ -678,7 +678,7 @@
gs *ipc.GlobState
}
-func (s implPlayerServerStub) Challenge(call ipc.ServerCall, i0 string, i1 GameID, i2 GameOptions) error {
+func (s implPlayerServerStub) Challenge(call ipc.ServerCall, i0 string, i1 GameId, i2 GameOptions) error {
return s.impl.Challenge(call, i0, i1, i2)
}
@@ -704,7 +704,7 @@
Doc: "// Challenge is used by other players to challenge this player to a game. If\n// the challenge is accepted, the method returns nil.",
InArgs: []ipc.ArgDesc{
{"Address", ``}, // string
- {"ID", ``}, // GameID
+ {"Id", ``}, // GameId
{"Opts", ``}, // GameOptions
},
Tags: []*vdl.Value{vdl.ValueOf(access.Tag("Write"))},
diff --git a/lib/vdl/testdata/arith/arith.vdl b/lib/vdl/testdata/arith/arith.vdl
index 2554222..33c1632 100644
--- a/lib/vdl/testdata/arith/arith.vdl
+++ b/lib/vdl/testdata/arith/arith.vdl
@@ -1,8 +1,8 @@
-// Package arith is an example of an IDL definition in veyron. The syntax for
-// IDL files is similar to, but not identical to, Go. Here are the main
+// Package arith is an example of an IdL definition in veyron. The syntax for
+// IdL files is similar to, but not identical to, Go. Here are the main
// concepts:
// * PACKAGES - Just like in Go you must define the package at the beginning
-// of an IDL file, and everything defined in the file is part of this
+// of an IdL file, and everything defined in the file is part of this
// package. By convention all files in the same dir should be in the same
// package.
// * IMPORTS - Just like in Go you can import other idl packages, and you may
@@ -19,7 +19,7 @@
// just a set of methods. Interfaces can embed other interfaces. Unlike
// Go, you cannot use an interface as a data type; interfaces are purely
// method sets.
-// * ERRORS - Errors may be defined in IDL files, and unlike Go they work
+// * ERRORS - Errors may be defined in IdL files, and unlike Go they work
// across separate address spaces.
package arith
diff --git a/lib/vdl/testdata/arith/arith.vdl.go b/lib/vdl/testdata/arith/arith.vdl.go
index 08c4b7f..19bb57b 100644
--- a/lib/vdl/testdata/arith/arith.vdl.go
+++ b/lib/vdl/testdata/arith/arith.vdl.go
@@ -1,11 +1,11 @@
// This file was auto-generated by the veyron vdl tool.
// Source: arith.vdl
-// Package arith is an example of an IDL definition in veyron. The syntax for
-// IDL files is similar to, but not identical to, Go. Here are the main
+// Package arith is an example of an IdL definition in veyron. The syntax for
+// IdL files is similar to, but not identical to, Go. Here are the main
// concepts:
// * PACKAGES - Just like in Go you must define the package at the beginning
-// of an IDL file, and everything defined in the file is part of this
+// of an IdL file, and everything defined in the file is part of this
// package. By convention all files in the same dir should be in the same
// package.
// * IMPORTS - Just like in Go you can import other idl packages, and you may
@@ -22,7 +22,7 @@
// just a set of methods. Interfaces can embed other interfaces. Unlike
// Go, you cannot use an interface as a data type; interfaces are purely
// method sets.
-// * ERRORS - Errors may be defined in IDL files, and unlike Go they work
+// * ERRORS - Errors may be defined in IdL files, and unlike Go they work
// across separate address spaces.
package arith
diff --git a/profiles/internal/ipc/stream/proxy/protocol.vdl b/profiles/internal/ipc/stream/proxy/protocol.vdl
index d4ac8cb..0fe762b 100644
--- a/profiles/internal/ipc/stream/proxy/protocol.vdl
+++ b/profiles/internal/ipc/stream/proxy/protocol.vdl
@@ -9,7 +9,7 @@
// (4) The proxy immediately closes any other flows on the VC.
// Request is the message sent by a server to request that the proxy route
-// traffic intended for the server's RoutingID to the network connection
+// traffic intended for the server's RoutingId to the network connection
// between the server and the proxy.
type Request struct {
}
diff --git a/profiles/internal/ipc/stream/proxy/protocol.vdl.go b/profiles/internal/ipc/stream/proxy/protocol.vdl.go
index 073897e..7e0fb48 100644
--- a/profiles/internal/ipc/stream/proxy/protocol.vdl.go
+++ b/profiles/internal/ipc/stream/proxy/protocol.vdl.go
@@ -9,7 +9,7 @@
)
// Request is the message sent by a server to request that the proxy route
-// traffic intended for the server's RoutingID to the network connection
+// traffic intended for the server's RoutingId to the network connection
// between the server and the proxy.
type Request struct {
}
diff --git a/profiles/internal/vtrace/store.go b/profiles/internal/vtrace/store.go
index 1ac8d3c..edc5879 100644
--- a/profiles/internal/vtrace/store.go
+++ b/profiles/internal/vtrace/store.go
@@ -84,9 +84,9 @@
var ts *traceStore
if t.Flags&vtrace.CollectInMemory != 0 {
- ts = s.forceCollectLocked(t.Trace.ID)
+ ts = s.forceCollectLocked(t.Trace.Id)
} else {
- ts = s.traces[t.Trace.ID]
+ ts = s.traces[t.Trace.Id]
}
if ts != nil {
ts.merge(t.Trace.Spans)
@@ -166,7 +166,7 @@
return out
}
-// TraceRecord returns a TraceRecord for a given ID. Returns
+// TraceRecord returns a TraceRecord for a given Id. Returns
// nil if the given id is not present.
func (s *Store) TraceRecord(id uniqueid.Id) *vtrace.TraceRecord {
s.mu.Lock()
@@ -196,7 +196,7 @@
record, ok := ts.spans[s.id]
if !ok {
record = &vtrace.SpanRecord{
- ID: s.id,
+ Id: s.id,
Parent: s.parent,
Name: s.name,
Start: s.start,
@@ -228,8 +228,8 @@
// by assuming that children of parent need to start after parent
// and end before now.
for _, span := range spans {
- if ts.spans[span.ID] == nil {
- ts.spans[span.ID] = copySpanRecord(&span)
+ if ts.spans[span.Id] == nil {
+ ts.spans[span.Id] = copySpanRecord(&span)
}
}
}
@@ -255,7 +255,7 @@
func copySpanRecord(in *vtrace.SpanRecord) *vtrace.SpanRecord {
return &vtrace.SpanRecord{
- ID: in.ID,
+ Id: in.Id,
Parent: in.Parent,
Name: in.Name,
Start: in.Start,
@@ -269,6 +269,6 @@
for _, span := range ts.spans {
spans = append(spans, *copySpanRecord(span))
}
- out.ID = ts.id
+ out.Id = ts.id
out.Spans = spans
}
diff --git a/profiles/internal/vtrace/store_test.go b/profiles/internal/vtrace/store_test.go
index d9eb1fb..6b668e3 100644
--- a/profiles/internal/vtrace/store_test.go
+++ b/profiles/internal/vtrace/store_test.go
@@ -34,7 +34,7 @@
func recordids(records ...vtrace.TraceRecord) map[uniqueid.Id]bool {
out := make(map[uniqueid.Id]bool)
for _, trace := range records {
- out[trace.ID] = true
+ out[trace.Id] = true
}
return out
}
diff --git a/profiles/internal/vtrace/vtrace.go b/profiles/internal/vtrace/vtrace.go
index c35411b..c4ead0b 100644
--- a/profiles/internal/vtrace/vtrace.go
+++ b/profiles/internal/vtrace/vtrace.go
@@ -77,7 +77,7 @@
func (m manager) SetNewTrace(ctx *context.T) (*context.T, vtrace.Span) {
id, err := uniqueid.Random()
if err != nil {
- vlog.Errorf("vtrace: Couldn't generate Trace ID, debug data may be lost: %v", err)
+ vlog.Errorf("vtrace: Couldn't generate Trace Id, debug data may be lost: %v", err)
}
s := newSpan(id, "", id, getStore(ctx))
@@ -91,9 +91,9 @@
func (m manager) SetContinuedTrace(ctx *context.T, name string, req vtrace.Request) (*context.T, vtrace.Span) {
st := getStore(ctx)
if req.Flags&vtrace.CollectInMemory != 0 {
- st.ForceCollect(req.TraceID)
+ st.ForceCollect(req.TraceId)
}
- newSpan := newSpan(req.SpanID, name, req.TraceID, st)
+ newSpan := newSpan(req.SpanId, name, req.TraceId, st)
return context.WithValue(ctx, spanKey, newSpan), newSpan
}
@@ -124,8 +124,8 @@
func (m manager) GetRequest(ctx *context.T) vtrace.Request {
if span := getSpan(ctx); span != nil {
return vtrace.Request{
- SpanID: span.id,
- TraceID: span.trace,
+ SpanId: span.id,
+ TraceId: span.trace,
Flags: span.flags(),
}
}
diff --git a/profiles/internal/vtrace/vtrace_test.go b/profiles/internal/vtrace/vtrace_test.go
index 14afa92..e6481b0 100644
--- a/profiles/internal/vtrace/vtrace_test.go
+++ b/profiles/internal/vtrace/vtrace_test.go
@@ -147,7 +147,7 @@
// All spans should have a start.
if span.Start.IsZero() {
- t.Errorf("span missing start: %x, %s", span.ID[12:], traceString(&trace))
+ t.Errorf("span missing start: %x, %s", span.Id[12:], traceString(&trace))
}
// All spans except the root should have a valid end.
// TODO(mattr): For now I'm also skipping connectFlow and
@@ -160,9 +160,9 @@
span.Name != "<client>connectFlow" &&
span.Name != "vc.HandshakeDialedVC" {
if span.End.IsZero() {
- t.Errorf("span missing end: %x, %s", span.ID[12:], traceString(&trace))
+ t.Errorf("span missing end: %x, %s", span.Id[12:], traceString(&trace))
} else if !span.Start.Before(span.End) {
- t.Errorf("span end should be after start: %x, %s", span.ID[12:], traceString(&trace))
+ t.Errorf("span end should be after start: %x, %s", span.Id[12:], traceString(&trace))
}
}
@@ -185,7 +185,7 @@
t.Errorf("expected span %s not found in %#v", expectedSpans[i-1], summaries)
continue
}
- if child.Parent != parent.ID {
+ if child.Parent != parent.Id {
t.Errorf("%v should be a child of %v, but it's not.", child, parent)
}
}
diff --git a/services/mgmt/vtrace/impl/vtrace_test.go b/services/mgmt/vtrace/impl/vtrace_test.go
index 8a985c4..f2f1321 100644
--- a/services/mgmt/vtrace/impl/vtrace_test.go
+++ b/services/mgmt/vtrace/impl/vtrace_test.go
@@ -58,7 +58,7 @@
var tr *vtrace.TraceRecord
for stream.Advance() {
trace := stream.Value()
- if trace.ID == id {
+ if trace.Id == id {
tr = &trace
}
ntraces++
diff --git a/services/wsprd/ipc/server/dispatcher.go b/services/wsprd/ipc/server/dispatcher.go
index 2fdb00a..474ae77 100644
--- a/services/wsprd/ipc/server/dispatcher.go
+++ b/services/wsprd/ipc/server/dispatcher.go
@@ -45,14 +45,14 @@
}
type dispatcherRequest struct {
- ServerID uint32 `json:"serverId"`
+ ServerId uint32 `json:"serverId"`
Suffix string `json:"suffix"`
}
// dispatcher holds the invoker and the authorizer to be used for lookup.
type dispatcher struct {
mu sync.Mutex
- serverID uint32
+ serverId uint32
flowFactory flowFactory
invokerFactory invokerFactory
authFactory authFactory
@@ -62,9 +62,9 @@
var _ ipc.Dispatcher = (*dispatcher)(nil)
// newDispatcher is a dispatcher factory.
-func newDispatcher(serverID uint32, flowFactory flowFactory, invokerFactory invokerFactory, authFactory authFactory) *dispatcher {
+func newDispatcher(serverId uint32, flowFactory flowFactory, invokerFactory invokerFactory, authFactory authFactory) *dispatcher {
return &dispatcher{
- serverID: serverID,
+ serverId: serverId,
flowFactory: flowFactory,
invokerFactory: invokerFactory,
authFactory: authFactory,
@@ -91,7 +91,7 @@
d.mu.Unlock()
message := dispatcherRequest{
- ServerID: d.serverID,
+ ServerId: d.serverId,
Suffix: suffix,
}
if err := flow.Writer.Send(lib.ResponseDispatcherLookup, message); err != nil {
diff --git a/services/wsprd/ipc/server/server.go b/services/wsprd/ipc/server/server.go
index 7441d9d..ef4751f 100644
--- a/services/wsprd/ipc/server/server.go
+++ b/services/wsprd/ipc/server/server.go
@@ -67,7 +67,7 @@
// AuthRequest is a request for a javascript authorizer to run
// This is exported to make the app test easier.
type AuthRequest struct {
- ServerID uint32 `json:"serverID"`
+ ServerId uint32 `json:"serverId"`
Handle int32 `json:"handle"`
Call SecurityCall `json:"call"`
}
@@ -423,7 +423,7 @@
s.outstandingAuthRequests[flow.ID] = replyChan
s.outstandingRequestLock.Unlock()
message := AuthRequest{
- ServerID: s.id,
+ ServerId: s.id,
Handle: handle,
Call: securityCall,
}