-package apiv1
+package xdsserver
import (
"net/http"
"github.com/gin-gonic/gin"
common "github.com/iotbzh/xds-common/golib"
- "github.com/iotbzh/xds-server/lib/xdsconfig"
+ "github.com/iotbzh/xds-server/lib/xsapiv1"
)
var confMut sync.Mutex
confMut.Lock()
defer confMut.Unlock()
- c.JSON(http.StatusOK, s.cfg)
+ c.JSON(http.StatusOK, s.Config)
}
// SetConfig sets server configuration
// FIXME - must be tested
c.JSON(http.StatusNotImplemented, "Not implemented")
- var cfgArg xdsconfig.Config
+ var cfgArg xsapiv1.APIConfig
if c.BindJSON(&cfgArg) != nil {
common.APIError(c, "Invalid arguments")
confMut.Lock()
defer confMut.Unlock()
- s.log.Debugln("SET config: ", cfgArg)
+ s.Log.Debugln("SET config: ", cfgArg)
common.APIError(c, "Not Supported")
}