MCPcopy
hub / github.com/passteque/gluetun / Loop

Struct Loop

internal/portforward/loop.go:13–34  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11)
12
13type Loop struct {
14 // State
15 settings Settings
16 settingsMutex sync.RWMutex
17 service Service
18 // Fixed injected objects
19 routing Routing
20 client *http.Client
21 portAllower PortAllower
22 logger Logger
23 cmder Cmder
24 // Fixed parameters
25 uid, gid int
26 // Internal channels and locks
27 // runCtx is used to detect when the loop has exited
28 // when performing an update
29 runCtx context.Context //nolint:containedctx
30 runCancel context.CancelFunc
31 runDone <-chan struct{}
32 updateTrigger chan<- Settings
33 updatedResult <-chan error
34}
35
36func NewLoop(settings settings.PortForwarding, routing Routing,
37 client *http.Client, portAllower PortAllower,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected