forked from akvorado/akvorado
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathroot.go
36 lines (31 loc) · 862 Bytes
/
root.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
// SPDX-FileCopyrightText: 2022 Free Mobile
// SPDX-License-Identifier: AGPL-3.0-only
// Package demoexporter simulates an exporter (NetFlow and SNMP)
package demoexporter
import (
"akvorado/common/reporter"
"akvorado/demoexporter/bmp"
"akvorado/demoexporter/flows"
"akvorado/demoexporter/snmp"
)
// Component represents the demo exporter service.
type Component struct {
r *reporter.Reporter
d *Dependencies
config Configuration
}
// Dependencies define the dependencies of the demo exporter service.
type Dependencies struct {
SNMP *snmp.Component
BMP *bmp.Component
Flows *flows.Component
}
// New creates a new demo exporter service.
func New(r *reporter.Reporter, config Configuration, dependencies Dependencies) (*Component, error) {
c := Component{
r: r,
d: &dependencies,
config: config,
}
return &c, nil
}