MCPcopy
hub / github.com/keploy/keploy / Setup

Method Setup

pkg/client/app/app.go:61–83  ·  view source on GitHub ↗
(ctx context.Context)

Source from the content-addressed store, hash-verified

59}
60
61func (a *App) Setup(ctx context.Context) error {
62
63 if utils.IsDockerCmd(a.kind) && isDetachMode(a.logger, a.cmd, a.kind) {
64 return fmt.Errorf("application could not be started in detached mode")
65 }
66
67 switch a.kind {
68 case utils.DockerRun, utils.DockerStart:
69 err := a.SetupDocker()
70 if err != nil {
71 return err
72 }
73 case utils.DockerCompose:
74 extraArgs := agent.StartupAgentHook.GetArgs(ctx)
75 err := a.SetupCompose(extraArgs)
76 if err != nil {
77 return err
78 }
79 default:
80 // setup native binary
81 }
82 return nil
83}
84
85func (a *App) SetupDocker() error {
86

Callers 1

SetupMethod · 0.95

Calls 5

SetupDockerMethod · 0.95
SetupComposeMethod · 0.95
IsDockerCmdFunction · 0.92
isDetachModeFunction · 0.85
GetArgsMethod · 0.65

Tested by

no test coverage detected