MCPcopy Index your code
hub / github.com/PasarGuard/node / New

Function New

controller/controller.go:39–47  ·  view source on GitHub ↗
(cfg *config.Config)

Source from the content-addressed store, hash-verified

37}
38
39func New(cfg *config.Config) *Controller {
40 _, cancel := context.WithCancel(context.Background())
41 return &Controller{
42 cfg: cfg,
43 apiPort: netutil.FindFreePort(),
44 metricPort: netutil.FindFreePort(),
45 cancelFunc: cancel,
46 }
47}
48
49func (c *Controller) ApiKey() uuid.UUID {
50 c.mu.RLock()

Callers 2

NewFunction · 0.92
NewFunction · 0.92

Calls 1

FindFreePortFunction · 0.92

Tested by

no test coverage detected