MCPcopy Create free account
hub / github.com/OpenIoTHub/server-go / AddOrUpdateHttpProxy

Method AddOrUpdateHttpProxy

manager/httpProxyStorage.go:45–51  ·  view source on GitHub ↗
(httpProxy *HttpProxy)

Source from the content-addressed store, hash-verified

43}
44
45func (sm *SessionsManager) AddOrUpdateHttpProxy(httpProxy *HttpProxy) error {
46 httpProxyBytes, err := json.Marshal(httpProxy)
47 if err != nil {
48 return err
49 }
50 return sm.HttpProxyRuntimeStorage.SetValueByKey(httpProxy.Domain, httpProxyBytes)
51}
52
53func (sm *SessionsManager) DelHttpProxy(domain string) {
54 sm.HttpProxyRuntimeStorage.DelValueByKey(domain)

Callers 5

CreateOneHTTPMethod · 0.95
UpdateOneHTTPMethod · 0.95
UpdateHttpProxyByMapMethod · 0.95
LoadConfigFromIoTManagerFunction · 0.80

Calls 1

SetValueByKeyMethod · 0.65

Tested by

no test coverage detected