MCPcopy Index your code
hub / github.com/dagger/dagger / startEbpfProgram

Function startEbpfProgram

cmd/engine/main.go:107–121  ·  view source on GitHub ↗
(ctx context.Context, prog ebpfProgram)

Source from the content-addressed store, hash-verified

105}
106
107func startEbpfProgram(ctx context.Context, prog ebpfProgram) func() {
108 tracer, err := prog.new()
109 if err != nil {
110 slog.Debug("eBPF program disabled", "program", prog.name, "reason", err.Error())
111 return nil
112 }
113 tracerCtx, cancelTracer := context.WithCancel(ctx)
114 go tracer.Run(tracerCtx)
115 return func() {
116 cancelTracer()
117 if err := tracer.Close(); err != nil {
118 slog.Warn("eBPF program close failed", "program", prog.name, "error", err)
119 }
120 }
121}
122
123func addFlags(app *cli.App) {
124 defaultConf, err := defaultBuildkitConfig()

Callers 1

mainFunction · 0.85

Calls 5

DebugFunction · 0.92
WarnFunction · 0.92
RunMethod · 0.65
CloseMethod · 0.65
ErrorMethod · 0.45

Tested by

no test coverage detected