(_ context.Context)
| 985 | } |
| 986 | |
| 987 | func (p *Proxy) InitIntegrations(_ context.Context) error { |
| 988 | // initialize the integrations |
| 989 | for parserType, parser := range integrations.Registered { |
| 990 | logger := p.logger.With(zap.Any("Type", parserType)) |
| 991 | prs := parser.Initializer(logger) |
| 992 | p.Integrations[parserType] = prs |
| 993 | logger.Debug("initialized the parser integration", zap.String("ParserType", string(parserType))) |
| 994 | p.integrationsPriority = append(p.integrationsPriority, ParserPriority{Priority: parser.Priority, ParserType: parserType}) |
| 995 | } |
| 996 | sort.Slice(p.integrationsPriority, func(i, j int) bool { |
| 997 | return p.integrationsPriority[i].Priority > p.integrationsPriority[j].Priority |
| 998 | }) |
| 999 | return nil |
| 1000 | } |
| 1001 | |
| 1002 | // In proxy.go |
| 1003 | func (p *Proxy) StartProxy(ctx context.Context, opts agent.ProxyOptions) error { |
no test coverage detected