File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -53,7 +53,6 @@ type API struct {
53
53
cancel context.CancelFunc
54
54
watcherDone chan struct {}
55
55
updaterDone chan struct {}
56
- initDone chan struct {} // Closed after first update in updaterLoop.
57
56
updateTrigger chan chan error // Channel to trigger manual refresh.
58
57
updateInterval time.Duration // Interval for periodic container updates.
59
58
logger slog.Logger
@@ -73,7 +72,8 @@ type API struct {
73
72
workspaceName string
74
73
parentAgent string
75
74
76
- mu sync.RWMutex
75
+ mu sync.RWMutex // Protects the following fields.
76
+ initDone chan struct {} // Closed by Init.
77
77
closed bool
78
78
containers codersdk.WorkspaceAgentListContainersResponse // Output from the last list operation.
79
79
containersErr error // Error from the last list operation.
@@ -322,7 +322,7 @@ func NewAPI(logger slog.Logger, options ...Option) *API {
322
322
}
323
323
324
324
// Init applies a final set of options to the API and then
325
- // closes initDone. This function can only be called once.
325
+ // closes initDone. This method can only be called once.
326
326
func (api * API ) Init (opts ... Option ) {
327
327
api .mu .Lock ()
328
328
defer api .mu .Unlock ()
You can’t perform that action at this time.
0 commit comments