This commit is contained in:
Geno 2021-07-20 12:25:05 +02:00
parent 64ca86effa
commit d1605ee841
4 changed files with 25 additions and 29 deletions

View File

@ -1,8 +1,8 @@
package main package main
import ( import (
"flag"
"encoding/base64" "encoding/base64"
"flag"
"dev.sum7.eu/genofire/golang-lib/file" "dev.sum7.eu/genofire/golang-lib/file"
"github.com/bdlm/log" "github.com/bdlm/log"

View File

@ -2,9 +2,9 @@ package main
import ( import (
"encoding/json" "encoding/json"
"fmt"
"net/http" "net/http"
"time" "time"
"fmt"
) )
func (c *configData) Request(url string, value interface{}) error { func (c *configData) Request(url string, value interface{}) error {
@ -30,4 +30,3 @@ func (c *configData) Request(url string, value interface{}) error {
} }
return nil return nil
} }

View File

@ -8,7 +8,6 @@ const (
URLRequestListVHost = "/v1/vhosts" URLRequestListVHost = "/v1/vhosts"
URLRequestListApp = "/v1/vhosts/%s/apps" URLRequestListApp = "/v1/vhosts/%s/apps"
URLRequestListStream = "/v1/vhosts/%s/apps/%s/streams" URLRequestListStream = "/v1/vhosts/%s/apps/%s/streams"
) )
type ResponseList struct { type ResponseList struct {

View File

@ -10,7 +10,6 @@ const (
URLRequestStatsVHost = "/v1/stats/current/vhosts/%s" URLRequestStatsVHost = "/v1/stats/current/vhosts/%s"
URLRequestStatsApp = "/v1/stats/current/vhosts/%s/apps/%s" URLRequestStatsApp = "/v1/stats/current/vhosts/%s/apps/%s"
URLRequestStatsStream = "/v1/stats/current/vhosts/%s/apps/%s/streams/%s" URLRequestStatsStream = "/v1/stats/current/vhosts/%s/apps/%s/streams/%s"
) )
type ResponseStats struct { type ResponseStats struct {
@ -34,7 +33,6 @@ type ResponseStatsData struct {
TotalBytesOut uint64 `json:"totalBytesOut" example:"117022184"` TotalBytesOut uint64 `json:"totalBytesOut" example:"117022184"`
} }
func (resp *ResponseStats) Log(log *log.Entry) { func (resp *ResponseStats) Log(log *log.Entry) {
logger := log logger := log
if resp.Data != nil { if resp.Data != nil {