MCPcopy
hub / github.com/safing/portmaster / Instance

Struct Instance

spn/instance.go:39–82  ·  view source on GitHub ↗

Instance is an instance of a Portmaster service.

Source from the content-addressed store, hash-verified

37
38// Instance is an instance of a Portmaster service.
39type Instance struct {
40 ctx context.Context
41 cancelCtx context.CancelFunc
42
43 shutdownCtx context.Context
44 cancelShutdownCtx context.CancelFunc
45
46 serviceGroup *mgr.Group
47
48 binDir string
49 dataDir string
50
51 exitCode atomic.Int32
52
53 base *base.Base
54 database *dbmodule.DBModule
55 config *config.Config
56 api *api.API
57 metrics *metrics.Metrics
58 runtime *runtime.Runtime
59 rng *rng.Rng
60
61 core *core.Core
62 binaryUpdates *updates.Updater
63 intelUpdates *updates.Updater
64 geoip *geoip.GeoIP
65 netenv *netenv.NetEnv
66 filterLists *filterlists.FilterLists
67
68 access *access.Access
69 cabin *cabin.Cabin
70 navigator *navigator.Navigator
71 captain *captain.Captain
72 crew *crew.Crew
73 docks *docks.Docks
74 patrol *patrol.Patrol
75 ships *ships.Ships
76 sluice *sluice.SluiceModule
77 terminal *terminal.TerminalModule
78 ui *ui.UI
79
80 CommandLineOperation func() error
81 ShouldRestart bool
82}
83
84// New returns a new Portmaster service instance.
85func New(svcCfg *service.ServiceConfig) (*Instance, error) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected