MCPcopy
hub / github.com/nextdns/nextdns / Command

Method Command

ctl/server.go:56–63  ·  view source on GitHub ↗
(cmd string, h func(data any) any)

Source from the content-addressed store, hash-verified

54}
55
56func (s *Server) Command(cmd string, h func(data any) any) {
57 s.mu.Lock()
58 defer s.mu.Unlock()
59 if s.cmds == nil {
60 s.cmds = map[string]func(data any) any{}
61 }
62 s.cmds[cmd] = h
63}
64
65// Broadcast broadcasts e to all connected clients.
66func (s *Server) Broadcast(e Event) error {

Callers 15

runFunction · 0.95
cfgFunction · 0.80
installerFunction · 0.80
GetFunction · 0.80
GetFunction · 0.80
GetFunction · 0.80
ModelFunction · 0.80
DNSFunction · 0.80
setDNSFunction · 0.80
listNetworkServicesFunction · 0.80
queryWindowsEventsFunction · 0.80
ModelFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected