MCPcopy Index your code
hub / github.com/cloudflare/cloudflared / Start

Method Start

config/manager.go:48–60  ·  view source on GitHub ↗

Start starts the runloop to watch for config changes

(notifier Notifier)

Source from the content-addressed store, hash-verified

46
47// Start starts the runloop to watch for config changes
48func (m *FileManager) Start(notifier Notifier) error {
49 m.notifier = notifier
50
51 // update the notifier with a fresh config on start
52 config, err := m.GetConfig()
53 if err != nil {
54 return err
55 }
56 notifier.ConfigDidUpdate(config)
57
58 m.watcher.Start(m)
59 return nil
60}
61
62// GetConfig reads the yaml file from the disk
63func (m *FileManager) GetConfig() (Root, error) {

Callers 1

TestConfigChangedFunction · 0.95

Calls 3

GetConfigMethod · 0.95
ConfigDidUpdateMethod · 0.65
StartMethod · 0.65

Tested by 1

TestConfigChangedFunction · 0.76