Versions in this module Expand all Collapse all v0 v0.0.0 Dec 13, 2023 Changes in this version + const APIMetaMessageTypeError + const APIMetaMessageTypeInfo + const APIMetaMessageTypeWarning + const ServiceStopTimeout + const SlugJSONDecodeFailed + const SlugServiceAlreadyStarted + const SlugServiceNotInitialized + const SlugServiceNotReady + const SlugServiceNotStarted + const SlugServiceReady + const SlugServiceSetParamFailed + const SlugServiceStartFailed + const SlugServiceStopFailed + const SlugTypeError + var BandwidthPath = &serviceEndpointPath + var ErrServiceAlreadyStarted = errors.New(SlugServiceAlreadyStarted) + var ErrServiceNotInitialized = errors.New(SlugServiceNotInitialized) + var ErrServiceNotStarted = errors.New(SlugServiceNotStarted) + var ErrServiceStartFailed = errors.New(SlugServiceStartFailed) + var ErrServiceStopFailed = errors.New(SlugServiceStopFailed) + var LatencyPath = &serviceEndpointPath + var PacketlossPath = &serviceEndpointPath + var ServicesPath = &serviceEndpointPath + type BandwidthStartRequest struct + Limit int64 + NetworkInterfaceName string + type LatencyStartRequest struct + Jitter int64 + Latency int64 + NetworkInterfaceName string + type MetaMessage struct + Message string + Slug string + Title string + Type string + func (m MetaMessage) ToMap() map[string]interface{} + type PacketLossStartRequest struct + NetworkInterfaceName string + PacketLossRate int32 + type RESTApiV1 struct + func NewRESTApiV1(productionMode bool, logger *zap.Logger) *RESTApiV1 + func (a *RESTApiV1) BandwidthStart(resp http.ResponseWriter, req *http.Request) + func (a *RESTApiV1) BandwidthStatus(resp http.ResponseWriter, _ *http.Request) + func (a *RESTApiV1) BandwidthStop(resp http.ResponseWriter, req *http.Request) + func (a *RESTApiV1) GetAllAPIs() []string + func (a *RESTApiV1) IndexPage(resp http.ResponseWriter, _ *http.Request) + func (a *RESTApiV1) LatencyStart(resp http.ResponseWriter, req *http.Request) + func (a *RESTApiV1) LatencyStatus(resp http.ResponseWriter, _ *http.Request) + func (a *RESTApiV1) LatencyStop(resp http.ResponseWriter, req *http.Request) + func (a *RESTApiV1) NetServicesStatus(resp http.ResponseWriter, req *http.Request) + func (a *RESTApiV1) PacketlossStart(resp http.ResponseWriter, req *http.Request) + func (a *RESTApiV1) PacketlossStatus(resp http.ResponseWriter, _ *http.Request) + func (a *RESTApiV1) PacketlossStop(resp http.ResponseWriter, req *http.Request) + func (a *RESTApiV1) Serve(addr, originAllowed string) error + func (a *RESTApiV1) Shutdown() error + type ServiceStatus struct + Name string + NetworkInterfaceName string + Params map[string]interface{} + Ready bool