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

trento-project / agent / 17289932118

28 Aug 2025 08:12AM UTC coverage: 71.392% (-1.8%) from 73.158%
17289932118

push

github

web-flow
Bump go 1.25 (#480)

4487 of 6285 relevant lines covered (71.39%)

18.8 hits per line

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

0.0
/pkg/factsengine/plugininterface/interface.go
1
package plugininterface
2

3
import (
4
        "context"
5
        "encoding/gob"
6
        "net/rpc"
7

8
        "github.com/hashicorp/go-plugin"
9
        "github.com/trento-project/agent/pkg/factsengine/entities"
10
)
11

12
// TODO: move this to a common place in the pkg folder
13
// This is needed by the plugin system to be able to serialize the FactValue type
14
func init() {
×
15
        gob.Register(&entities.FactValueInt{})
×
16
        gob.Register(&entities.FactValueFloat{})
×
17
        gob.Register(&entities.FactValueString{})
×
18
        gob.Register(&entities.FactValueBool{})
×
19
        gob.Register(&entities.FactValueList{})
×
20
        gob.Register(&entities.FactValueMap{})
×
21
}
×
22

23
// Gatherer is the interface exposed as a plugin.
24
type Gatherer interface {
25
        Gather(context context.Context, factsRequests []entities.FactRequest) ([]entities.Fact, error)
26
}
27

28
// This is the implementation of plugin.Plugin
29
type GathererPlugin struct {
30
        // Impl Injection
31
        Impl Gatherer
32
}
33

34
func (p *GathererPlugin) Server(*plugin.MuxBroker) (interface{}, error) {
×
35
        return &GathererRPCServer{Impl: p.Impl}, nil
×
36
}
×
37

38
func (GathererPlugin) Client(_ *plugin.MuxBroker, c *rpc.Client) (interface{}, error) {
×
39
        return GathererRPC{client: c}, nil
×
40
}
×
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

© 2026 Coveralls, Inc