diff --git a/mark.go b/mark.go index 40d1304..231dcaf 100644 --- a/mark.go +++ b/mark.go @@ -16,10 +16,10 @@ package gomark import ( + "github.com/forrestjgq/glog" "github.com/forrestjgq/gomark/gmi" "github.com/forrestjgq/gomark/internal/gm" "github.com/forrestjgq/gomark/internal/httpsrv" - "github.com/forrestjgq/glog" ) // StartHTTPServer will create an http server for gomark. @@ -37,6 +37,16 @@ func Request(req *gmi.Request) *gmi.Response { return httpsrv.RequestHTTP(req) } +// EnableServer will make server accept all marks +func EnableServer() { + gm.EnableServer() +} + +// DisableServer will make server reject all marks +func DisableServer() { + gm.DisableServer() +} + // NewLatencyRecorder create a latency recorder. func NewLatencyRecorder(name string) gmi.Marker { var ret gmi.Marker