MCPcopy Create free account
hub / github.com/CyCoreSystems/ari-proxy / deviceStateList

Method deviceStateList

server/device.go:39–49  ·  view source on GitHub ↗
(ctx context.Context, reply string, req *proxy.Request)

Source from the content-addressed store, hash-verified

37}
38
39func (s *Server) deviceStateList(ctx context.Context, reply string, req *proxy.Request) {
40 list, err := s.ari.DeviceState().List(nil)
41 if err != nil {
42 s.sendError(reply, err)
43 return
44 }
45
46 s.publish(reply, &proxy.Response{
47 Keys: list,
48 })
49}
50
51func (s *Server) deviceStateUpdate(ctx context.Context, reply string, req *proxy.Request) {
52 s.sendError(reply, s.ari.DeviceState().Update(req.Key, req.DeviceStateUpdate.State))

Callers

nothing calls this directly

Calls 4

sendErrorMethod · 0.95
publishMethod · 0.95
DeviceStateMethod · 0.80
ListMethod · 0.65

Tested by

no test coverage detected