Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4a5842b

Browse files
committed
rename ready to signalready
1 parent 6580f35 commit 4a5842b

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

agent/agent.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1172,7 +1172,7 @@ func (a *agent) handleManifest(manifestOK *checkpoint) func(ctx context.Context,
11721172
// Inform the container API that the agent is ready.
11731173
// This allows us to start watching for changes to
11741174
// the devcontainer configuration files.
1175-
a.containerAPI.Ready()
1175+
a.containerAPI.SignalReady()
11761176
}
11771177
})
11781178
if err != nil {

agent/agentcontainers/api.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -151,11 +151,11 @@ func NewAPI(logger slog.Logger, options ...Option) *API {
151151
return api
152152
}
153153

154-
// Ready signals the API that we are ready to begin watching for file
155-
// changes. This is used to prime the cache with the current list of
156-
// containers and to start watching the devcontainer config files for
154+
// SignalReady signals the API that we are ready to begin watching for
155+
// file changes. This is used to prime the cache with the current list
156+
// of containers and to start watching the devcontainer config files for
157157
// changes. It should be called after the agent ready.
158-
func (api *API) Ready() {
158+
func (api *API) SignalReady() {
159159
// Prime the cache with the current list of containers.
160160
_, _ = api.cl.List(api.ctx)
161161

agent/agentcontainers/api_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -634,7 +634,7 @@ func TestAPI(t *testing.T) {
634634
)
635635
defer api.Close()
636636

637-
api.Ready()
637+
api.SignalReady()
638638

639639
r := chi.NewRouter()
640640
r.Mount("/", api.Routes())

0 commit comments

Comments
 (0)