satellite/nodestats/endoint: reputation stats updated

Change-Id: I03a44c4c3465d4f8f23fcbbc742148f5e49544e2
This commit is contained in:
Qweder93 2020-04-16 22:05:05 +03:00
parent 9052085f70
commit c498e52cf2
5 changed files with 9 additions and 4 deletions

View File

@ -17,6 +17,7 @@ import (
"storj.io/common/encryption"
"storj.io/common/ranger"
"storj.io/common/ranger/httpranger"
"storj.io/common/storj"
"storj.io/uplink/private/eestream"
)
@ -62,7 +63,7 @@ func Main() error {
for i := 0; i < *rsn; i++ {
go func(i int) {
url := fmt.Sprintf("http://18.184.133.99:%d", 10000+i)
rr, err := ranger.HTTPRanger(ctx, url)
rr, err := httpranger.HTTPRanger(ctx, url)
result <- indexRangerError{i: i, rr: rr, err: err}
}(i)
}
@ -90,6 +91,6 @@ func Main() error {
return http.ListenAndServe(*addr, http.HandlerFunc(
func(w http.ResponseWriter, r *http.Request) {
ranger.ServeContent(ctx, w, r, flag.Arg(0), time.Time{}, rr)
httpranger.ServeContent(ctx, w, r, flag.Arg(0), time.Time{}, rr)
}))
}

View File

@ -21,6 +21,7 @@ import (
"storj.io/common/encryption"
"storj.io/common/ranger"
"storj.io/common/ranger/httpranger"
"storj.io/common/storj"
"storj.io/uplink/private/eestream"
)
@ -91,6 +92,6 @@ func Main() error {
return http.ListenAndServe(*addr, http.HandlerFunc(
func(w http.ResponseWriter, r *http.Request) {
ranger.ServeContent(ctx, w, r, flag.Arg(0), time.Time{}, rr)
httpranger.ServeContent(ctx, w, r, flag.Arg(0), time.Time{}, rr)
}))
}

2
go.mod
View File

@ -41,7 +41,7 @@ require (
golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5
golang.org/x/time v0.0.0-20191024005414-555d28b269f0
google.golang.org/grpc v1.28.0
storj.io/common v0.0.0-20200413160743-f212d3029dbf
storj.io/common v0.0.0-20200416175331-40469cc6b6d5
storj.io/drpc v0.0.11
storj.io/monkit-jaeger v0.0.0-20200403204040-f5a746eeacca
storj.io/private v0.0.0-20200403212157-26f222c154f0

2
go.sum
View File

@ -624,6 +624,8 @@ rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8
storj.io/common v0.0.0-20200402141523-7780ee0cca0d/go.mod h1:pZyXiIE7bGETIRXtfs0nICqMwp7PM8HqnDuyUeldNA0=
storj.io/common v0.0.0-20200413160743-f212d3029dbf h1:3ltVLnAtkJ/nbHg1aStSRr99doJRqPLl7BmRV9XKWpg=
storj.io/common v0.0.0-20200413160743-f212d3029dbf/go.mod h1:pZyXiIE7bGETIRXtfs0nICqMwp7PM8HqnDuyUeldNA0=
storj.io/common v0.0.0-20200416175331-40469cc6b6d5 h1:ApFVw3uGVbUqPPkJbTVq8wcqJFmJRU24uhjdoedsj/M=
storj.io/common v0.0.0-20200416175331-40469cc6b6d5/go.mod h1:pZyXiIE7bGETIRXtfs0nICqMwp7PM8HqnDuyUeldNA0=
storj.io/drpc v0.0.11 h1:6vLxfpSbwCLtqzAoXzXx/SxBqBtbzbmquXPqfcWKqfw=
storj.io/drpc v0.0.11 h1:6vLxfpSbwCLtqzAoXzXx/SxBqBtbzbmquXPqfcWKqfw=
storj.io/drpc v0.0.11/go.mod h1:TiFc2obNjL9/3isMW1Rpxjy8V9uE0B2HMeMFGiiI7Iw=

View File

@ -76,6 +76,7 @@ func (e *Endpoint) GetStats(ctx context.Context, req *pb.GetStatsRequest) (_ *pb
},
Disqualified: node.Disqualified,
Suspended: node.Suspended,
JoinedAt: node.CreatedAt,
}, nil
}