MCPcopy
hub / github.com/dreadl0ck/netcap / RegisterExtractor

Function RegisterExtractor

decoder/stream/file/framework.go:89–93  ·  view source on GitHub ↗

RegisterExtractor registers a file extractor for a specific protocol

(extractor FileExtractor)

Source from the content-addressed store, hash-verified

87
88// RegisterExtractor registers a file extractor for a specific protocol
89func RegisterExtractor(extractor FileExtractor) {
90 registry.mu.Lock()
91 defer registry.mu.Unlock()
92 registry.extractors[extractor.ProtocolName()] = extractor
93}
94
95// GetExtractor retrieves a file extractor for the given protocol
96func GetExtractor(protocol string) (FileExtractor, bool) {

Callers 7

initFunction · 0.92
initFunction · 0.92
initFunction · 0.92
initFunction · 0.92
initFunction · 0.92
TestRegisterExtractorFunction · 0.85
TestListExtractorsFunction · 0.85

Calls 1

ProtocolNameMethod · 0.65

Tested by 2

TestRegisterExtractorFunction · 0.68
TestListExtractorsFunction · 0.68