MCPcopy
hub / github.com/github/git-sizer / Function

Function Function

internal/pipe/function.go:24–30  ·  view source on GitHub ↗

Function returns a pipeline `Stage` that will run a `StageFunc` in a separate goroutine to process the data. See `StageFunc` for more information.

(name string, f StageFunc)

Source from the content-addressed store, hash-verified

22// a separate goroutine to process the data. See `StageFunc` for more
23// information.
24func Function(name string, f StageFunc) Stage {
25 return &goStage{
26 name: name,
27 f: f,
28 done: make(chan struct{}),
29 }
30}
31
32// goStage is a `Stage` that does its work by running an arbitrary
33// `stageFunc` in a goroutine.

Callers 15

NewObjectIterMethod · 0.92
NewBatchObjectIterMethod · 0.92
NewReferenceIterMethod · 0.92
TestFunctionFunction · 0.92
TestPipelineWithFunctionFunction · 0.92
seqFunctionFunction · 0.92
TestScannerAlwaysFlushesFunction · 0.92
TestScannerFinishEarlyFunction · 0.92
TestErrorsFunction · 0.92
BenchmarkTenFunctionsFunction · 0.92
BenchmarkTenMixedStagesFunction · 0.92
ScannerFunctionFunction · 0.85

Calls

no outgoing calls

Tested by 8

TestFunctionFunction · 0.74
TestPipelineWithFunctionFunction · 0.74
seqFunctionFunction · 0.74
TestScannerAlwaysFlushesFunction · 0.74
TestScannerFinishEarlyFunction · 0.74
TestErrorsFunction · 0.74
BenchmarkTenFunctionsFunction · 0.74
BenchmarkTenMixedStagesFunction · 0.74