MCPcopy Index your code
hub / github.com/cortexlabs/cortex / Deploy

Function Deploy

cli/cluster/deploy.go:28–48  ·  view source on GitHub ↗
(operatorConfig OperatorConfig, configPath string, deploymentBytesMap map[string][]byte, force bool)

Source from the content-addressed store, hash-verified

26)
27
28func Deploy(operatorConfig OperatorConfig, configPath string, deploymentBytesMap map[string][]byte, force bool) ([]schema.DeployResult, error) {
29 params := map[string]string{
30 "force": s.Bool(force),
31 "configFileName": filepath.Base(configPath),
32 }
33 uploadInput := &HTTPUploadInput{
34 Bytes: deploymentBytesMap,
35 }
36
37 response, err := HTTPUpload(operatorConfig, "/deploy", uploadInput, params)
38 if err != nil {
39 return nil, err
40 }
41
42 var deployResults []schema.DeployResult
43 if err := json.Unmarshal(response, &deployResults); err != nil {
44 return nil, errors.Wrap(err, "/deploy", string(response))
45 }
46
47 return deployResults, nil
48}

Callers 1

deploy.goFile · 0.92

Calls 3

UnmarshalFunction · 0.92
WrapFunction · 0.92
HTTPUploadFunction · 0.85

Tested by

no test coverage detected