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

Method Up

pkg/client/clientimplementation/proxy_client.go:167–199  ·  view source on GitHub ↗
(ctx context.Context, opt client.UpOptions)

Source from the content-addressed store, hash-verified

165}
166
167func (s *proxyClient) Up(ctx context.Context, opt client.UpOptions) error {
168 reader, writer := io.Pipe()
169 defer writer.Close()
170 go func() {
171 readLogStream(reader, s.log.ErrorStreamOnly())
172 }()
173
174 opts := EncodeOptions(opt.CLIOptions, DevPodFlagsUp)
175 if opt.Debug {
176 opts["DEBUG"] = "true"
177 }
178
179 err := RunCommandWithBinaries(
180 ctx,
181 "up",
182 s.config.Exec.Proxy.Up,
183 s.workspace.Context,
184 s.workspace,
185 nil,
186 s.devPodConfig.ProviderOptions(s.config.Name),
187 s.config,
188 opts,
189 opt.Stdin,
190 opt.Stdout,
191 writer,
192 s.log.ErrorStreamOnly(),
193 )
194 if err != nil {
195 return fmt.Errorf("error running devpod up: %w", err)
196 }
197
198 return nil
199}
200
201func (s *proxyClient) Ssh(ctx context.Context, opt client.SshOptions) error {
202 reader, writer := io.Pipe()

Callers

nothing calls this directly

Calls 7

readLogStreamFunction · 0.85
EncodeOptionsFunction · 0.85
RunCommandWithBinariesFunction · 0.85
CloseMethod · 0.45
ErrorStreamOnlyMethod · 0.45
ProviderOptionsMethod · 0.45
ErrorfMethod · 0.45

Tested by

no test coverage detected