MCPcopy Index your code
hub / github.com/netdata/netdata / NewJSONParser

Function NewJSONParser

src/go/plugin/go.d/pkg/logs/json.go:25–32  ·  view source on GitHub ↗
(config JSONConfig, in io.Reader)

Source from the content-addressed store, hash-verified

23}
24
25func NewJSONParser(config JSONConfig, in io.Reader) (*JSONParser, error) {
26 parser := &JSONParser{
27 reader: bufio.NewReader(in),
28 mapping: config.Mapping,
29 buf: make([]byte, 0, 100),
30 }
31 return parser, nil
32}
33
34func (p *JSONParser) ReadLine(line LogLine) error {
35 row, err := p.reader.ReadSlice('\n')

Callers 4

NewParserFunction · 0.85
TestNewJSONParserFunction · 0.85
TestJSONParser_ReadLineFunction · 0.85
TestJSONParser_ParseFunction · 0.85

Calls

no outgoing calls

Tested by 3

TestNewJSONParserFunction · 0.68
TestJSONParser_ReadLineFunction · 0.68
TestJSONParser_ParseFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…