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

trento-project / agent / 30531395988

30 Jul 2026 09:36AM UTC coverage: 76.134% (-0.005%) from 76.139%
30531395988

push

github

web-flow
Fix linter issues in pkg files (#628)

Signed-off-by: Antonio Gamez Diaz <antonio.gamez@suse.com>

44 of 54 new or added lines in 7 files covered. (81.48%)

203 existing lines in 21 files now uncovered.

7401 of 9721 relevant lines covered (76.13%)

16.01 hits per line

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

57.14
/pkg/factsengine/plugininterface/interface.go
1
// SPDX-FileCopyrightText: SUSE LLC
2
// SPDX-License-Identifier: Apache-2.0
3

4
package plugininterface
5

6
import (
7
        "context"
8
        "encoding/gob"
9
        "net/rpc"
10

11
        "github.com/hashicorp/go-plugin"
12
        "github.com/trento-project/agent/v3/pkg/factsengine/entities"
13
)
14

15
// TODO: move this to a common place in the pkg folder
16
// This is needed by the plugin system to be able to serialize the FactValue type.
17
//
18
//nolint:gochecknoinits
19
func init() {
1✔
20
        gob.Register(&entities.FactValueInt{})
1✔
21
        gob.Register(&entities.FactValueFloat{})
1✔
22
        gob.Register(&entities.FactValueString{})
1✔
23
        gob.Register(&entities.FactValueBool{})
1✔
24
        gob.Register(&entities.FactValueList{})
1✔
25
        gob.Register(&entities.FactValueMap{})
1✔
26
}
1✔
27

28
// Gatherer is the interface exposed as a plugin.
29
type Gatherer interface {
30
        Gather(context context.Context, factsRequests []entities.FactRequest) ([]entities.Fact, error)
31
}
32

33
// This is the implementation of plugin.Plugin.
34
type GathererPlugin struct {
35
        // Impl Injection
36
        Impl Gatherer
37
}
38

NEW
39
func (p *GathererPlugin) Server(*plugin.MuxBroker) (any, error) {
×
40
        return &GathererRPCServer{Impl: p.Impl}, nil
×
41
}
×
42

NEW
43
func (GathererPlugin) Client(_ *plugin.MuxBroker, c *rpc.Client) (any, error) {
×
44
        return GathererRPC{client: c}, nil
×
45
}
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc