MCPcopy
hub / github.com/loft-sh/devpod / RefreshOptions

Method RefreshOptions

pkg/client/clientimplementation/proxy_client.go:142–165  ·  view source on GitHub ↗
(ctx context.Context, userOptionsRaw []string, reconfigure bool)

Source from the content-addressed store, hash-verified

140}
141
142func (s *proxyClient) RefreshOptions(ctx context.Context, userOptionsRaw []string, reconfigure bool) error {
143 s.m.Lock()
144 defer s.m.Unlock()
145
146 userOptions, err := provider.ParseOptions(userOptionsRaw)
147 if err != nil {
148 return perrors.Wrap(err, "parse options")
149 }
150
151 workspace, err := options.ResolveAndSaveOptionsProxy(ctx, s.devPodConfig, s.config, s.workspace, userOptions, s.log)
152 if err != nil {
153 return err
154 }
155
156 if reconfigure {
157 err := s.updateInstance(ctx)
158 if err != nil {
159 return err
160 }
161 }
162
163 s.workspace = workspace
164 return nil
165}
166
167func (s *proxyClient) Up(ctx context.Context, opt client.UpOptions) error {
168 reader, writer := io.Pipe()

Callers

nothing calls this directly

Calls 5

updateInstanceMethod · 0.95
ParseOptionsFunction · 0.92
LockMethod · 0.65
UnlockMethod · 0.65

Tested by

no test coverage detected