• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

stillya / wg-relay / 17277209982

27 Aug 2025 07:52PM UTC coverage: 13.246% (+8.4%) from 4.874%
17277209982

Pull #3

github

stillya
added prom integration
Pull Request #3: Added metrics support

78 of 293 new or added lines in 11 files covered. (26.62%)

5 existing lines in 4 files now uncovered.

111 of 838 relevant lines covered (13.25%)

0.14 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/pkg/dataplane/maps/maps.go
1
package maps
2

3
import (
4
        "github.com/cilium/ebpf"
5
)
6

7
// MapInfo represents information about an eBPF map
8
type MapInfo struct {
9
        Name string
10
        Map  *ebpf.Map
11
}
12

13
// Maps holds collections of different types of eBPF maps
14
type Maps struct {
15
        Metrics *ebpf.Map // Metrics map
16
        Other   []MapInfo // Other maps (conntrack, etc.)
17
}
18

19
// NewMaps creates a new Maps collection
20
func NewMaps() *Maps {
×
21
        return &Maps{
×
22
                Other: make([]MapInfo, 0),
×
23
        }
×
24
}
×
25

26
// SetMetricsMap sets the main metrics map
NEW
27
func (m *Maps) SetMetricsMap(metricsMap *ebpf.Map) {
×
NEW
28
        m.Metrics = metricsMap
×
UNCOV
29
}
×
30

31
// AddOtherMap adds other types of maps
32
func (m *Maps) AddOtherMap(name string, ebpfMap *ebpf.Map) {
×
33
        m.Other = append(m.Other, MapInfo{
×
34
                Name: name,
×
35
                Map:  ebpfMap,
×
36
        })
×
37
}
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc