From 5d70b6abefa261fe9ffaaed6f964de23010ad813 Mon Sep 17 00:00:00 2001 From: Qweder93 Date: Wed, 2 Jun 2021 15:13:42 +0300 Subject: [PATCH] multinode/bandwidth: added monthly bandwidth summaries montly bandwidth summaries for single/all nodes, single/all satellites added. Change-Id: Ic384886c10622df74a4bd0645e2d7f2a85477644 --- multinode/bandwidth/bandwidth.go | 93 ++ multinode/bandwidth/bandwidth_test.go | 103 ++ multinode/bandwidth/service.go | 289 +++++ multinode/console/controllers/bandwidth.go | 186 ++++ multinode/console/server/server.go | 11 + multinode/nodes/service.go | 12 + multinode/peer.go | 15 + private/multinodepb/multinode.pb.go | 1145 +++++++++++++++++--- private/multinodepb/multinode.proto | 94 ++ private/multinodepb/multinode_drpc.pb.go | 322 +++++- storagenode/multinode/bandwidth.go | 179 +++ 11 files changed, 2284 insertions(+), 165 deletions(-) create mode 100644 multinode/bandwidth/bandwidth.go create mode 100644 multinode/bandwidth/bandwidth_test.go create mode 100644 multinode/bandwidth/service.go create mode 100644 multinode/console/controllers/bandwidth.go diff --git a/multinode/bandwidth/bandwidth.go b/multinode/bandwidth/bandwidth.go new file mode 100644 index 000000000..6d0daa5e8 --- /dev/null +++ b/multinode/bandwidth/bandwidth.go @@ -0,0 +1,93 @@ +// Copyright (C) 2021 Storj Labs, Inc. +// See LICENSE for copying information. + +package bandwidth + +import ( + "sort" + "time" +) + +// Egress stores info about storage node egress usage. +type Egress struct { + Repair int64 `json:"repair"` + Audit int64 `json:"audit"` + Usage int64 `json:"usage"` +} + +// Ingress stores info about storage node ingress usage. +type Ingress struct { + Repair int64 `json:"repair"` + Usage int64 `json:"usage"` +} + +// UsageRollup contains rolluped bandwidth usage. +type UsageRollup struct { + Egress Egress `json:"egress"` + Ingress Ingress `json:"ingress"` + Delete int64 `json:"delete"` + IntervalStart time.Time `json:"intervalStart"` +} + +// Monthly contains all bandwidth, ingress, egress monthly data. +type Monthly struct { + BandwidthDaily []UsageRollup `json:"bandwidthDaily"` + BandwidthSummary int64 `json:"bandwidthSummary"` + EgressSummary int64 `json:"egressSummary"` + IngressSummary int64 `json:"ingressSummary"` +} + +// UsageRollupDailyCache caches storage usage stamps by interval date. +type UsageRollupDailyCache map[time.Time]UsageRollup + +// Sorted returns usage rollup slice sorted by interval start. +func (cache *UsageRollupDailyCache) Sorted() []UsageRollup { + var usageRollup []UsageRollup + + for _, stamp := range *cache { + usageRollup = append(usageRollup, stamp) + } + sort.Slice(usageRollup, func(i, j int) bool { + return usageRollup[i].IntervalStart.Before(usageRollup[j].IntervalStart) + }) + + return usageRollup +} + +// Add adds usage rollup to cache aggregating bandwidth data by date. +func (cache *UsageRollupDailyCache) Add(rollup UsageRollup) { + year, month, day := rollup.IntervalStart.UTC().Date() + intervalStart := time.Date(year, month, day, 0, 0, 0, 0, time.UTC) + cached := *cache + cacheStamp, ok := cached[intervalStart] + if ok { + cached[intervalStart] = UsageRollup{ + Egress: Egress{ + Repair: cacheStamp.Egress.Repair + rollup.Egress.Repair, + Audit: cacheStamp.Egress.Audit + rollup.Egress.Audit, + Usage: cacheStamp.Egress.Usage + rollup.Egress.Usage, + }, + Ingress: Ingress{ + Repair: cacheStamp.Ingress.Repair + rollup.Ingress.Repair, + Usage: cacheStamp.Ingress.Usage + rollup.Ingress.Usage, + }, + Delete: cacheStamp.Delete + rollup.Delete, + IntervalStart: intervalStart, + } + } else { + cached[intervalStart] = UsageRollup{ + Egress: Egress{ + Repair: rollup.Egress.Repair, + Audit: rollup.Egress.Audit, + Usage: rollup.Egress.Usage, + }, + Ingress: Ingress{ + Repair: rollup.Ingress.Repair, + Usage: rollup.Ingress.Usage, + }, + Delete: rollup.Delete, + IntervalStart: intervalStart, + } + } + *cache = cached +} diff --git a/multinode/bandwidth/bandwidth_test.go b/multinode/bandwidth/bandwidth_test.go new file mode 100644 index 000000000..1cae71c3e --- /dev/null +++ b/multinode/bandwidth/bandwidth_test.go @@ -0,0 +1,103 @@ +// Copyright (C) 2021 Storj Labs, Inc. +// See LICENSE for copying information. + +package bandwidth_test + +import ( + "testing" + "time" + + "github.com/stretchr/testify/require" + + "storj.io/storj/multinode/bandwidth" +) + +func TestUsageRolloutDailyCache(t *testing.T) { + newTimestamp := func(month time.Month, day int) time.Time { + return time.Date(2021, month, day, 0, 0, 0, 0, time.UTC) + } + + testData := []struct { + Date time.Time + Egress []bandwidth.Egress + Ingress []bandwidth.Ingress + Delete []int64 + }{ + { + Date: newTimestamp(time.May, 2), + Ingress: []bandwidth.Ingress{{Repair: 1, Usage: 0}, {Repair: 10, Usage: 20}}, + Egress: []bandwidth.Egress{{Repair: 10, Audit: 20, Usage: 30}, {Repair: 10, Audit: 20, Usage: 30}}, + Delete: []int64{10, 20, 30}, + }, + { + Date: newTimestamp(time.May, 3), + Ingress: []bandwidth.Ingress{{Repair: 1, Usage: 0}, {Repair: 10, Usage: 20}}, + Egress: []bandwidth.Egress{{Repair: 101, Audit: 201, Usage: 301}, {Repair: 101, Audit: 201, Usage: 301}}, + Delete: []int64{101, 201, 301}, + }, + { + Date: newTimestamp(time.May, 4), + Ingress: []bandwidth.Ingress{{Repair: 12, Usage: 20}, {Repair: 120, Usage: 220}}, + Egress: []bandwidth.Egress{{Repair: 310, Audit: 320, Usage: 330}, {Repair: 100, Audit: 200, Usage: 300}}, + Delete: []int64{100, 200, 300}, + }, + { + Date: newTimestamp(time.May, 1), + Ingress: []bandwidth.Ingress{{Repair: 123, Usage: 123}, {Repair: 123, Usage: 123}}, + Egress: []bandwidth.Egress{{Repair: 20, Audit: 20, Usage: 20}, {Repair: 30, Audit: 30, Usage: 30}}, + Delete: []int64{2, 3, 4}, + }, + } + expected := []bandwidth.UsageRollup{ + { + IntervalStart: newTimestamp(time.May, 1), + Ingress: bandwidth.Ingress{Repair: 246, Usage: 246}, + Egress: bandwidth.Egress{Repair: 50, Audit: 50, Usage: 50}, + Delete: 9, + }, + { + IntervalStart: newTimestamp(time.May, 2), + Ingress: bandwidth.Ingress{Repair: 11, Usage: 20}, + Egress: bandwidth.Egress{Repair: 20, Audit: 40, Usage: 60}, + Delete: 60, + }, + { + IntervalStart: newTimestamp(time.May, 3), + Ingress: bandwidth.Ingress{Repair: 11, Usage: 20}, + Egress: bandwidth.Egress{Repair: 202, Audit: 402, Usage: 602}, + Delete: 603, + }, + { + IntervalStart: newTimestamp(time.May, 4), + Ingress: bandwidth.Ingress{Repair: 132, Usage: 240}, + Egress: bandwidth.Egress{Repair: 410, Audit: 520, Usage: 630}, + Delete: 600, + }, + } + + cache := make(bandwidth.UsageRollupDailyCache) + for _, entry := range testData { + _, month, day := entry.Date.Date() + for _, egr := range entry.Egress { + cache.Add(bandwidth.UsageRollup{ + Egress: egr, + IntervalStart: newTimestamp(month, day), + }) + } + for _, ing := range entry.Ingress { + cache.Add(bandwidth.UsageRollup{ + Ingress: ing, + IntervalStart: newTimestamp(month, day), + }) + } + for _, del := range entry.Delete { + cache.Add(bandwidth.UsageRollup{ + Delete: del, + IntervalStart: newTimestamp(month, day), + }) + } + } + + stamps := cache.Sorted() + require.Equal(t, expected, stamps) +} diff --git a/multinode/bandwidth/service.go b/multinode/bandwidth/service.go new file mode 100644 index 000000000..5d5c3a582 --- /dev/null +++ b/multinode/bandwidth/service.go @@ -0,0 +1,289 @@ +// Copyright (C) 2021 Storj Labs, Inc. +// See LICENSE for copying information. + +package bandwidth + +import ( + "context" + + "github.com/spacemonkeygo/monkit/v3" + "github.com/zeebo/errs" + "go.uber.org/zap" + + "storj.io/common/rpc" + "storj.io/common/storj" + "storj.io/storj/multinode/nodes" + "storj.io/storj/private/multinodepb" +) + +var ( + mon = monkit.Package() + + // Error is an error class for bandwidth service error. + Error = errs.Class("bandwidth") +) + +// Service exposes bandwidth related logic. +// +// architecture: Service +type Service struct { + log *zap.Logger + dialer rpc.Dialer + nodes *nodes.Service +} + +// NewService creates new instance of Service. +func NewService(log *zap.Logger, dialer rpc.Dialer, nodes *nodes.Service) *Service { + return &Service{ + log: log, + dialer: dialer, + nodes: nodes, + } +} + +// Monthly returns monthly bandwidth summary. +func (service *Service) Monthly(ctx context.Context) (_ Monthly, err error) { + defer mon.Task()(&ctx)(&err) + var totalMonthly Monthly + + nodes, err := service.nodes.List(ctx) + if err != nil { + return Monthly{}, Error.Wrap(err) + } + + cache := make(UsageRollupDailyCache) + + for _, node := range nodes { + monthly, err := service.getMonthly(ctx, node) + if err != nil { + return Monthly{}, Error.Wrap(err) + } + totalMonthly.IngressSummary += monthly.IngressSummary + totalMonthly.EgressSummary += monthly.EgressSummary + totalMonthly.BandwidthSummary += monthly.BandwidthSummary + + for _, rollup := range monthly.BandwidthDaily { + cache.Add(rollup) + } + } + totalMonthly.BandwidthDaily = cache.Sorted() + + return totalMonthly, nil +} + +// MonthlyNode returns monthly bandwidth summary for single node. +func (service *Service) MonthlyNode(ctx context.Context, nodeID storj.NodeID) (_ Monthly, err error) { + defer mon.Task()(&ctx)(&err) + + node, err := service.nodes.Get(ctx, nodeID) + if err != nil { + return Monthly{}, Error.Wrap(err) + } + + monthly, err := service.getMonthly(ctx, node) + if err != nil { + return Monthly{}, Error.Wrap(err) + } + + return monthly, nil +} + +// MonthlySatellite returns monthly bandwidth summary for specific satellite. +func (service *Service) MonthlySatellite(ctx context.Context, satelliteID storj.NodeID) (_ Monthly, err error) { + defer mon.Task()(&ctx)(&err) + var totalMonthly Monthly + + nodes, err := service.nodes.List(ctx) + if err != nil { + return Monthly{}, Error.Wrap(err) + } + + cache := make(UsageRollupDailyCache) + + for _, node := range nodes { + monthly, err := service.getMonthlySatellite(ctx, node, satelliteID) + if err != nil { + return Monthly{}, Error.Wrap(err) + } + + totalMonthly.IngressSummary += monthly.IngressSummary + totalMonthly.EgressSummary += monthly.EgressSummary + totalMonthly.BandwidthSummary += monthly.BandwidthSummary + + for _, rollup := range monthly.BandwidthDaily { + cache.Add(rollup) + } + } + totalMonthly.BandwidthDaily = cache.Sorted() + + return totalMonthly, nil +} + +// MonthlySatelliteNode returns monthly bandwidth summary for single node and specific satellites. +func (service *Service) MonthlySatelliteNode(ctx context.Context, satelliteID, nodeID storj.NodeID) (_ Monthly, err error) { + defer mon.Task()(&ctx)(&err) + + node, err := service.nodes.Get(ctx, nodeID) + if err != nil { + return Monthly{}, Error.Wrap(err) + } + + monthly, err := service.getMonthlySatellite(ctx, node, satelliteID) + if err != nil { + return Monthly{}, Error.Wrap(err) + } + + return monthly, nil +} + +// getMonthlySatellite returns monthly bandwidth summary for single node and specific satellite. +func (service *Service) getMonthlySatellite(ctx context.Context, node nodes.Node, satelliteID storj.NodeID) (_ Monthly, err error) { + defer mon.Task()(&ctx)(&err) + + conn, err := service.dialer.DialNodeURL(ctx, storj.NodeURL{ + ID: node.ID, + Address: node.PublicAddress, + }) + if err != nil { + return Monthly{}, Error.Wrap(err) + } + + defer func() { + err = errs.Combine(err, conn.Close()) + }() + + bandwidthClient := multinodepb.NewDRPCBandwidthClient(conn) + header := &multinodepb.RequestHeader{ + ApiKey: node.APISecret, + } + + ingress, err := bandwidthClient.IngressSummarySatellite(ctx, &multinodepb.IngressSummarySatelliteRequest{ + Header: header, + SatelliteId: satelliteID, + }) + if err != nil { + return Monthly{}, Error.Wrap(err) + } + + egress, err := bandwidthClient.EgressSummarySatellite(ctx, &multinodepb.EgressSummarySatelliteRequest{ + Header: header, + SatelliteId: satelliteID, + }) + if err != nil { + return Monthly{}, Error.Wrap(err) + } + + bandwidth, err := bandwidthClient.BandwidthSummarySatellite(ctx, &multinodepb.BandwidthSummarySatelliteRequest{ + Header: header, + SatelliteId: satelliteID, + }) + if err != nil { + return Monthly{}, Error.Wrap(err) + } + + usageRollup, err := bandwidthClient.DailySatellite(ctx, &multinodepb.DailySatelliteRequest{ + Header: header, + SatelliteId: satelliteID, + }) + if err != nil { + return Monthly{}, Error.Wrap(err) + } + + var rollups []UsageRollup + for _, r := range usageRollup.UsageRollup { + rollups = append(rollups, UsageRollup{ + Egress: Egress{ + Repair: r.Egress.Repair, + Audit: r.Egress.Audit, + Usage: r.Egress.Usage, + }, + Ingress: Ingress{ + Repair: r.Ingress.Repaid, + Usage: r.Ingress.Usage, + }, + Delete: r.Delete, + IntervalStart: r.IntervalStart, + }) + } + + return Monthly{ + BandwidthDaily: rollups, + BandwidthSummary: bandwidth.Summary, + EgressSummary: egress.Summary, + IngressSummary: ingress.Summary, + }, nil +} + +// getMonthly returns monthly bandwidth summary for single node. +func (service *Service) getMonthly(ctx context.Context, node nodes.Node) (_ Monthly, err error) { + defer mon.Task()(&ctx)(&err) + + conn, err := service.dialer.DialNodeURL(ctx, storj.NodeURL{ + ID: node.ID, + Address: node.PublicAddress, + }) + if err != nil { + return Monthly{}, Error.Wrap(err) + } + + defer func() { + err = errs.Combine(err, conn.Close()) + }() + + bandwidthClient := multinodepb.NewDRPCBandwidthClient(conn) + header := &multinodepb.RequestHeader{ + ApiKey: node.APISecret, + } + + ingress, err := bandwidthClient.IngressSummary(ctx, &multinodepb.IngressSummaryRequest{ + Header: header, + }) + if err != nil { + return Monthly{}, Error.Wrap(err) + } + + egress, err := bandwidthClient.EgressSummary(ctx, &multinodepb.EgressSummaryRequest{ + Header: header, + }) + if err != nil { + return Monthly{}, Error.Wrap(err) + } + + bandwidth, err := bandwidthClient.BandwidthSummary(ctx, &multinodepb.BandwidthSummaryRequest{ + Header: header, + }) + if err != nil { + return Monthly{}, Error.Wrap(err) + } + + usageRollup, err := bandwidthClient.Daily(ctx, &multinodepb.DailyRequest{ + Header: header, + }) + if err != nil { + return Monthly{}, Error.Wrap(err) + } + + var rollups []UsageRollup + for _, r := range usageRollup.UsageRollup { + rollups = append(rollups, UsageRollup{ + Egress: Egress{ + Repair: r.Egress.Repair, + Audit: r.Egress.Audit, + Usage: r.Egress.Usage, + }, + Ingress: Ingress{ + Repair: r.Ingress.Repaid, + Usage: r.Ingress.Usage, + }, + Delete: r.Delete, + IntervalStart: r.IntervalStart, + }) + } + + return Monthly{ + BandwidthDaily: rollups, + BandwidthSummary: bandwidth.Summary, + EgressSummary: egress.Summary, + IngressSummary: ingress.Summary, + }, nil +} diff --git a/multinode/console/controllers/bandwidth.go b/multinode/console/controllers/bandwidth.go new file mode 100644 index 000000000..3a6c8846a --- /dev/null +++ b/multinode/console/controllers/bandwidth.go @@ -0,0 +1,186 @@ +// Copyright (C) 2021 Storj Labs, Inc. +// See LICENSE for copying information. + +package controllers + +import ( + "encoding/json" + "net/http" + + "github.com/gorilla/mux" + "github.com/zeebo/errs" + "go.uber.org/zap" + + "storj.io/common/storj" + "storj.io/storj/multinode/bandwidth" +) + +var ( + // ErrBandwidth is an internal error type for bandwidth web api controller. + ErrBandwidth = errs.Class("bandwidth web api controller") +) + +// Bandwidth is a web api controller. +type Bandwidth struct { + log *zap.Logger + service *bandwidth.Service +} + +// NewBandwidth is a constructor for Bandwidth. +func NewBandwidth(log *zap.Logger, service *bandwidth.Service) *Bandwidth { + return &Bandwidth{ + log: log, + service: service, + } +} + +// Monthly handles all satellites all nodes bandwidth monthly. +func (controller *Bandwidth) Monthly(w http.ResponseWriter, r *http.Request) { + ctx := r.Context() + var err error + defer mon.Task()(&ctx)(&err) + + w.Header().Add("Content-Type", "application/json") + + monthly, err := controller.service.Monthly(ctx) + if err != nil { + controller.log.Error("get bandwidth monthly error", zap.Error(err)) + controller.serveError(w, http.StatusInternalServerError, ErrBandwidth.Wrap(err)) + return + } + + if err = json.NewEncoder(w).Encode(monthly); err != nil { + controller.log.Error("failed to write json response", zap.Error(err)) + return + } +} + +// MonthlyNode handles all satellites single node bandwidth monthly. +func (controller *Bandwidth) MonthlyNode(w http.ResponseWriter, r *http.Request) { + ctx := r.Context() + var err error + defer mon.Task()(&ctx)(&err) + + w.Header().Add("Content-Type", "application/json") + segmentParams := mux.Vars(r) + + id, ok := segmentParams["nodeID"] + if !ok { + controller.serveError(w, http.StatusBadRequest, ErrPayouts.New("couldn't receive route variable nodeID")) + return + } + + nodeID, err := storj.NodeIDFromString(id) + if err != nil { + controller.serveError(w, http.StatusBadRequest, ErrPayouts.Wrap(err)) + return + } + + monthly, err := controller.service.MonthlyNode(ctx, nodeID) + if err != nil { + controller.log.Error("get bandwidth monthly for specific node error", zap.Error(err)) + controller.serveError(w, http.StatusInternalServerError, ErrBandwidth.Wrap(err)) + return + } + + if err = json.NewEncoder(w).Encode(monthly); err != nil { + controller.log.Error("failed to write json response", zap.Error(err)) + return + } +} + +// MonthlySatellite handles specific satellite all nodes bandwidth monthly. +func (controller *Bandwidth) MonthlySatellite(w http.ResponseWriter, r *http.Request) { + ctx := r.Context() + var err error + defer mon.Task()(&ctx)(&err) + + w.Header().Add("Content-Type", "application/json") + segmentParams := mux.Vars(r) + + id, ok := segmentParams["id"] + if !ok { + controller.serveError(w, http.StatusBadRequest, ErrPayouts.New("couldn't receive route variable satellite id")) + return + } + + satelliteID, err := storj.NodeIDFromString(id) + if err != nil { + controller.serveError(w, http.StatusBadRequest, ErrPayouts.Wrap(err)) + return + } + + monthly, err := controller.service.MonthlySatellite(ctx, satelliteID) + if err != nil { + controller.log.Error("get bandwidth monthly for specific satellite error", zap.Error(err)) + controller.serveError(w, http.StatusInternalServerError, ErrBandwidth.Wrap(err)) + return + } + + if err = json.NewEncoder(w).Encode(monthly); err != nil { + controller.log.Error("failed to write json response", zap.Error(err)) + return + } +} + +// MonthlySatelliteNode handles specific satellite single node bandwidth monthly. +func (controller *Bandwidth) MonthlySatelliteNode(w http.ResponseWriter, r *http.Request) { + ctx := r.Context() + var err error + defer mon.Task()(&ctx)(&err) + + w.Header().Add("Content-Type", "application/json") + segmentParams := mux.Vars(r) + + id, ok := segmentParams["id"] + if !ok { + controller.serveError(w, http.StatusBadRequest, ErrPayouts.New("couldn't receive route variable satellite id")) + return + } + + satelliteID, err := storj.NodeIDFromString(id) + if err != nil { + controller.serveError(w, http.StatusBadRequest, ErrPayouts.Wrap(err)) + return + } + + node, ok := segmentParams["nodeID"] + if !ok { + controller.serveError(w, http.StatusBadRequest, ErrPayouts.New("couldn't receive route variable satellite id")) + return + } + + nodeID, err := storj.NodeIDFromString(node) + if err != nil { + controller.serveError(w, http.StatusBadRequest, ErrPayouts.Wrap(err)) + return + } + + monthly, err := controller.service.MonthlySatelliteNode(ctx, satelliteID, nodeID) + if err != nil { + controller.log.Error("get bandwidth monthly for specific satellite and node error", zap.Error(err)) + controller.serveError(w, http.StatusInternalServerError, ErrBandwidth.Wrap(err)) + return + } + + if err = json.NewEncoder(w).Encode(monthly); err != nil { + controller.log.Error("failed to write json response", zap.Error(err)) + return + } +} + +// serveError set http statuses and send json error. +func (controller *Bandwidth) serveError(w http.ResponseWriter, status int, err error) { + w.WriteHeader(status) + + var response struct { + Error string `json:"error"` + } + + response.Error = err.Error() + + err = json.NewEncoder(w).Encode(response) + if err != nil { + controller.log.Error("failed to write json error response", zap.Error(err)) + } +} diff --git a/multinode/console/server/server.go b/multinode/console/server/server.go index d7f0d7dbe..86fba9a4d 100644 --- a/multinode/console/server/server.go +++ b/multinode/console/server/server.go @@ -15,6 +15,7 @@ import ( "go.uber.org/zap" "golang.org/x/sync/errgroup" + "storj.io/storj/multinode/bandwidth" "storj.io/storj/multinode/console/controllers" "storj.io/storj/multinode/nodes" "storj.io/storj/multinode/operators" @@ -39,6 +40,7 @@ type Services struct { Payouts *payouts.Service Operators *operators.Service Storage *storage.Service + Bandwidth *bandwidth.Service } // Server represents Multinode Dashboard http server. @@ -53,6 +55,7 @@ type Server struct { nodes *nodes.Service payouts *payouts.Service operators *operators.Service + bandwidth *bandwidth.Service storage *storage.Service index *template.Template @@ -68,6 +71,7 @@ func NewServer(log *zap.Logger, listener net.Listener, config Config, services S operators: services.Operators, payouts: services.Payouts, storage: services.Storage, + bandwidth: services.Bandwidth, } router := mux.NewRouter() @@ -90,6 +94,13 @@ func NewServer(log *zap.Logger, listener net.Listener, config Config, services S operatorsRouter := apiRouter.PathPrefix("/operators").Subrouter() operatorsRouter.HandleFunc("", operatorsController.ListPaginated).Methods(http.MethodGet) + bandwidthController := controllers.NewBandwidth(server.log, server.bandwidth) + bandwidthRouter := apiRouter.PathPrefix("/bandwidth").Subrouter() + bandwidthRouter.HandleFunc("/", bandwidthController.Monthly).Methods(http.MethodGet) + bandwidthRouter.HandleFunc("/{nodeID}", bandwidthController.MonthlyNode).Methods(http.MethodGet) + bandwidthRouter.HandleFunc("/satellites/{id}", bandwidthController.MonthlySatellite).Methods(http.MethodGet) + bandwidthRouter.HandleFunc("/satellites/{id}/{nodeID}", bandwidthController.MonthlySatelliteNode).Methods(http.MethodGet) + payoutsController := controllers.NewPayouts(server.log, server.payouts) payoutsRouter := apiRouter.PathPrefix("/payouts").Subrouter() payoutsRouter.HandleFunc("/summaries", payoutsController.Summary).Methods(http.MethodGet) diff --git a/multinode/nodes/service.go b/multinode/nodes/service.go index 9d62b2b9e..770ca4054 100644 --- a/multinode/nodes/service.go +++ b/multinode/nodes/service.go @@ -47,6 +47,18 @@ func (service *Service) Add(ctx context.Context, id storj.NodeID, apiSecret []by return Error.Wrap(service.nodes.Add(ctx, id, apiSecret, publicAddress)) } +// List returns list of all nodes. +func (service *Service) List(ctx context.Context) (_ []Node, err error) { + defer mon.Task()(&ctx)(&err) + + nodes, err := service.nodes.List(ctx) + if err != nil { + return nil, Error.Wrap(err) + } + + return nodes, nil +} + // UpdateName will update name of the specified node. func (service *Service) UpdateName(ctx context.Context, id storj.NodeID, name string) (err error) { defer mon.Task()(&ctx)(&err) diff --git a/multinode/peer.go b/multinode/peer.go index 962afe6f6..7c9f6c551 100644 --- a/multinode/peer.go +++ b/multinode/peer.go @@ -15,6 +15,7 @@ import ( "storj.io/common/peertls/tlsopts" "storj.io/common/rpc" "storj.io/private/debug" + "storj.io/storj/multinode/bandwidth" "storj.io/storj/multinode/console/server" "storj.io/storj/multinode/nodes" "storj.io/storj/multinode/operators" @@ -64,6 +65,11 @@ type Peer struct { Service *nodes.Service } + // contains logic of bandwidth domain. + Bandwidth struct { + Service *bandwidth.Service + } + // exposes operators related logic. Operators struct { Service *operators.Service @@ -116,6 +122,14 @@ func New(log *zap.Logger, full *identity.FullIdentity, config Config, db DB) (_ ) } + { // bandwidth setup + peer.Bandwidth.Service = bandwidth.NewService( + peer.Log.Named("bandwidth:service"), + peer.Dialer, + peer.Nodes.Service, + ) + } + { // operators setup peer.Operators.Service = operators.NewService( peer.Log.Named("operators:service"), @@ -155,6 +169,7 @@ func New(log *zap.Logger, full *identity.FullIdentity, config Config, db DB) (_ Payouts: peer.Payouts.Service, Operators: peer.Operators.Service, Storage: peer.Storage.Service, + Bandwidth: peer.Bandwidth.Service, }, ) if err != nil { diff --git a/private/multinodepb/multinode.pb.go b/private/multinodepb/multinode.pb.go index 9a0fd3314..85d62c3aa 100644 --- a/private/multinodepb/multinode.pb.go +++ b/private/multinodepb/multinode.pb.go @@ -484,6 +484,780 @@ func (m *BandwidthMonthSummaryResponse) GetUsed() int64 { return 0 } +type BandwidthSummarySatelliteRequest struct { + Header *RequestHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` + SatelliteId NodeID `protobuf:"bytes,2,opt,name=satellite_id,json=satelliteId,proto3,customtype=NodeID" json:"satellite_id"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *BandwidthSummarySatelliteRequest) Reset() { *m = BandwidthSummarySatelliteRequest{} } +func (m *BandwidthSummarySatelliteRequest) String() string { return proto.CompactTextString(m) } +func (*BandwidthSummarySatelliteRequest) ProtoMessage() {} +func (*BandwidthSummarySatelliteRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_9a45fd79b06f3a1b, []int{10} +} +func (m *BandwidthSummarySatelliteRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_BandwidthSummarySatelliteRequest.Unmarshal(m, b) +} +func (m *BandwidthSummarySatelliteRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_BandwidthSummarySatelliteRequest.Marshal(b, m, deterministic) +} +func (m *BandwidthSummarySatelliteRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_BandwidthSummarySatelliteRequest.Merge(m, src) +} +func (m *BandwidthSummarySatelliteRequest) XXX_Size() int { + return xxx_messageInfo_BandwidthSummarySatelliteRequest.Size(m) +} +func (m *BandwidthSummarySatelliteRequest) XXX_DiscardUnknown() { + xxx_messageInfo_BandwidthSummarySatelliteRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_BandwidthSummarySatelliteRequest proto.InternalMessageInfo + +func (m *BandwidthSummarySatelliteRequest) GetHeader() *RequestHeader { + if m != nil { + return m.Header + } + return nil +} + +type BandwidthSummarySatelliteResponse struct { + Summary int64 `protobuf:"varint,1,opt,name=summary,proto3" json:"summary,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *BandwidthSummarySatelliteResponse) Reset() { *m = BandwidthSummarySatelliteResponse{} } +func (m *BandwidthSummarySatelliteResponse) String() string { return proto.CompactTextString(m) } +func (*BandwidthSummarySatelliteResponse) ProtoMessage() {} +func (*BandwidthSummarySatelliteResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_9a45fd79b06f3a1b, []int{11} +} +func (m *BandwidthSummarySatelliteResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_BandwidthSummarySatelliteResponse.Unmarshal(m, b) +} +func (m *BandwidthSummarySatelliteResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_BandwidthSummarySatelliteResponse.Marshal(b, m, deterministic) +} +func (m *BandwidthSummarySatelliteResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_BandwidthSummarySatelliteResponse.Merge(m, src) +} +func (m *BandwidthSummarySatelliteResponse) XXX_Size() int { + return xxx_messageInfo_BandwidthSummarySatelliteResponse.Size(m) +} +func (m *BandwidthSummarySatelliteResponse) XXX_DiscardUnknown() { + xxx_messageInfo_BandwidthSummarySatelliteResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_BandwidthSummarySatelliteResponse proto.InternalMessageInfo + +func (m *BandwidthSummarySatelliteResponse) GetSummary() int64 { + if m != nil { + return m.Summary + } + return 0 +} + +type BandwidthSummaryRequest struct { + Header *RequestHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *BandwidthSummaryRequest) Reset() { *m = BandwidthSummaryRequest{} } +func (m *BandwidthSummaryRequest) String() string { return proto.CompactTextString(m) } +func (*BandwidthSummaryRequest) ProtoMessage() {} +func (*BandwidthSummaryRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_9a45fd79b06f3a1b, []int{12} +} +func (m *BandwidthSummaryRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_BandwidthSummaryRequest.Unmarshal(m, b) +} +func (m *BandwidthSummaryRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_BandwidthSummaryRequest.Marshal(b, m, deterministic) +} +func (m *BandwidthSummaryRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_BandwidthSummaryRequest.Merge(m, src) +} +func (m *BandwidthSummaryRequest) XXX_Size() int { + return xxx_messageInfo_BandwidthSummaryRequest.Size(m) +} +func (m *BandwidthSummaryRequest) XXX_DiscardUnknown() { + xxx_messageInfo_BandwidthSummaryRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_BandwidthSummaryRequest proto.InternalMessageInfo + +func (m *BandwidthSummaryRequest) GetHeader() *RequestHeader { + if m != nil { + return m.Header + } + return nil +} + +type BandwidthSummaryResponse struct { + Summary int64 `protobuf:"varint,1,opt,name=summary,proto3" json:"summary,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *BandwidthSummaryResponse) Reset() { *m = BandwidthSummaryResponse{} } +func (m *BandwidthSummaryResponse) String() string { return proto.CompactTextString(m) } +func (*BandwidthSummaryResponse) ProtoMessage() {} +func (*BandwidthSummaryResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_9a45fd79b06f3a1b, []int{13} +} +func (m *BandwidthSummaryResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_BandwidthSummaryResponse.Unmarshal(m, b) +} +func (m *BandwidthSummaryResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_BandwidthSummaryResponse.Marshal(b, m, deterministic) +} +func (m *BandwidthSummaryResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_BandwidthSummaryResponse.Merge(m, src) +} +func (m *BandwidthSummaryResponse) XXX_Size() int { + return xxx_messageInfo_BandwidthSummaryResponse.Size(m) +} +func (m *BandwidthSummaryResponse) XXX_DiscardUnknown() { + xxx_messageInfo_BandwidthSummaryResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_BandwidthSummaryResponse proto.InternalMessageInfo + +func (m *BandwidthSummaryResponse) GetSummary() int64 { + if m != nil { + return m.Summary + } + return 0 +} + +type EgressSummarySatelliteRequest struct { + Header *RequestHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` + SatelliteId NodeID `protobuf:"bytes,2,opt,name=satellite_id,json=satelliteId,proto3,customtype=NodeID" json:"satellite_id"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *EgressSummarySatelliteRequest) Reset() { *m = EgressSummarySatelliteRequest{} } +func (m *EgressSummarySatelliteRequest) String() string { return proto.CompactTextString(m) } +func (*EgressSummarySatelliteRequest) ProtoMessage() {} +func (*EgressSummarySatelliteRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_9a45fd79b06f3a1b, []int{14} +} +func (m *EgressSummarySatelliteRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_EgressSummarySatelliteRequest.Unmarshal(m, b) +} +func (m *EgressSummarySatelliteRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_EgressSummarySatelliteRequest.Marshal(b, m, deterministic) +} +func (m *EgressSummarySatelliteRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_EgressSummarySatelliteRequest.Merge(m, src) +} +func (m *EgressSummarySatelliteRequest) XXX_Size() int { + return xxx_messageInfo_EgressSummarySatelliteRequest.Size(m) +} +func (m *EgressSummarySatelliteRequest) XXX_DiscardUnknown() { + xxx_messageInfo_EgressSummarySatelliteRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_EgressSummarySatelliteRequest proto.InternalMessageInfo + +func (m *EgressSummarySatelliteRequest) GetHeader() *RequestHeader { + if m != nil { + return m.Header + } + return nil +} + +type EgressSummarySatelliteResponse struct { + Summary int64 `protobuf:"varint,1,opt,name=summary,proto3" json:"summary,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *EgressSummarySatelliteResponse) Reset() { *m = EgressSummarySatelliteResponse{} } +func (m *EgressSummarySatelliteResponse) String() string { return proto.CompactTextString(m) } +func (*EgressSummarySatelliteResponse) ProtoMessage() {} +func (*EgressSummarySatelliteResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_9a45fd79b06f3a1b, []int{15} +} +func (m *EgressSummarySatelliteResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_EgressSummarySatelliteResponse.Unmarshal(m, b) +} +func (m *EgressSummarySatelliteResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_EgressSummarySatelliteResponse.Marshal(b, m, deterministic) +} +func (m *EgressSummarySatelliteResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_EgressSummarySatelliteResponse.Merge(m, src) +} +func (m *EgressSummarySatelliteResponse) XXX_Size() int { + return xxx_messageInfo_EgressSummarySatelliteResponse.Size(m) +} +func (m *EgressSummarySatelliteResponse) XXX_DiscardUnknown() { + xxx_messageInfo_EgressSummarySatelliteResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_EgressSummarySatelliteResponse proto.InternalMessageInfo + +func (m *EgressSummarySatelliteResponse) GetSummary() int64 { + if m != nil { + return m.Summary + } + return 0 +} + +type EgressSummaryRequest struct { + Header *RequestHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *EgressSummaryRequest) Reset() { *m = EgressSummaryRequest{} } +func (m *EgressSummaryRequest) String() string { return proto.CompactTextString(m) } +func (*EgressSummaryRequest) ProtoMessage() {} +func (*EgressSummaryRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_9a45fd79b06f3a1b, []int{16} +} +func (m *EgressSummaryRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_EgressSummaryRequest.Unmarshal(m, b) +} +func (m *EgressSummaryRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_EgressSummaryRequest.Marshal(b, m, deterministic) +} +func (m *EgressSummaryRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_EgressSummaryRequest.Merge(m, src) +} +func (m *EgressSummaryRequest) XXX_Size() int { + return xxx_messageInfo_EgressSummaryRequest.Size(m) +} +func (m *EgressSummaryRequest) XXX_DiscardUnknown() { + xxx_messageInfo_EgressSummaryRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_EgressSummaryRequest proto.InternalMessageInfo + +func (m *EgressSummaryRequest) GetHeader() *RequestHeader { + if m != nil { + return m.Header + } + return nil +} + +type EgressSummaryResponse struct { + Summary int64 `protobuf:"varint,1,opt,name=summary,proto3" json:"summary,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *EgressSummaryResponse) Reset() { *m = EgressSummaryResponse{} } +func (m *EgressSummaryResponse) String() string { return proto.CompactTextString(m) } +func (*EgressSummaryResponse) ProtoMessage() {} +func (*EgressSummaryResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_9a45fd79b06f3a1b, []int{17} +} +func (m *EgressSummaryResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_EgressSummaryResponse.Unmarshal(m, b) +} +func (m *EgressSummaryResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_EgressSummaryResponse.Marshal(b, m, deterministic) +} +func (m *EgressSummaryResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_EgressSummaryResponse.Merge(m, src) +} +func (m *EgressSummaryResponse) XXX_Size() int { + return xxx_messageInfo_EgressSummaryResponse.Size(m) +} +func (m *EgressSummaryResponse) XXX_DiscardUnknown() { + xxx_messageInfo_EgressSummaryResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_EgressSummaryResponse proto.InternalMessageInfo + +func (m *EgressSummaryResponse) GetSummary() int64 { + if m != nil { + return m.Summary + } + return 0 +} + +type IngressSummarySatelliteRequest struct { + Header *RequestHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` + SatelliteId NodeID `protobuf:"bytes,2,opt,name=satellite_id,json=satelliteId,proto3,customtype=NodeID" json:"satellite_id"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *IngressSummarySatelliteRequest) Reset() { *m = IngressSummarySatelliteRequest{} } +func (m *IngressSummarySatelliteRequest) String() string { return proto.CompactTextString(m) } +func (*IngressSummarySatelliteRequest) ProtoMessage() {} +func (*IngressSummarySatelliteRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_9a45fd79b06f3a1b, []int{18} +} +func (m *IngressSummarySatelliteRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_IngressSummarySatelliteRequest.Unmarshal(m, b) +} +func (m *IngressSummarySatelliteRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_IngressSummarySatelliteRequest.Marshal(b, m, deterministic) +} +func (m *IngressSummarySatelliteRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_IngressSummarySatelliteRequest.Merge(m, src) +} +func (m *IngressSummarySatelliteRequest) XXX_Size() int { + return xxx_messageInfo_IngressSummarySatelliteRequest.Size(m) +} +func (m *IngressSummarySatelliteRequest) XXX_DiscardUnknown() { + xxx_messageInfo_IngressSummarySatelliteRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_IngressSummarySatelliteRequest proto.InternalMessageInfo + +func (m *IngressSummarySatelliteRequest) GetHeader() *RequestHeader { + if m != nil { + return m.Header + } + return nil +} + +type IngressSummarySatelliteResponse struct { + Summary int64 `protobuf:"varint,1,opt,name=summary,proto3" json:"summary,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *IngressSummarySatelliteResponse) Reset() { *m = IngressSummarySatelliteResponse{} } +func (m *IngressSummarySatelliteResponse) String() string { return proto.CompactTextString(m) } +func (*IngressSummarySatelliteResponse) ProtoMessage() {} +func (*IngressSummarySatelliteResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_9a45fd79b06f3a1b, []int{19} +} +func (m *IngressSummarySatelliteResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_IngressSummarySatelliteResponse.Unmarshal(m, b) +} +func (m *IngressSummarySatelliteResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_IngressSummarySatelliteResponse.Marshal(b, m, deterministic) +} +func (m *IngressSummarySatelliteResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_IngressSummarySatelliteResponse.Merge(m, src) +} +func (m *IngressSummarySatelliteResponse) XXX_Size() int { + return xxx_messageInfo_IngressSummarySatelliteResponse.Size(m) +} +func (m *IngressSummarySatelliteResponse) XXX_DiscardUnknown() { + xxx_messageInfo_IngressSummarySatelliteResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_IngressSummarySatelliteResponse proto.InternalMessageInfo + +func (m *IngressSummarySatelliteResponse) GetSummary() int64 { + if m != nil { + return m.Summary + } + return 0 +} + +type IngressSummaryRequest struct { + Header *RequestHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *IngressSummaryRequest) Reset() { *m = IngressSummaryRequest{} } +func (m *IngressSummaryRequest) String() string { return proto.CompactTextString(m) } +func (*IngressSummaryRequest) ProtoMessage() {} +func (*IngressSummaryRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_9a45fd79b06f3a1b, []int{20} +} +func (m *IngressSummaryRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_IngressSummaryRequest.Unmarshal(m, b) +} +func (m *IngressSummaryRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_IngressSummaryRequest.Marshal(b, m, deterministic) +} +func (m *IngressSummaryRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_IngressSummaryRequest.Merge(m, src) +} +func (m *IngressSummaryRequest) XXX_Size() int { + return xxx_messageInfo_IngressSummaryRequest.Size(m) +} +func (m *IngressSummaryRequest) XXX_DiscardUnknown() { + xxx_messageInfo_IngressSummaryRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_IngressSummaryRequest proto.InternalMessageInfo + +func (m *IngressSummaryRequest) GetHeader() *RequestHeader { + if m != nil { + return m.Header + } + return nil +} + +type IngressSummaryResponse struct { + Summary int64 `protobuf:"varint,1,opt,name=summary,proto3" json:"summary,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *IngressSummaryResponse) Reset() { *m = IngressSummaryResponse{} } +func (m *IngressSummaryResponse) String() string { return proto.CompactTextString(m) } +func (*IngressSummaryResponse) ProtoMessage() {} +func (*IngressSummaryResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_9a45fd79b06f3a1b, []int{21} +} +func (m *IngressSummaryResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_IngressSummaryResponse.Unmarshal(m, b) +} +func (m *IngressSummaryResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_IngressSummaryResponse.Marshal(b, m, deterministic) +} +func (m *IngressSummaryResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_IngressSummaryResponse.Merge(m, src) +} +func (m *IngressSummaryResponse) XXX_Size() int { + return xxx_messageInfo_IngressSummaryResponse.Size(m) +} +func (m *IngressSummaryResponse) XXX_DiscardUnknown() { + xxx_messageInfo_IngressSummaryResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_IngressSummaryResponse proto.InternalMessageInfo + +func (m *IngressSummaryResponse) GetSummary() int64 { + if m != nil { + return m.Summary + } + return 0 +} + +type DailySatelliteRequest struct { + Header *RequestHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` + SatelliteId NodeID `protobuf:"bytes,2,opt,name=satellite_id,json=satelliteId,proto3,customtype=NodeID" json:"satellite_id"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *DailySatelliteRequest) Reset() { *m = DailySatelliteRequest{} } +func (m *DailySatelliteRequest) String() string { return proto.CompactTextString(m) } +func (*DailySatelliteRequest) ProtoMessage() {} +func (*DailySatelliteRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_9a45fd79b06f3a1b, []int{22} +} +func (m *DailySatelliteRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_DailySatelliteRequest.Unmarshal(m, b) +} +func (m *DailySatelliteRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_DailySatelliteRequest.Marshal(b, m, deterministic) +} +func (m *DailySatelliteRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_DailySatelliteRequest.Merge(m, src) +} +func (m *DailySatelliteRequest) XXX_Size() int { + return xxx_messageInfo_DailySatelliteRequest.Size(m) +} +func (m *DailySatelliteRequest) XXX_DiscardUnknown() { + xxx_messageInfo_DailySatelliteRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_DailySatelliteRequest proto.InternalMessageInfo + +func (m *DailySatelliteRequest) GetHeader() *RequestHeader { + if m != nil { + return m.Header + } + return nil +} + +type DailySatelliteResponse struct { + UsageRollup []*UsageRollup `protobuf:"bytes,1,rep,name=usage_rollup,json=usageRollup,proto3" json:"usage_rollup,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *DailySatelliteResponse) Reset() { *m = DailySatelliteResponse{} } +func (m *DailySatelliteResponse) String() string { return proto.CompactTextString(m) } +func (*DailySatelliteResponse) ProtoMessage() {} +func (*DailySatelliteResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_9a45fd79b06f3a1b, []int{23} +} +func (m *DailySatelliteResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_DailySatelliteResponse.Unmarshal(m, b) +} +func (m *DailySatelliteResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_DailySatelliteResponse.Marshal(b, m, deterministic) +} +func (m *DailySatelliteResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_DailySatelliteResponse.Merge(m, src) +} +func (m *DailySatelliteResponse) XXX_Size() int { + return xxx_messageInfo_DailySatelliteResponse.Size(m) +} +func (m *DailySatelliteResponse) XXX_DiscardUnknown() { + xxx_messageInfo_DailySatelliteResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_DailySatelliteResponse proto.InternalMessageInfo + +func (m *DailySatelliteResponse) GetUsageRollup() []*UsageRollup { + if m != nil { + return m.UsageRollup + } + return nil +} + +type DailyRequest struct { + Header *RequestHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *DailyRequest) Reset() { *m = DailyRequest{} } +func (m *DailyRequest) String() string { return proto.CompactTextString(m) } +func (*DailyRequest) ProtoMessage() {} +func (*DailyRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_9a45fd79b06f3a1b, []int{24} +} +func (m *DailyRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_DailyRequest.Unmarshal(m, b) +} +func (m *DailyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_DailyRequest.Marshal(b, m, deterministic) +} +func (m *DailyRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_DailyRequest.Merge(m, src) +} +func (m *DailyRequest) XXX_Size() int { + return xxx_messageInfo_DailyRequest.Size(m) +} +func (m *DailyRequest) XXX_DiscardUnknown() { + xxx_messageInfo_DailyRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_DailyRequest proto.InternalMessageInfo + +func (m *DailyRequest) GetHeader() *RequestHeader { + if m != nil { + return m.Header + } + return nil +} + +type DailyResponse struct { + UsageRollup []*UsageRollup `protobuf:"bytes,1,rep,name=usage_rollup,json=usageRollup,proto3" json:"usage_rollup,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *DailyResponse) Reset() { *m = DailyResponse{} } +func (m *DailyResponse) String() string { return proto.CompactTextString(m) } +func (*DailyResponse) ProtoMessage() {} +func (*DailyResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_9a45fd79b06f3a1b, []int{25} +} +func (m *DailyResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_DailyResponse.Unmarshal(m, b) +} +func (m *DailyResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_DailyResponse.Marshal(b, m, deterministic) +} +func (m *DailyResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_DailyResponse.Merge(m, src) +} +func (m *DailyResponse) XXX_Size() int { + return xxx_messageInfo_DailyResponse.Size(m) +} +func (m *DailyResponse) XXX_DiscardUnknown() { + xxx_messageInfo_DailyResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_DailyResponse proto.InternalMessageInfo + +func (m *DailyResponse) GetUsageRollup() []*UsageRollup { + if m != nil { + return m.UsageRollup + } + return nil +} + +type UsageRollup struct { + Egress *Egress `protobuf:"bytes,1,opt,name=egress,proto3" json:"egress,omitempty"` + Ingress *Ingress `protobuf:"bytes,2,opt,name=ingress,proto3" json:"ingress,omitempty"` + Delete int64 `protobuf:"varint,3,opt,name=delete,proto3" json:"delete,omitempty"` + IntervalStart time.Time `protobuf:"bytes,4,opt,name=interval_start,json=intervalStart,proto3,stdtime" json:"interval_start"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *UsageRollup) Reset() { *m = UsageRollup{} } +func (m *UsageRollup) String() string { return proto.CompactTextString(m) } +func (*UsageRollup) ProtoMessage() {} +func (*UsageRollup) Descriptor() ([]byte, []int) { + return fileDescriptor_9a45fd79b06f3a1b, []int{26} +} +func (m *UsageRollup) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_UsageRollup.Unmarshal(m, b) +} +func (m *UsageRollup) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_UsageRollup.Marshal(b, m, deterministic) +} +func (m *UsageRollup) XXX_Merge(src proto.Message) { + xxx_messageInfo_UsageRollup.Merge(m, src) +} +func (m *UsageRollup) XXX_Size() int { + return xxx_messageInfo_UsageRollup.Size(m) +} +func (m *UsageRollup) XXX_DiscardUnknown() { + xxx_messageInfo_UsageRollup.DiscardUnknown(m) +} + +var xxx_messageInfo_UsageRollup proto.InternalMessageInfo + +func (m *UsageRollup) GetEgress() *Egress { + if m != nil { + return m.Egress + } + return nil +} + +func (m *UsageRollup) GetIngress() *Ingress { + if m != nil { + return m.Ingress + } + return nil +} + +func (m *UsageRollup) GetDelete() int64 { + if m != nil { + return m.Delete + } + return 0 +} + +func (m *UsageRollup) GetIntervalStart() time.Time { + if m != nil { + return m.IntervalStart + } + return time.Time{} +} + +type Egress struct { + Repair int64 `protobuf:"varint,1,opt,name=repair,proto3" json:"repair,omitempty"` + Audit int64 `protobuf:"varint,2,opt,name=audit,proto3" json:"audit,omitempty"` + Usage int64 `protobuf:"varint,3,opt,name=usage,proto3" json:"usage,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Egress) Reset() { *m = Egress{} } +func (m *Egress) String() string { return proto.CompactTextString(m) } +func (*Egress) ProtoMessage() {} +func (*Egress) Descriptor() ([]byte, []int) { + return fileDescriptor_9a45fd79b06f3a1b, []int{27} +} +func (m *Egress) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Egress.Unmarshal(m, b) +} +func (m *Egress) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Egress.Marshal(b, m, deterministic) +} +func (m *Egress) XXX_Merge(src proto.Message) { + xxx_messageInfo_Egress.Merge(m, src) +} +func (m *Egress) XXX_Size() int { + return xxx_messageInfo_Egress.Size(m) +} +func (m *Egress) XXX_DiscardUnknown() { + xxx_messageInfo_Egress.DiscardUnknown(m) +} + +var xxx_messageInfo_Egress proto.InternalMessageInfo + +func (m *Egress) GetRepair() int64 { + if m != nil { + return m.Repair + } + return 0 +} + +func (m *Egress) GetAudit() int64 { + if m != nil { + return m.Audit + } + return 0 +} + +func (m *Egress) GetUsage() int64 { + if m != nil { + return m.Usage + } + return 0 +} + +type Ingress struct { + Repaid int64 `protobuf:"varint,1,opt,name=repaid,proto3" json:"repaid,omitempty"` + Usage int64 `protobuf:"varint,2,opt,name=usage,proto3" json:"usage,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Ingress) Reset() { *m = Ingress{} } +func (m *Ingress) String() string { return proto.CompactTextString(m) } +func (*Ingress) ProtoMessage() {} +func (*Ingress) Descriptor() ([]byte, []int) { + return fileDescriptor_9a45fd79b06f3a1b, []int{28} +} +func (m *Ingress) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Ingress.Unmarshal(m, b) +} +func (m *Ingress) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Ingress.Marshal(b, m, deterministic) +} +func (m *Ingress) XXX_Merge(src proto.Message) { + xxx_messageInfo_Ingress.Merge(m, src) +} +func (m *Ingress) XXX_Size() int { + return xxx_messageInfo_Ingress.Size(m) +} +func (m *Ingress) XXX_DiscardUnknown() { + xxx_messageInfo_Ingress.DiscardUnknown(m) +} + +var xxx_messageInfo_Ingress proto.InternalMessageInfo + +func (m *Ingress) GetRepaid() int64 { + if m != nil { + return m.Repaid + } + return 0 +} + +func (m *Ingress) GetUsage() int64 { + if m != nil { + return m.Usage + } + return 0 +} + type VersionRequest struct { Header *RequestHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` @@ -495,7 +1269,7 @@ func (m *VersionRequest) Reset() { *m = VersionRequest{} } func (m *VersionRequest) String() string { return proto.CompactTextString(m) } func (*VersionRequest) ProtoMessage() {} func (*VersionRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_9a45fd79b06f3a1b, []int{10} + return fileDescriptor_9a45fd79b06f3a1b, []int{29} } func (m *VersionRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_VersionRequest.Unmarshal(m, b) @@ -533,7 +1307,7 @@ func (m *VersionResponse) Reset() { *m = VersionResponse{} } func (m *VersionResponse) String() string { return proto.CompactTextString(m) } func (*VersionResponse) ProtoMessage() {} func (*VersionResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_9a45fd79b06f3a1b, []int{11} + return fileDescriptor_9a45fd79b06f3a1b, []int{30} } func (m *VersionResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_VersionResponse.Unmarshal(m, b) @@ -571,7 +1345,7 @@ func (m *LastContactRequest) Reset() { *m = LastContactRequest{} } func (m *LastContactRequest) String() string { return proto.CompactTextString(m) } func (*LastContactRequest) ProtoMessage() {} func (*LastContactRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_9a45fd79b06f3a1b, []int{12} + return fileDescriptor_9a45fd79b06f3a1b, []int{31} } func (m *LastContactRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_LastContactRequest.Unmarshal(m, b) @@ -609,7 +1383,7 @@ func (m *LastContactResponse) Reset() { *m = LastContactResponse{} } func (m *LastContactResponse) String() string { return proto.CompactTextString(m) } func (*LastContactResponse) ProtoMessage() {} func (*LastContactResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_9a45fd79b06f3a1b, []int{13} + return fileDescriptor_9a45fd79b06f3a1b, []int{32} } func (m *LastContactResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_LastContactResponse.Unmarshal(m, b) @@ -648,7 +1422,7 @@ func (m *ReputationRequest) Reset() { *m = ReputationRequest{} } func (m *ReputationRequest) String() string { return proto.CompactTextString(m) } func (*ReputationRequest) ProtoMessage() {} func (*ReputationRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_9a45fd79b06f3a1b, []int{14} + return fileDescriptor_9a45fd79b06f3a1b, []int{33} } func (m *ReputationRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ReputationRequest.Unmarshal(m, b) @@ -687,7 +1461,7 @@ func (m *ReputationResponse) Reset() { *m = ReputationResponse{} } func (m *ReputationResponse) String() string { return proto.CompactTextString(m) } func (*ReputationResponse) ProtoMessage() {} func (*ReputationResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_9a45fd79b06f3a1b, []int{15} + return fileDescriptor_9a45fd79b06f3a1b, []int{34} } func (m *ReputationResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ReputationResponse.Unmarshal(m, b) @@ -732,7 +1506,7 @@ func (m *ReputationResponse_Online) Reset() { *m = ReputationResponse_On func (m *ReputationResponse_Online) String() string { return proto.CompactTextString(m) } func (*ReputationResponse_Online) ProtoMessage() {} func (*ReputationResponse_Online) Descriptor() ([]byte, []int) { - return fileDescriptor_9a45fd79b06f3a1b, []int{15, 0} + return fileDescriptor_9a45fd79b06f3a1b, []int{34, 0} } func (m *ReputationResponse_Online) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ReputationResponse_Online.Unmarshal(m, b) @@ -771,7 +1545,7 @@ func (m *ReputationResponse_Audit) Reset() { *m = ReputationResponse_Aud func (m *ReputationResponse_Audit) String() string { return proto.CompactTextString(m) } func (*ReputationResponse_Audit) ProtoMessage() {} func (*ReputationResponse_Audit) Descriptor() ([]byte, []int) { - return fileDescriptor_9a45fd79b06f3a1b, []int{15, 1} + return fileDescriptor_9a45fd79b06f3a1b, []int{34, 1} } func (m *ReputationResponse_Audit) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ReputationResponse_Audit.Unmarshal(m, b) @@ -816,7 +1590,7 @@ func (m *TrustedSatellitesRequest) Reset() { *m = TrustedSatellitesReque func (m *TrustedSatellitesRequest) String() string { return proto.CompactTextString(m) } func (*TrustedSatellitesRequest) ProtoMessage() {} func (*TrustedSatellitesRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_9a45fd79b06f3a1b, []int{16} + return fileDescriptor_9a45fd79b06f3a1b, []int{35} } func (m *TrustedSatellitesRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_TrustedSatellitesRequest.Unmarshal(m, b) @@ -854,7 +1628,7 @@ func (m *TrustedSatellitesResponse) Reset() { *m = TrustedSatellitesResp func (m *TrustedSatellitesResponse) String() string { return proto.CompactTextString(m) } func (*TrustedSatellitesResponse) ProtoMessage() {} func (*TrustedSatellitesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_9a45fd79b06f3a1b, []int{17} + return fileDescriptor_9a45fd79b06f3a1b, []int{36} } func (m *TrustedSatellitesResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_TrustedSatellitesResponse.Unmarshal(m, b) @@ -893,7 +1667,7 @@ func (m *TrustedSatellitesResponse_NodeURL) Reset() { *m = TrustedSatell func (m *TrustedSatellitesResponse_NodeURL) String() string { return proto.CompactTextString(m) } func (*TrustedSatellitesResponse_NodeURL) ProtoMessage() {} func (*TrustedSatellitesResponse_NodeURL) Descriptor() ([]byte, []int) { - return fileDescriptor_9a45fd79b06f3a1b, []int{17, 0} + return fileDescriptor_9a45fd79b06f3a1b, []int{36, 0} } func (m *TrustedSatellitesResponse_NodeURL) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_TrustedSatellitesResponse_NodeURL.Unmarshal(m, b) @@ -931,7 +1705,7 @@ func (m *OperatorRequest) Reset() { *m = OperatorRequest{} } func (m *OperatorRequest) String() string { return proto.CompactTextString(m) } func (*OperatorRequest) ProtoMessage() {} func (*OperatorRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_9a45fd79b06f3a1b, []int{18} + return fileDescriptor_9a45fd79b06f3a1b, []int{37} } func (m *OperatorRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_OperatorRequest.Unmarshal(m, b) @@ -971,7 +1745,7 @@ func (m *OperatorResponse) Reset() { *m = OperatorResponse{} } func (m *OperatorResponse) String() string { return proto.CompactTextString(m) } func (*OperatorResponse) ProtoMessage() {} func (*OperatorResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_9a45fd79b06f3a1b, []int{19} + return fileDescriptor_9a45fd79b06f3a1b, []int{38} } func (m *OperatorResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_OperatorResponse.Unmarshal(m, b) @@ -1024,7 +1798,7 @@ func (m *EstimatedPayoutSatelliteRequest) Reset() { *m = EstimatedPayout func (m *EstimatedPayoutSatelliteRequest) String() string { return proto.CompactTextString(m) } func (*EstimatedPayoutSatelliteRequest) ProtoMessage() {} func (*EstimatedPayoutSatelliteRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_9a45fd79b06f3a1b, []int{20} + return fileDescriptor_9a45fd79b06f3a1b, []int{39} } func (m *EstimatedPayoutSatelliteRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_EstimatedPayoutSatelliteRequest.Unmarshal(m, b) @@ -1062,7 +1836,7 @@ func (m *EstimatedPayoutSatelliteResponse) Reset() { *m = EstimatedPayou func (m *EstimatedPayoutSatelliteResponse) String() string { return proto.CompactTextString(m) } func (*EstimatedPayoutSatelliteResponse) ProtoMessage() {} func (*EstimatedPayoutSatelliteResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_9a45fd79b06f3a1b, []int{21} + return fileDescriptor_9a45fd79b06f3a1b, []int{40} } func (m *EstimatedPayoutSatelliteResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_EstimatedPayoutSatelliteResponse.Unmarshal(m, b) @@ -1100,7 +1874,7 @@ func (m *EstimatedPayoutRequest) Reset() { *m = EstimatedPayoutRequest{} func (m *EstimatedPayoutRequest) String() string { return proto.CompactTextString(m) } func (*EstimatedPayoutRequest) ProtoMessage() {} func (*EstimatedPayoutRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_9a45fd79b06f3a1b, []int{22} + return fileDescriptor_9a45fd79b06f3a1b, []int{41} } func (m *EstimatedPayoutRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_EstimatedPayoutRequest.Unmarshal(m, b) @@ -1138,7 +1912,7 @@ func (m *EstimatedPayoutResponse) Reset() { *m = EstimatedPayoutResponse func (m *EstimatedPayoutResponse) String() string { return proto.CompactTextString(m) } func (*EstimatedPayoutResponse) ProtoMessage() {} func (*EstimatedPayoutResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_9a45fd79b06f3a1b, []int{23} + return fileDescriptor_9a45fd79b06f3a1b, []int{42} } func (m *EstimatedPayoutResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_EstimatedPayoutResponse.Unmarshal(m, b) @@ -1176,7 +1950,7 @@ func (m *SummaryRequest) Reset() { *m = SummaryRequest{} } func (m *SummaryRequest) String() string { return proto.CompactTextString(m) } func (*SummaryRequest) ProtoMessage() {} func (*SummaryRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_9a45fd79b06f3a1b, []int{24} + return fileDescriptor_9a45fd79b06f3a1b, []int{43} } func (m *SummaryRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SummaryRequest.Unmarshal(m, b) @@ -1214,7 +1988,7 @@ func (m *SummaryResponse) Reset() { *m = SummaryResponse{} } func (m *SummaryResponse) String() string { return proto.CompactTextString(m) } func (*SummaryResponse) ProtoMessage() {} func (*SummaryResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_9a45fd79b06f3a1b, []int{25} + return fileDescriptor_9a45fd79b06f3a1b, []int{44} } func (m *SummaryResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SummaryResponse.Unmarshal(m, b) @@ -1253,7 +2027,7 @@ func (m *SummaryPeriodRequest) Reset() { *m = SummaryPeriodRequest{} } func (m *SummaryPeriodRequest) String() string { return proto.CompactTextString(m) } func (*SummaryPeriodRequest) ProtoMessage() {} func (*SummaryPeriodRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_9a45fd79b06f3a1b, []int{26} + return fileDescriptor_9a45fd79b06f3a1b, []int{45} } func (m *SummaryPeriodRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SummaryPeriodRequest.Unmarshal(m, b) @@ -1298,7 +2072,7 @@ func (m *SummaryPeriodResponse) Reset() { *m = SummaryPeriodResponse{} } func (m *SummaryPeriodResponse) String() string { return proto.CompactTextString(m) } func (*SummaryPeriodResponse) ProtoMessage() {} func (*SummaryPeriodResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_9a45fd79b06f3a1b, []int{27} + return fileDescriptor_9a45fd79b06f3a1b, []int{46} } func (m *SummaryPeriodResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SummaryPeriodResponse.Unmarshal(m, b) @@ -1337,7 +2111,7 @@ func (m *SummarySatelliteRequest) Reset() { *m = SummarySatelliteRequest func (m *SummarySatelliteRequest) String() string { return proto.CompactTextString(m) } func (*SummarySatelliteRequest) ProtoMessage() {} func (*SummarySatelliteRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_9a45fd79b06f3a1b, []int{28} + return fileDescriptor_9a45fd79b06f3a1b, []int{47} } func (m *SummarySatelliteRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SummarySatelliteRequest.Unmarshal(m, b) @@ -1375,7 +2149,7 @@ func (m *SummarySatelliteResponse) Reset() { *m = SummarySatelliteRespon func (m *SummarySatelliteResponse) String() string { return proto.CompactTextString(m) } func (*SummarySatelliteResponse) ProtoMessage() {} func (*SummarySatelliteResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_9a45fd79b06f3a1b, []int{29} + return fileDescriptor_9a45fd79b06f3a1b, []int{48} } func (m *SummarySatelliteResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SummarySatelliteResponse.Unmarshal(m, b) @@ -1415,7 +2189,7 @@ func (m *SummarySatellitePeriodRequest) Reset() { *m = SummarySatelliteP func (m *SummarySatellitePeriodRequest) String() string { return proto.CompactTextString(m) } func (*SummarySatellitePeriodRequest) ProtoMessage() {} func (*SummarySatellitePeriodRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_9a45fd79b06f3a1b, []int{30} + return fileDescriptor_9a45fd79b06f3a1b, []int{49} } func (m *SummarySatellitePeriodRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SummarySatellitePeriodRequest.Unmarshal(m, b) @@ -1460,7 +2234,7 @@ func (m *SummarySatellitePeriodResponse) Reset() { *m = SummarySatellite func (m *SummarySatellitePeriodResponse) String() string { return proto.CompactTextString(m) } func (*SummarySatellitePeriodResponse) ProtoMessage() {} func (*SummarySatellitePeriodResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_9a45fd79b06f3a1b, []int{31} + return fileDescriptor_9a45fd79b06f3a1b, []int{50} } func (m *SummarySatellitePeriodResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SummarySatellitePeriodResponse.Unmarshal(m, b) @@ -1498,7 +2272,7 @@ func (m *EarnedRequest) Reset() { *m = EarnedRequest{} } func (m *EarnedRequest) String() string { return proto.CompactTextString(m) } func (*EarnedRequest) ProtoMessage() {} func (*EarnedRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_9a45fd79b06f3a1b, []int{32} + return fileDescriptor_9a45fd79b06f3a1b, []int{51} } func (m *EarnedRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_EarnedRequest.Unmarshal(m, b) @@ -1536,7 +2310,7 @@ func (m *EarnedResponse) Reset() { *m = EarnedResponse{} } func (m *EarnedResponse) String() string { return proto.CompactTextString(m) } func (*EarnedResponse) ProtoMessage() {} func (*EarnedResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_9a45fd79b06f3a1b, []int{33} + return fileDescriptor_9a45fd79b06f3a1b, []int{52} } func (m *EarnedResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_EarnedResponse.Unmarshal(m, b) @@ -1574,7 +2348,7 @@ func (m *EarnedSatelliteRequest) Reset() { *m = EarnedSatelliteRequest{} func (m *EarnedSatelliteRequest) String() string { return proto.CompactTextString(m) } func (*EarnedSatelliteRequest) ProtoMessage() {} func (*EarnedSatelliteRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_9a45fd79b06f3a1b, []int{34} + return fileDescriptor_9a45fd79b06f3a1b, []int{53} } func (m *EarnedSatelliteRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_EarnedSatelliteRequest.Unmarshal(m, b) @@ -1612,7 +2386,7 @@ func (m *EarnedSatelliteResponse) Reset() { *m = EarnedSatelliteResponse func (m *EarnedSatelliteResponse) String() string { return proto.CompactTextString(m) } func (*EarnedSatelliteResponse) ProtoMessage() {} func (*EarnedSatelliteResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_9a45fd79b06f3a1b, []int{35} + return fileDescriptor_9a45fd79b06f3a1b, []int{54} } func (m *EarnedSatelliteResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_EarnedSatelliteResponse.Unmarshal(m, b) @@ -1651,7 +2425,7 @@ func (m *EarnedSatellite) Reset() { *m = EarnedSatellite{} } func (m *EarnedSatellite) String() string { return proto.CompactTextString(m) } func (*EarnedSatellite) ProtoMessage() {} func (*EarnedSatellite) Descriptor() ([]byte, []int) { - return fileDescriptor_9a45fd79b06f3a1b, []int{36} + return fileDescriptor_9a45fd79b06f3a1b, []int{55} } func (m *EarnedSatellite) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_EarnedSatellite.Unmarshal(m, b) @@ -1689,7 +2463,7 @@ func (m *UndistributedRequest) Reset() { *m = UndistributedRequest{} } func (m *UndistributedRequest) String() string { return proto.CompactTextString(m) } func (*UndistributedRequest) ProtoMessage() {} func (*UndistributedRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_9a45fd79b06f3a1b, []int{37} + return fileDescriptor_9a45fd79b06f3a1b, []int{56} } func (m *UndistributedRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_UndistributedRequest.Unmarshal(m, b) @@ -1727,7 +2501,7 @@ func (m *UndistributedResponse) Reset() { *m = UndistributedResponse{} } func (m *UndistributedResponse) String() string { return proto.CompactTextString(m) } func (*UndistributedResponse) ProtoMessage() {} func (*UndistributedResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_9a45fd79b06f3a1b, []int{38} + return fileDescriptor_9a45fd79b06f3a1b, []int{57} } func (m *UndistributedResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_UndistributedResponse.Unmarshal(m, b) @@ -1766,7 +2540,7 @@ func (m *PaystubSatelliteRequest) Reset() { *m = PaystubSatelliteRequest func (m *PaystubSatelliteRequest) String() string { return proto.CompactTextString(m) } func (*PaystubSatelliteRequest) ProtoMessage() {} func (*PaystubSatelliteRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_9a45fd79b06f3a1b, []int{39} + return fileDescriptor_9a45fd79b06f3a1b, []int{58} } func (m *PaystubSatelliteRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PaystubSatelliteRequest.Unmarshal(m, b) @@ -1804,7 +2578,7 @@ func (m *PaystubSatelliteResponse) Reset() { *m = PaystubSatelliteRespon func (m *PaystubSatelliteResponse) String() string { return proto.CompactTextString(m) } func (*PaystubSatelliteResponse) ProtoMessage() {} func (*PaystubSatelliteResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_9a45fd79b06f3a1b, []int{40} + return fileDescriptor_9a45fd79b06f3a1b, []int{59} } func (m *PaystubSatelliteResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PaystubSatelliteResponse.Unmarshal(m, b) @@ -1842,7 +2616,7 @@ func (m *PaystubRequest) Reset() { *m = PaystubRequest{} } func (m *PaystubRequest) String() string { return proto.CompactTextString(m) } func (*PaystubRequest) ProtoMessage() {} func (*PaystubRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_9a45fd79b06f3a1b, []int{41} + return fileDescriptor_9a45fd79b06f3a1b, []int{60} } func (m *PaystubRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PaystubRequest.Unmarshal(m, b) @@ -1880,7 +2654,7 @@ func (m *PaystubResponse) Reset() { *m = PaystubResponse{} } func (m *PaystubResponse) String() string { return proto.CompactTextString(m) } func (*PaystubResponse) ProtoMessage() {} func (*PaystubResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_9a45fd79b06f3a1b, []int{42} + return fileDescriptor_9a45fd79b06f3a1b, []int{61} } func (m *PaystubResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PaystubResponse.Unmarshal(m, b) @@ -1919,7 +2693,7 @@ func (m *PaystubPeriodRequest) Reset() { *m = PaystubPeriodRequest{} } func (m *PaystubPeriodRequest) String() string { return proto.CompactTextString(m) } func (*PaystubPeriodRequest) ProtoMessage() {} func (*PaystubPeriodRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_9a45fd79b06f3a1b, []int{43} + return fileDescriptor_9a45fd79b06f3a1b, []int{62} } func (m *PaystubPeriodRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PaystubPeriodRequest.Unmarshal(m, b) @@ -1964,7 +2738,7 @@ func (m *PaystubPeriodResponse) Reset() { *m = PaystubPeriodResponse{} } func (m *PaystubPeriodResponse) String() string { return proto.CompactTextString(m) } func (*PaystubPeriodResponse) ProtoMessage() {} func (*PaystubPeriodResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_9a45fd79b06f3a1b, []int{44} + return fileDescriptor_9a45fd79b06f3a1b, []int{63} } func (m *PaystubPeriodResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PaystubPeriodResponse.Unmarshal(m, b) @@ -2004,7 +2778,7 @@ func (m *PaystubSatellitePeriodRequest) Reset() { *m = PaystubSatelliteP func (m *PaystubSatellitePeriodRequest) String() string { return proto.CompactTextString(m) } func (*PaystubSatellitePeriodRequest) ProtoMessage() {} func (*PaystubSatellitePeriodRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_9a45fd79b06f3a1b, []int{45} + return fileDescriptor_9a45fd79b06f3a1b, []int{64} } func (m *PaystubSatellitePeriodRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PaystubSatellitePeriodRequest.Unmarshal(m, b) @@ -2049,7 +2823,7 @@ func (m *PaystubSatellitePeriodResponse) Reset() { *m = PaystubSatellite func (m *PaystubSatellitePeriodResponse) String() string { return proto.CompactTextString(m) } func (*PaystubSatellitePeriodResponse) ProtoMessage() {} func (*PaystubSatellitePeriodResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_9a45fd79b06f3a1b, []int{46} + return fileDescriptor_9a45fd79b06f3a1b, []int{65} } func (m *PaystubSatellitePeriodResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PaystubSatellitePeriodResponse.Unmarshal(m, b) @@ -2088,7 +2862,7 @@ func (m *PayoutInfo) Reset() { *m = PayoutInfo{} } func (m *PayoutInfo) String() string { return proto.CompactTextString(m) } func (*PayoutInfo) ProtoMessage() {} func (*PayoutInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_9a45fd79b06f3a1b, []int{47} + return fileDescriptor_9a45fd79b06f3a1b, []int{66} } func (m *PayoutInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PayoutInfo.Unmarshal(m, b) @@ -2144,7 +2918,7 @@ func (m *Paystub) Reset() { *m = Paystub{} } func (m *Paystub) String() string { return proto.CompactTextString(m) } func (*Paystub) ProtoMessage() {} func (*Paystub) Descriptor() ([]byte, []int) { - return fileDescriptor_9a45fd79b06f3a1b, []int{48} + return fileDescriptor_9a45fd79b06f3a1b, []int{67} } func (m *Paystub) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Paystub.Unmarshal(m, b) @@ -2259,7 +3033,7 @@ func (m *HeldAmountHistoryRequest) Reset() { *m = HeldAmountHistoryReque func (m *HeldAmountHistoryRequest) String() string { return proto.CompactTextString(m) } func (*HeldAmountHistoryRequest) ProtoMessage() {} func (*HeldAmountHistoryRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_9a45fd79b06f3a1b, []int{49} + return fileDescriptor_9a45fd79b06f3a1b, []int{68} } func (m *HeldAmountHistoryRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_HeldAmountHistoryRequest.Unmarshal(m, b) @@ -2297,7 +3071,7 @@ func (m *HeldAmountHistoryResponse) Reset() { *m = HeldAmountHistoryResp func (m *HeldAmountHistoryResponse) String() string { return proto.CompactTextString(m) } func (*HeldAmountHistoryResponse) ProtoMessage() {} func (*HeldAmountHistoryResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_9a45fd79b06f3a1b, []int{50} + return fileDescriptor_9a45fd79b06f3a1b, []int{69} } func (m *HeldAmountHistoryResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_HeldAmountHistoryResponse.Unmarshal(m, b) @@ -2336,7 +3110,7 @@ func (m *HeldAmountHistoryResponse_HeldAmount) Reset() { *m = HeldAmount func (m *HeldAmountHistoryResponse_HeldAmount) String() string { return proto.CompactTextString(m) } func (*HeldAmountHistoryResponse_HeldAmount) ProtoMessage() {} func (*HeldAmountHistoryResponse_HeldAmount) Descriptor() ([]byte, []int) { - return fileDescriptor_9a45fd79b06f3a1b, []int{50, 0} + return fileDescriptor_9a45fd79b06f3a1b, []int{69, 0} } func (m *HeldAmountHistoryResponse_HeldAmount) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_HeldAmountHistoryResponse_HeldAmount.Unmarshal(m, b) @@ -2386,7 +3160,7 @@ func (m *HeldAmountHistoryResponse_HeldAmountHistory) String() string { } func (*HeldAmountHistoryResponse_HeldAmountHistory) ProtoMessage() {} func (*HeldAmountHistoryResponse_HeldAmountHistory) Descriptor() ([]byte, []int) { - return fileDescriptor_9a45fd79b06f3a1b, []int{50, 1} + return fileDescriptor_9a45fd79b06f3a1b, []int{69, 1} } func (m *HeldAmountHistoryResponse_HeldAmountHistory) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_HeldAmountHistoryResponse_HeldAmountHistory.Unmarshal(m, b) @@ -2424,6 +3198,25 @@ func init() { proto.RegisterType((*StorageUsageSatelliteResponse)(nil), "multinode.StorageUsageSatelliteResponse") proto.RegisterType((*BandwidthMonthSummaryRequest)(nil), "multinode.BandwidthMonthSummaryRequest") proto.RegisterType((*BandwidthMonthSummaryResponse)(nil), "multinode.BandwidthMonthSummaryResponse") + proto.RegisterType((*BandwidthSummarySatelliteRequest)(nil), "multinode.BandwidthSummarySatelliteRequest") + proto.RegisterType((*BandwidthSummarySatelliteResponse)(nil), "multinode.BandwidthSummarySatelliteResponse") + proto.RegisterType((*BandwidthSummaryRequest)(nil), "multinode.BandwidthSummaryRequest") + proto.RegisterType((*BandwidthSummaryResponse)(nil), "multinode.BandwidthSummaryResponse") + proto.RegisterType((*EgressSummarySatelliteRequest)(nil), "multinode.EgressSummarySatelliteRequest") + proto.RegisterType((*EgressSummarySatelliteResponse)(nil), "multinode.EgressSummarySatelliteResponse") + proto.RegisterType((*EgressSummaryRequest)(nil), "multinode.EgressSummaryRequest") + proto.RegisterType((*EgressSummaryResponse)(nil), "multinode.EgressSummaryResponse") + proto.RegisterType((*IngressSummarySatelliteRequest)(nil), "multinode.IngressSummarySatelliteRequest") + proto.RegisterType((*IngressSummarySatelliteResponse)(nil), "multinode.IngressSummarySatelliteResponse") + proto.RegisterType((*IngressSummaryRequest)(nil), "multinode.IngressSummaryRequest") + proto.RegisterType((*IngressSummaryResponse)(nil), "multinode.IngressSummaryResponse") + proto.RegisterType((*DailySatelliteRequest)(nil), "multinode.DailySatelliteRequest") + proto.RegisterType((*DailySatelliteResponse)(nil), "multinode.DailySatelliteResponse") + proto.RegisterType((*DailyRequest)(nil), "multinode.DailyRequest") + proto.RegisterType((*DailyResponse)(nil), "multinode.DailyResponse") + proto.RegisterType((*UsageRollup)(nil), "multinode.UsageRollup") + proto.RegisterType((*Egress)(nil), "multinode.Egress") + proto.RegisterType((*Ingress)(nil), "multinode.Ingress") proto.RegisterType((*VersionRequest)(nil), "multinode.VersionRequest") proto.RegisterType((*VersionResponse)(nil), "multinode.VersionResponse") proto.RegisterType((*LastContactRequest)(nil), "multinode.LastContactRequest") @@ -2475,122 +3268,146 @@ func init() { func init() { proto.RegisterFile("multinode.proto", fileDescriptor_9a45fd79b06f3a1b) } var fileDescriptor_9a45fd79b06f3a1b = []byte{ - // 1868 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x59, 0xcd, 0x73, 0xe4, 0x46, - 0x15, 0x67, 0x3c, 0xf6, 0x8c, 0xe7, 0xcd, 0x97, 0xdd, 0xf1, 0xda, 0x63, 0xad, 0xbf, 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, 0x6b, 0x49, 0x96, 0x07, 0x1e, 0x00, 0x00, + // 2243 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x59, 0xcd, 0x73, 0x1c, 0x47, + 0x15, 0x67, 0xb5, 0xd2, 0xae, 0xf6, 0xed, 0x97, 0xd4, 0xd1, 0xc7, 0x6a, 0x62, 0x7d, 0x78, 0xe4, + 0xb2, 0x65, 0xec, 0x48, 0x44, 0x71, 0x05, 0x12, 0x92, 0xc2, 0x92, 0x2d, 0x47, 0x8a, 0x45, 0x2c, + 0x46, 0x32, 0x95, 0x8a, 0x0b, 0xaf, 0x47, 0x9a, 0x96, 0x34, 0x64, 0x76, 0x67, 0x98, 0xee, 0x55, + 0x50, 0x15, 0x15, 0x38, 0x40, 0x38, 0x51, 0xc5, 0x99, 0xe2, 0xff, 0xe0, 0xc8, 0x8d, 0x4a, 0x15, + 0xff, 0x01, 0x87, 0x50, 0xc5, 0x8d, 0x33, 0x07, 0xae, 0x54, 0x7f, 0xcc, 0x47, 0xcf, 0xce, 0xec, + 0xca, 0xb3, 0x50, 0xe2, 0x36, 0xfd, 0x3e, 0x7e, 0xfd, 0xfa, 0xbd, 0xee, 0x37, 0xfd, 0x5e, 0x43, + 0xb3, 0xd3, 0x73, 0xa8, 0xdd, 0x75, 0x2d, 0xbc, 0xee, 0xf9, 0x2e, 0x75, 0x51, 0x25, 0x24, 0x68, + 0x70, 0xe6, 0x9e, 0xb9, 0x82, 0xac, 0x2d, 0x9f, 0xb9, 0xee, 0x99, 0x83, 0x37, 0xf8, 0xe8, 0xb8, + 0x77, 0xba, 0x41, 0xed, 0x0e, 0x26, 0xd4, 0xec, 0x78, 0x42, 0x40, 0x5f, 0x83, 0xba, 0x81, 0x7f, + 0xd6, 0xc3, 0x84, 0xee, 0x62, 0xd3, 0xc2, 0x3e, 0x9a, 0x87, 0xb2, 0xe9, 0xd9, 0xed, 0xcf, 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0x75, 0x9f, 0x28, 0xf0, 0xf8, 0xb7, + 0xfe, 0xbb, 0x22, 0x94, 0x25, 0x14, 0xd2, 0xa1, 0x2e, 0x6a, 0x6f, 0xd9, 0xd4, 0x0f, 0xda, 0xf9, + 0x9c, 0xb8, 0xc5, 0x7b, 0xfa, 0xe8, 0x4d, 0xa8, 0x08, 0x99, 0x33, 0x1c, 0x14, 0x9e, 0x93, 0x9c, + 0xf0, 0x11, 0xa6, 0x68, 0x0d, 0xa6, 0x42, 0x66, 0x5b, 0xd6, 0xac, 0xa2, 0x0c, 0x6d, 0x04, 0x32, + 0x86, 0xa8, 0x5d, 0x6f, 0x43, 0x33, 0x92, 0x14, 0x85, 0x87, 0x78, 0xa2, 0xa8, 0x07, 0x82, 0xa2, + 0x64, 0x58, 0x81, 0xda, 0x89, 0xdb, 0xf1, 0x42, 0x8b, 0xc4, 0x73, 0x05, 0x30, 0x9a, 0x34, 0x68, + 0x01, 0x26, 0xb9, 0x04, 0xb3, 0x47, 0xbc, 0x57, 0x94, 0xd9, 0x98, 0x99, 0x73, 0x1b, 0x9a, 0x01, + 0x2b, 0xb0, 0xa6, 0x2c, 0x26, 0x91, 0x12, 0xd2, 0x98, 0x5b, 0xd0, 0x08, 0xe5, 0x84, 0x2d, 0x93, + 0x5c, 0xac, 0x26, 0xc5, 0x84, 0x29, 0x81, 0x47, 0x2b, 0x29, 0x1e, 0x85, 0xc8, 0xa3, 0x68, 0x05, + 0xaa, 0xb1, 0xdc, 0xd4, 0xaa, 0x72, 0x56, 0x9c, 0x84, 0x34, 0x98, 0xb4, 0x6c, 0xe2, 0xb9, 0x04, + 0x5b, 0xad, 0x9a, 0x70, 0x61, 0x30, 0x66, 0x25, 0xce, 0x2e, 0x76, 0xac, 0xad, 0x8e, 0xdb, 0xeb, + 0xd2, 0x5d, 0x9b, 0x50, 0x77, 0x94, 0x3b, 0xdb, 0xd7, 0x63, 0xb0, 0x90, 0x02, 0x27, 0xf7, 0xd7, + 0x01, 0x94, 0xcf, 0x05, 0x49, 0xfe, 0x2b, 0xde, 0x8d, 0x01, 0x66, 0xaa, 0xa5, 0x70, 0x02, 0x18, + 0xed, 0x03, 0x80, 0x88, 0x1b, 0xdb, 0xf9, 0x85, 0xf8, 0xce, 0x67, 0x74, 0x93, 0x4b, 0xc8, 0x0d, + 0x24, 0x47, 0xda, 0x1f, 0x0a, 0x30, 0xdd, 0x07, 0xde, 0x77, 0xe4, 0x0a, 0xc3, 0x8f, 0x9c, 0x01, + 0x35, 0x16, 0x9e, 0xb6, 0xc0, 0x65, 0xf5, 0x12, 0x5b, 0xdd, 0xc6, 0x6b, 0xae, 0xce, 0xa8, 0x9e, + 0x87, 0xdf, 0x64, 0xf3, 0x57, 0x63, 0x50, 0x96, 0x8f, 0x06, 0xe8, 0x09, 0x54, 0xc2, 0x87, 0x3c, + 0xf4, 0x66, 0x0c, 0x36, 0xf9, 0x4a, 0xa8, 0xdd, 0x48, 0x67, 0xca, 0x00, 0xec, 0xc2, 0x84, 0x78, + 0x48, 0x5b, 0xca, 0x7a, 0x99, 0x90, 0x30, 0xcb, 0x99, 0x7c, 0x89, 0x74, 0x02, 0x0d, 0xf5, 0x2d, + 0x04, 0xdd, 0xc9, 0x50, 0x49, 0xfe, 0x03, 0xb5, 0xb5, 0xe1, 0x82, 0x62, 0x92, 0xcd, 0x7f, 0x94, + 0xa0, 0x12, 0x36, 0xdf, 0x91, 0x09, 0xb5, 0xf8, 0x5b, 0x86, 0x32, 0xe1, 0xa0, 0xf7, 0x13, 0x65, + 0xc2, 0xc1, 0xcf, 0x22, 0x17, 0xb0, 0x90, 0xf9, 0xf0, 0x80, 0xee, 0xa5, 0xc1, 0x64, 0xdc, 0xd1, + 0xb5, 0xfb, 0x57, 0x13, 0x0e, 0x6b, 0xff, 0xa9, 0xa4, 0x10, 0xd2, 0x07, 0x20, 0x04, 0xb3, 0xac, + 0x0e, 0x94, 0x91, 0xe0, 0x1d, 0x98, 0x4b, 0x7f, 0x04, 0x40, 0x6b, 0x7d, 0x0d, 0xca, 0xac, 0xe5, + 0xdc, 0xbd, 0x82, 0xa4, 0x9c, 0xce, 0x80, 0xba, 0x22, 0x81, 0x96, 0xb3, 0x74, 0x03, 0xf0, 0x95, + 0x6c, 0x01, 0x89, 0xe9, 0xc1, 0x7c, 0x46, 0x1b, 0x1e, 0xdd, 0xed, 0x6f, 0x9c, 0x66, 0x2d, 0xe2, + 0xdb, 0x57, 0x11, 0x95, 0x33, 0x3e, 0x87, 0x86, 0x2a, 0x82, 0x56, 0x32, 0xb5, 0x03, 0xfc, 0x9b, + 0x03, 0x24, 0x22, 0x58, 0xb5, 0x2b, 0xae, 0xc0, 0xa6, 0xb6, 0xeb, 0x15, 0xd8, 0x8c, 0x96, 0xfa, + 0xfb, 0x30, 0xc1, 0x39, 0x68, 0x3e, 0x29, 0x1b, 0x80, 0xb4, 0xfa, 0x19, 0xf2, 0x90, 0x7d, 0x55, + 0x84, 0x71, 0x96, 0xd3, 0xd0, 0x43, 0x28, 0xcb, 0xae, 0x29, 0x5a, 0x88, 0x49, 0xab, 0xdd, 0x58, + 0x4d, 0x4b, 0x63, 0x49, 0x33, 0xf6, 0xa1, 0x1a, 0x6b, 0x81, 0xa2, 0xc5, 0x98, 0x68, 0x7f, 0x8b, + 0x55, 0x5b, 0xca, 0x62, 0x4b, 0xb4, 0x3d, 0x80, 0xa8, 0x13, 0x88, 0x6e, 0x64, 0x34, 0x08, 0x05, + 0xd6, 0xe2, 0xc0, 0xf6, 0x21, 0x7a, 0x09, 0xd3, 0x7d, 0x6d, 0x33, 0xb4, 0x3a, 0xb8, 0xa9, 0x26, + 0x80, 0x6f, 0x5d, 0xa5, 0xf3, 0x86, 0x1e, 0xc1, 0x64, 0xd0, 0xcb, 0x42, 0x71, 0x07, 0x25, 0xba, + 0x64, 0xda, 0x9b, 0xa9, 0x3c, 0x19, 0x88, 0x7f, 0x56, 0xf8, 0xcd, 0xc8, 0xed, 0x51, 0xc2, 0x62, + 0x11, 0xec, 0x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0xa9, 0x04, 0x5f, 0xa6, 0x5d, 0x8c, 0x57, + 0x07, 0xdf, 0x67, 0xfb, 0x13, 0x66, 0xe6, 0xa5, 0x77, 0xfb, 0xd6, 0x67, 0x3a, 0x23, 0xfc, 0x74, + 0xdd, 0x76, 0x37, 0xf8, 0xc7, 0x86, 0xe7, 0xdb, 0x17, 0x26, 0xc5, 0x1b, 0xa1, 0xb6, 0x77, 0x7c, + 0x5c, 0xe2, 0xaf, 0x63, 0xef, 0xfc, 0x27, 0x00, 0x00, 0xff, 0xff, 0x19, 0x8f, 0x1f, 0x0e, 0x82, + 0x27, 0x00, 0x00, } diff --git a/private/multinodepb/multinode.proto b/private/multinodepb/multinode.proto index a54ed3e5f..82ea24e1b 100644 --- a/private/multinodepb/multinode.proto +++ b/private/multinodepb/multinode.proto @@ -60,6 +60,14 @@ message StorageUsageSatelliteResponse { service Bandwidth { rpc MonthSummary(BandwidthMonthSummaryRequest) returns (BandwidthMonthSummaryResponse); + rpc BandwidthSummarySatellite(BandwidthSummarySatelliteRequest) returns (BandwidthSummarySatelliteResponse); + rpc BandwidthSummary(BandwidthSummaryRequest) returns (BandwidthSummaryResponse); + rpc EgressSummarySatellite(EgressSummarySatelliteRequest) returns (EgressSummarySatelliteResponse); + rpc EgressSummary(EgressSummaryRequest) returns (EgressSummaryResponse); + rpc IngressSummarySatellite(IngressSummarySatelliteRequest) returns (IngressSummarySatelliteResponse); + rpc IngressSummary(IngressSummaryRequest) returns (IngressSummaryResponse); + rpc DailySatellite(DailySatelliteRequest) returns (DailySatelliteResponse); + rpc Daily(DailyRequest) returns (DailyResponse); } message BandwidthMonthSummaryRequest { @@ -70,6 +78,92 @@ message BandwidthMonthSummaryResponse { int64 used = 1; } +message BandwidthSummarySatelliteRequest { + RequestHeader header = 1; + bytes satellite_id = 2 [(gogoproto.customtype) = "NodeID", (gogoproto.nullable) = false]; +} + +message BandwidthSummarySatelliteResponse { + int64 summary = 1; +} + +message BandwidthSummaryRequest { + RequestHeader header = 1; +} + +message BandwidthSummaryResponse { + int64 summary = 1; +} + +message EgressSummarySatelliteRequest { + RequestHeader header = 1; + bytes satellite_id = 2 [(gogoproto.customtype) = "NodeID", (gogoproto.nullable) = false]; +} + +message EgressSummarySatelliteResponse { + int64 summary = 1; +} + +message EgressSummaryRequest { + RequestHeader header = 1; +} + +message EgressSummaryResponse { + int64 summary = 1; +} + +message IngressSummarySatelliteRequest { + RequestHeader header = 1; + bytes satellite_id = 2 [(gogoproto.customtype) = "NodeID", (gogoproto.nullable) = false]; +} + +message IngressSummarySatelliteResponse { + int64 summary = 1; +} + +message IngressSummaryRequest { + RequestHeader header = 1; +} + +message IngressSummaryResponse { + int64 summary = 1; +} + +message DailySatelliteRequest { + RequestHeader header = 1; + bytes satellite_id = 2 [(gogoproto.customtype) = "NodeID", (gogoproto.nullable) = false]; +} + +message DailySatelliteResponse { + repeated UsageRollup usage_rollup = 1; +} + +message DailyRequest { + RequestHeader header = 1; +} + +message DailyResponse { + repeated UsageRollup usage_rollup = 1; +} + +message UsageRollup { + Egress egress = 1; + Ingress ingress = 2; + int64 delete = 3; + google.protobuf.Timestamp interval_start = 4 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; +} + +message Egress { + int64 repair = 1; + int64 audit = 2; + int64 usage = 3; +} + +message Ingress { + int64 repaid = 1; + int64 usage = 2; +} + service Node { rpc Version(VersionRequest) returns (VersionResponse); rpc LastContact(LastContactRequest) returns (LastContactResponse); diff --git a/private/multinodepb/multinode_drpc.pb.go b/private/multinodepb/multinode_drpc.pb.go index c5eb808ca..ae84bba3c 100644 --- a/private/multinodepb/multinode_drpc.pb.go +++ b/private/multinodepb/multinode_drpc.pb.go @@ -198,6 +198,14 @@ type DRPCBandwidthClient interface { DRPCConn() drpc.Conn MonthSummary(ctx context.Context, in *BandwidthMonthSummaryRequest) (*BandwidthMonthSummaryResponse, error) + BandwidthSummarySatellite(ctx context.Context, in *BandwidthSummarySatelliteRequest) (*BandwidthSummarySatelliteResponse, error) + BandwidthSummary(ctx context.Context, in *BandwidthSummaryRequest) (*BandwidthSummaryResponse, error) + EgressSummarySatellite(ctx context.Context, in *EgressSummarySatelliteRequest) (*EgressSummarySatelliteResponse, error) + EgressSummary(ctx context.Context, in *EgressSummaryRequest) (*EgressSummaryResponse, error) + IngressSummarySatellite(ctx context.Context, in *IngressSummarySatelliteRequest) (*IngressSummarySatelliteResponse, error) + IngressSummary(ctx context.Context, in *IngressSummaryRequest) (*IngressSummaryResponse, error) + DailySatellite(ctx context.Context, in *DailySatelliteRequest) (*DailySatelliteResponse, error) + Daily(ctx context.Context, in *DailyRequest) (*DailyResponse, error) } type drpcBandwidthClient struct { @@ -219,8 +227,88 @@ func (c *drpcBandwidthClient) MonthSummary(ctx context.Context, in *BandwidthMon return out, nil } +func (c *drpcBandwidthClient) BandwidthSummarySatellite(ctx context.Context, in *BandwidthSummarySatelliteRequest) (*BandwidthSummarySatelliteResponse, error) { + out := new(BandwidthSummarySatelliteResponse) + err := c.cc.Invoke(ctx, "/multinode.Bandwidth/BandwidthSummarySatellite", drpcEncoding_File_multinode_proto{}, in, out) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *drpcBandwidthClient) BandwidthSummary(ctx context.Context, in *BandwidthSummaryRequest) (*BandwidthSummaryResponse, error) { + out := new(BandwidthSummaryResponse) + err := c.cc.Invoke(ctx, "/multinode.Bandwidth/BandwidthSummary", drpcEncoding_File_multinode_proto{}, in, out) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *drpcBandwidthClient) EgressSummarySatellite(ctx context.Context, in *EgressSummarySatelliteRequest) (*EgressSummarySatelliteResponse, error) { + out := new(EgressSummarySatelliteResponse) + err := c.cc.Invoke(ctx, "/multinode.Bandwidth/EgressSummarySatellite", drpcEncoding_File_multinode_proto{}, in, out) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *drpcBandwidthClient) EgressSummary(ctx context.Context, in *EgressSummaryRequest) (*EgressSummaryResponse, error) { + out := new(EgressSummaryResponse) + err := c.cc.Invoke(ctx, "/multinode.Bandwidth/EgressSummary", drpcEncoding_File_multinode_proto{}, in, out) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *drpcBandwidthClient) IngressSummarySatellite(ctx context.Context, in *IngressSummarySatelliteRequest) (*IngressSummarySatelliteResponse, error) { + out := new(IngressSummarySatelliteResponse) + err := c.cc.Invoke(ctx, "/multinode.Bandwidth/IngressSummarySatellite", drpcEncoding_File_multinode_proto{}, in, out) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *drpcBandwidthClient) IngressSummary(ctx context.Context, in *IngressSummaryRequest) (*IngressSummaryResponse, error) { + out := new(IngressSummaryResponse) + err := c.cc.Invoke(ctx, "/multinode.Bandwidth/IngressSummary", drpcEncoding_File_multinode_proto{}, in, out) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *drpcBandwidthClient) DailySatellite(ctx context.Context, in *DailySatelliteRequest) (*DailySatelliteResponse, error) { + out := new(DailySatelliteResponse) + err := c.cc.Invoke(ctx, "/multinode.Bandwidth/DailySatellite", drpcEncoding_File_multinode_proto{}, in, out) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *drpcBandwidthClient) Daily(ctx context.Context, in *DailyRequest) (*DailyResponse, error) { + out := new(DailyResponse) + err := c.cc.Invoke(ctx, "/multinode.Bandwidth/Daily", drpcEncoding_File_multinode_proto{}, in, out) + if err != nil { + return nil, err + } + return out, nil +} + type DRPCBandwidthServer interface { MonthSummary(context.Context, *BandwidthMonthSummaryRequest) (*BandwidthMonthSummaryResponse, error) + BandwidthSummarySatellite(context.Context, *BandwidthSummarySatelliteRequest) (*BandwidthSummarySatelliteResponse, error) + BandwidthSummary(context.Context, *BandwidthSummaryRequest) (*BandwidthSummaryResponse, error) + EgressSummarySatellite(context.Context, *EgressSummarySatelliteRequest) (*EgressSummarySatelliteResponse, error) + EgressSummary(context.Context, *EgressSummaryRequest) (*EgressSummaryResponse, error) + IngressSummarySatellite(context.Context, *IngressSummarySatelliteRequest) (*IngressSummarySatelliteResponse, error) + IngressSummary(context.Context, *IngressSummaryRequest) (*IngressSummaryResponse, error) + DailySatellite(context.Context, *DailySatelliteRequest) (*DailySatelliteResponse, error) + Daily(context.Context, *DailyRequest) (*DailyResponse, error) } type DRPCBandwidthUnimplementedServer struct{} @@ -229,9 +317,41 @@ func (s *DRPCBandwidthUnimplementedServer) MonthSummary(context.Context, *Bandwi return nil, drpcerr.WithCode(errors.New("Unimplemented"), 12) } +func (s *DRPCBandwidthUnimplementedServer) BandwidthSummarySatellite(context.Context, *BandwidthSummarySatelliteRequest) (*BandwidthSummarySatelliteResponse, error) { + return nil, drpcerr.WithCode(errors.New("Unimplemented"), 12) +} + +func (s *DRPCBandwidthUnimplementedServer) BandwidthSummary(context.Context, *BandwidthSummaryRequest) (*BandwidthSummaryResponse, error) { + return nil, drpcerr.WithCode(errors.New("Unimplemented"), 12) +} + +func (s *DRPCBandwidthUnimplementedServer) EgressSummarySatellite(context.Context, *EgressSummarySatelliteRequest) (*EgressSummarySatelliteResponse, error) { + return nil, drpcerr.WithCode(errors.New("Unimplemented"), 12) +} + +func (s *DRPCBandwidthUnimplementedServer) EgressSummary(context.Context, *EgressSummaryRequest) (*EgressSummaryResponse, error) { + return nil, drpcerr.WithCode(errors.New("Unimplemented"), 12) +} + +func (s *DRPCBandwidthUnimplementedServer) IngressSummarySatellite(context.Context, *IngressSummarySatelliteRequest) (*IngressSummarySatelliteResponse, error) { + return nil, drpcerr.WithCode(errors.New("Unimplemented"), 12) +} + +func (s *DRPCBandwidthUnimplementedServer) IngressSummary(context.Context, *IngressSummaryRequest) (*IngressSummaryResponse, error) { + return nil, drpcerr.WithCode(errors.New("Unimplemented"), 12) +} + +func (s *DRPCBandwidthUnimplementedServer) DailySatellite(context.Context, *DailySatelliteRequest) (*DailySatelliteResponse, error) { + return nil, drpcerr.WithCode(errors.New("Unimplemented"), 12) +} + +func (s *DRPCBandwidthUnimplementedServer) Daily(context.Context, *DailyRequest) (*DailyResponse, error) { + return nil, drpcerr.WithCode(errors.New("Unimplemented"), 12) +} + type DRPCBandwidthDescription struct{} -func (DRPCBandwidthDescription) NumMethods() int { return 1 } +func (DRPCBandwidthDescription) NumMethods() int { return 9 } func (DRPCBandwidthDescription) Method(n int) (string, drpc.Encoding, drpc.Receiver, interface{}, bool) { switch n { @@ -244,6 +364,78 @@ func (DRPCBandwidthDescription) Method(n int) (string, drpc.Encoding, drpc.Recei in1.(*BandwidthMonthSummaryRequest), ) }, DRPCBandwidthServer.MonthSummary, true + case 1: + return "/multinode.Bandwidth/BandwidthSummarySatellite", drpcEncoding_File_multinode_proto{}, + func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) { + return srv.(DRPCBandwidthServer). + BandwidthSummarySatellite( + ctx, + in1.(*BandwidthSummarySatelliteRequest), + ) + }, DRPCBandwidthServer.BandwidthSummarySatellite, true + case 2: + return "/multinode.Bandwidth/BandwidthSummary", drpcEncoding_File_multinode_proto{}, + func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) { + return srv.(DRPCBandwidthServer). + BandwidthSummary( + ctx, + in1.(*BandwidthSummaryRequest), + ) + }, DRPCBandwidthServer.BandwidthSummary, true + case 3: + return "/multinode.Bandwidth/EgressSummarySatellite", drpcEncoding_File_multinode_proto{}, + func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) { + return srv.(DRPCBandwidthServer). + EgressSummarySatellite( + ctx, + in1.(*EgressSummarySatelliteRequest), + ) + }, DRPCBandwidthServer.EgressSummarySatellite, true + case 4: + return "/multinode.Bandwidth/EgressSummary", drpcEncoding_File_multinode_proto{}, + func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) { + return srv.(DRPCBandwidthServer). + EgressSummary( + ctx, + in1.(*EgressSummaryRequest), + ) + }, DRPCBandwidthServer.EgressSummary, true + case 5: + return "/multinode.Bandwidth/IngressSummarySatellite", drpcEncoding_File_multinode_proto{}, + func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) { + return srv.(DRPCBandwidthServer). + IngressSummarySatellite( + ctx, + in1.(*IngressSummarySatelliteRequest), + ) + }, DRPCBandwidthServer.IngressSummarySatellite, true + case 6: + return "/multinode.Bandwidth/IngressSummary", drpcEncoding_File_multinode_proto{}, + func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) { + return srv.(DRPCBandwidthServer). + IngressSummary( + ctx, + in1.(*IngressSummaryRequest), + ) + }, DRPCBandwidthServer.IngressSummary, true + case 7: + return "/multinode.Bandwidth/DailySatellite", drpcEncoding_File_multinode_proto{}, + func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) { + return srv.(DRPCBandwidthServer). + DailySatellite( + ctx, + in1.(*DailySatelliteRequest), + ) + }, DRPCBandwidthServer.DailySatellite, true + case 8: + return "/multinode.Bandwidth/Daily", drpcEncoding_File_multinode_proto{}, + func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) { + return srv.(DRPCBandwidthServer). + Daily( + ctx, + in1.(*DailyRequest), + ) + }, DRPCBandwidthServer.Daily, true default: return "", nil, nil, nil, false } @@ -269,6 +461,134 @@ func (x *drpcBandwidth_MonthSummaryStream) SendAndClose(m *BandwidthMonthSummary return x.CloseSend() } +type DRPCBandwidth_BandwidthSummarySatelliteStream interface { + drpc.Stream + SendAndClose(*BandwidthSummarySatelliteResponse) error +} + +type drpcBandwidth_BandwidthSummarySatelliteStream struct { + drpc.Stream +} + +func (x *drpcBandwidth_BandwidthSummarySatelliteStream) SendAndClose(m *BandwidthSummarySatelliteResponse) error { + if err := x.MsgSend(m, drpcEncoding_File_multinode_proto{}); err != nil { + return err + } + return x.CloseSend() +} + +type DRPCBandwidth_BandwidthSummaryStream interface { + drpc.Stream + SendAndClose(*BandwidthSummaryResponse) error +} + +type drpcBandwidth_BandwidthSummaryStream struct { + drpc.Stream +} + +func (x *drpcBandwidth_BandwidthSummaryStream) SendAndClose(m *BandwidthSummaryResponse) error { + if err := x.MsgSend(m, drpcEncoding_File_multinode_proto{}); err != nil { + return err + } + return x.CloseSend() +} + +type DRPCBandwidth_EgressSummarySatelliteStream interface { + drpc.Stream + SendAndClose(*EgressSummarySatelliteResponse) error +} + +type drpcBandwidth_EgressSummarySatelliteStream struct { + drpc.Stream +} + +func (x *drpcBandwidth_EgressSummarySatelliteStream) SendAndClose(m *EgressSummarySatelliteResponse) error { + if err := x.MsgSend(m, drpcEncoding_File_multinode_proto{}); err != nil { + return err + } + return x.CloseSend() +} + +type DRPCBandwidth_EgressSummaryStream interface { + drpc.Stream + SendAndClose(*EgressSummaryResponse) error +} + +type drpcBandwidth_EgressSummaryStream struct { + drpc.Stream +} + +func (x *drpcBandwidth_EgressSummaryStream) SendAndClose(m *EgressSummaryResponse) error { + if err := x.MsgSend(m, drpcEncoding_File_multinode_proto{}); err != nil { + return err + } + return x.CloseSend() +} + +type DRPCBandwidth_IngressSummarySatelliteStream interface { + drpc.Stream + SendAndClose(*IngressSummarySatelliteResponse) error +} + +type drpcBandwidth_IngressSummarySatelliteStream struct { + drpc.Stream +} + +func (x *drpcBandwidth_IngressSummarySatelliteStream) SendAndClose(m *IngressSummarySatelliteResponse) error { + if err := x.MsgSend(m, drpcEncoding_File_multinode_proto{}); err != nil { + return err + } + return x.CloseSend() +} + +type DRPCBandwidth_IngressSummaryStream interface { + drpc.Stream + SendAndClose(*IngressSummaryResponse) error +} + +type drpcBandwidth_IngressSummaryStream struct { + drpc.Stream +} + +func (x *drpcBandwidth_IngressSummaryStream) SendAndClose(m *IngressSummaryResponse) error { + if err := x.MsgSend(m, drpcEncoding_File_multinode_proto{}); err != nil { + return err + } + return x.CloseSend() +} + +type DRPCBandwidth_DailySatelliteStream interface { + drpc.Stream + SendAndClose(*DailySatelliteResponse) error +} + +type drpcBandwidth_DailySatelliteStream struct { + drpc.Stream +} + +func (x *drpcBandwidth_DailySatelliteStream) SendAndClose(m *DailySatelliteResponse) error { + if err := x.MsgSend(m, drpcEncoding_File_multinode_proto{}); err != nil { + return err + } + return x.CloseSend() +} + +type DRPCBandwidth_DailyStream interface { + drpc.Stream + SendAndClose(*DailyResponse) error +} + +type drpcBandwidth_DailyStream struct { + drpc.Stream +} + +func (x *drpcBandwidth_DailyStream) SendAndClose(m *DailyResponse) error { + if err := x.MsgSend(m, drpcEncoding_File_multinode_proto{}); err != nil { + return err + } + return x.CloseSend() +} + type DRPCNodeClient interface { DRPCConn() drpc.Conn diff --git a/storagenode/multinode/bandwidth.go b/storagenode/multinode/bandwidth.go index efd97c015..e89e623c3 100644 --- a/storagenode/multinode/bandwidth.go +++ b/storagenode/multinode/bandwidth.go @@ -10,6 +10,7 @@ import ( "go.uber.org/zap" "storj.io/common/rpc/rpcstatus" + "storj.io/storj/private/date" "storj.io/storj/private/multinodepb" "storj.io/storj/storagenode/apikeys" "storj.io/storj/storagenode/bandwidth" @@ -54,3 +55,181 @@ func (bandwidth *BandwidthEndpoint) MonthSummary(ctx context.Context, req *multi Used: used, }, nil } + +// BandwidthSummarySatellite returns bandwidth summary for specific satellite. +func (bandwidth *BandwidthEndpoint) BandwidthSummarySatellite(ctx context.Context, req *multinodepb.BandwidthSummarySatelliteRequest) (_ *multinodepb.BandwidthSummarySatelliteResponse, err error) { + defer mon.Task()(&ctx)(&err) + + if err = authenticate(ctx, bandwidth.apiKeys, req.GetHeader()); err != nil { + return nil, rpcstatus.Wrap(rpcstatus.Unauthenticated, err) + } + + from, to := date.MonthBoundary(time.Now().UTC()) + bandwidthSummary, err := bandwidth.db.SatelliteSummary(ctx, req.SatelliteId, from, to) + if err != nil { + bandwidth.log.Error("bandwidth internal error", zap.Error(err)) + return nil, rpcstatus.Wrap(rpcstatus.Internal, err) + } + + return &multinodepb.BandwidthSummarySatelliteResponse{Summary: bandwidthSummary.Total()}, nil +} + +// BandwidthSummary returns bandwidth summary. +func (bandwidth *BandwidthEndpoint) BandwidthSummary(ctx context.Context, req *multinodepb.BandwidthSummaryRequest) (_ *multinodepb.BandwidthSummaryResponse, err error) { + defer mon.Task()(&ctx)(&err) + + if err = authenticate(ctx, bandwidth.apiKeys, req.GetHeader()); err != nil { + return nil, rpcstatus.Wrap(rpcstatus.Unauthenticated, err) + } + + from, to := date.MonthBoundary(time.Now().UTC()) + bandwidthSummary, err := bandwidth.db.Summary(ctx, from, to) + if err != nil { + bandwidth.log.Error("bandwidth internal error", zap.Error(err)) + return nil, rpcstatus.Wrap(rpcstatus.Internal, err) + } + + return &multinodepb.BandwidthSummaryResponse{Summary: bandwidthSummary.Total()}, nil +} + +// EgressSummarySatellite returns egress summary for specific satellite. +func (bandwidth *BandwidthEndpoint) EgressSummarySatellite(ctx context.Context, req *multinodepb.EgressSummarySatelliteRequest) (_ *multinodepb.EgressSummarySatelliteResponse, err error) { + defer mon.Task()(&ctx)(&err) + + if err = authenticate(ctx, bandwidth.apiKeys, req.GetHeader()); err != nil { + return nil, rpcstatus.Wrap(rpcstatus.Unauthenticated, err) + } + + from, to := date.MonthBoundary(time.Now().UTC()) + egressSummary, err := bandwidth.db.SatelliteEgressSummary(ctx, req.SatelliteId, from, to) + if err != nil { + bandwidth.log.Error("bandwidth internal error", zap.Error(err)) + return nil, rpcstatus.Wrap(rpcstatus.Internal, err) + } + + return &multinodepb.EgressSummarySatelliteResponse{Summary: egressSummary.Total()}, nil +} + +// EgressSummary returns egress summary. +func (bandwidth *BandwidthEndpoint) EgressSummary(ctx context.Context, req *multinodepb.EgressSummaryRequest) (_ *multinodepb.EgressSummaryResponse, err error) { + defer mon.Task()(&ctx)(&err) + + if err = authenticate(ctx, bandwidth.apiKeys, req.GetHeader()); err != nil { + return nil, rpcstatus.Wrap(rpcstatus.Unauthenticated, err) + } + + from, to := date.MonthBoundary(time.Now().UTC()) + egressSummary, err := bandwidth.db.EgressSummary(ctx, from, to) + if err != nil { + bandwidth.log.Error("bandwidth internal error", zap.Error(err)) + return nil, rpcstatus.Wrap(rpcstatus.Internal, err) + } + + return &multinodepb.EgressSummaryResponse{Summary: egressSummary.Total()}, nil +} + +// IngressSummarySatellite returns ingress summary for specific satellite. +func (bandwidth *BandwidthEndpoint) IngressSummarySatellite(ctx context.Context, req *multinodepb.IngressSummarySatelliteRequest) (_ *multinodepb.IngressSummarySatelliteResponse, err error) { + defer mon.Task()(&ctx)(&err) + + if err = authenticate(ctx, bandwidth.apiKeys, req.GetHeader()); err != nil { + return nil, rpcstatus.Wrap(rpcstatus.Unauthenticated, err) + } + + from, to := date.MonthBoundary(time.Now().UTC()) + ingressSummary, err := bandwidth.db.SatelliteIngressSummary(ctx, req.SatelliteId, from, to) + if err != nil { + bandwidth.log.Error("bandwidth internal error", zap.Error(err)) + return nil, rpcstatus.Wrap(rpcstatus.Internal, err) + } + + return &multinodepb.IngressSummarySatelliteResponse{Summary: ingressSummary.Total()}, nil +} + +// IngressSummary returns ingress summary. +func (bandwidth *BandwidthEndpoint) IngressSummary(ctx context.Context, req *multinodepb.IngressSummaryRequest) (_ *multinodepb.IngressSummaryResponse, err error) { + defer mon.Task()(&ctx)(&err) + + if err = authenticate(ctx, bandwidth.apiKeys, req.GetHeader()); err != nil { + return nil, rpcstatus.Wrap(rpcstatus.Unauthenticated, err) + } + + from, to := date.MonthBoundary(time.Now().UTC()) + ingressSummary, err := bandwidth.db.IngressSummary(ctx, from, to) + if err != nil { + bandwidth.log.Error("bandwidth internal error", zap.Error(err)) + return nil, rpcstatus.Wrap(rpcstatus.Internal, err) + } + + return &multinodepb.IngressSummaryResponse{Summary: ingressSummary.Total()}, nil +} + +// DailySatellite returns bandwidth summary split by days current month for specific satellite. +func (bandwidth *BandwidthEndpoint) DailySatellite(ctx context.Context, req *multinodepb.DailySatelliteRequest) (_ *multinodepb.DailySatelliteResponse, err error) { + defer mon.Task()(&ctx)(&err) + + if err = authenticate(ctx, bandwidth.apiKeys, req.GetHeader()); err != nil { + return nil, rpcstatus.Wrap(rpcstatus.Unauthenticated, err) + } + + from, to := date.MonthBoundary(time.Now().UTC()) + bandwidthDaily, err := bandwidth.db.GetDailySatelliteRollups(ctx, req.SatelliteId, from, to) + if err != nil { + bandwidth.log.Error("bandwidth internal error", zap.Error(err)) + return nil, rpcstatus.Wrap(rpcstatus.Internal, err) + } + + var resp []*multinodepb.UsageRollup + for _, bd := range bandwidthDaily { + resp = append(resp, &multinodepb.UsageRollup{ + Egress: &multinodepb.Egress{ + Repair: bd.Egress.Repair, + Audit: bd.Egress.Audit, + Usage: bd.Egress.Usage, + }, + Ingress: &multinodepb.Ingress{ + Repaid: bd.Ingress.Repair, + Usage: bd.Ingress.Usage, + }, + Delete: bd.Delete, + IntervalStart: bd.IntervalStart, + }) + } + + return &multinodepb.DailySatelliteResponse{UsageRollup: resp}, nil +} + +// Daily returns bandwidth summary split by days current month. +func (bandwidth *BandwidthEndpoint) Daily(ctx context.Context, req *multinodepb.DailyRequest) (_ *multinodepb.DailyResponse, err error) { + defer mon.Task()(&ctx)(&err) + + if err = authenticate(ctx, bandwidth.apiKeys, req.GetHeader()); err != nil { + return nil, rpcstatus.Wrap(rpcstatus.Unauthenticated, err) + } + + from, to := date.MonthBoundary(time.Now().UTC()) + bandwidthDaily, err := bandwidth.db.GetDailyRollups(ctx, from, to) + if err != nil { + bandwidth.log.Error("bandwidth internal error", zap.Error(err)) + return nil, rpcstatus.Wrap(rpcstatus.Internal, err) + } + + var resp []*multinodepb.UsageRollup + for _, bd := range bandwidthDaily { + resp = append(resp, &multinodepb.UsageRollup{ + Egress: &multinodepb.Egress{ + Repair: bd.Egress.Repair, + Audit: bd.Egress.Audit, + Usage: bd.Egress.Usage, + }, + Ingress: &multinodepb.Ingress{ + Repaid: bd.Ingress.Repair, + Usage: bd.Ingress.Usage, + }, + Delete: bd.Delete, + IntervalStart: bd.IntervalStart, + }) + } + + return &multinodepb.DailyResponse{UsageRollup: resp}, nil +}