Skip to content

Commit

Permalink
rename
Browse files Browse the repository at this point in the history
  • Loading branch information
phuhao00 committed Jun 28, 2023
1 parent cf106ca commit 97f0bb5
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
10 changes: 5 additions & 5 deletions aop/babysitter/babysitter.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import (
"greatestworks/aop/proxy"
"greatestworks/aop/retry"
"greatestworks/aop/status"
"greatestworks/aop/versioned"
"greatestworks/aop/versioned_map"
)

const (
Expand Down Expand Up @@ -71,8 +71,8 @@ type Babysitter struct {

mu sync.RWMutex
managed map[string][]*envelope.Envelope // replica envelopes, by group
appState *versioned.Map[*AppVersionState]
routingState *versioned.Map[*protos.RoutingInfo]
appState *versioned_map.Map[*AppVersionState]
routingState *versioned_map.Map[*protos.RoutingInfo]
proxies map[string]*proxyInfo // proxies, by listener name
}

Expand Down Expand Up @@ -113,8 +113,8 @@ func NewBabysitter(ctx context.Context, dep *protos.Deployment, logSaver func(*p
opts: envelope.Options{Restart: envelope.Never, Retry: retry.DefaultOptions},
dep: dep,
managed: map[string][]*envelope.Envelope{},
appState: versioned.NewMap[*AppVersionState](),
routingState: versioned.NewMap[*protos.RoutingInfo](),
appState: versioned_map.NewMap[*AppVersionState](),
routingState: versioned_map.NewMap[*protos.RoutingInfo](),
proxies: map[string]*proxyInfo{},
}
go b.statsProcessor.CollectMetrics(b.ctx, b.readMetrics)
Expand Down
2 changes: 1 addition & 1 deletion aop/net/call/resolver.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ type Resolver interface {
// // latest set of endpoints and its version.
// endpoints, version, err := resolver.Resolve(ctx, nil)
//
// // Perform a versioned Resolve that either (1) blocks until a set
// // Perform a versioned_map Resolve that either (1) blocks until a set
// // of endpoints exists with a version newer than `version`, or
// // (2) returns `version`, indicating that the Resolve should be
// // called again after an appropriate delay.
Expand Down
10 changes: 5 additions & 5 deletions aop/tool/ssh/impl/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ import (
"greatestworks/aop/retry"
"greatestworks/aop/status"
"greatestworks/aop/traceio"
"greatestworks/aop/versioned"
"greatestworks/aop/versioned_map"
)

const (
Expand Down Expand Up @@ -109,8 +109,8 @@ type manager struct {

mu sync.Mutex
started map[string]bool // colocation groups started, by group name
appState *versioned.Map[*AppVersionState]
routingState *versioned.Map[*protos.RoutingInfo]
appState *versioned_map.Map[*AppVersionState]
routingState *versioned_map.Map[*protos.RoutingInfo]
proxies map[string]*proxyInfo // proxies, by listener name
metrics map[groupReplicaInfo][]*protos.MetricSnapshot // latest metrics, by group name and replica id
}
Expand Down Expand Up @@ -168,8 +168,8 @@ func RunManager(ctx context.Context, dep *protos.Deployment, locations []string,
traceSaver: traceSaver,
statsProcessor: imetrics.NewStatsProcessor(),
started: map[string]bool{},
appState: versioned.NewMap[*AppVersionState](),
routingState: versioned.NewMap[*protos.RoutingInfo](),
appState: versioned_map.NewMap[*AppVersionState](),
routingState: versioned_map.NewMap[*protos.RoutingInfo](),
proxies: map[string]*proxyInfo{},
metrics: map[groupReplicaInfo][]*protos.MetricSnapshot{},
}
Expand Down
4 changes: 2 additions & 2 deletions aop/versioned_map/map.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package versioned
package versioned_map

import (
"context"
Expand All @@ -17,7 +17,7 @@ type versioned[T proto.Message] struct {
version string
}

// Map is a simple, versioned, map.
// Map is a simple, versioned_map, map.
type Map[T proto.Message] struct {
mu sync.Mutex
global int
Expand Down

0 comments on commit 97f0bb5

Please sign in to comment.