multinode/payouts: satellite period/allTime summaries added
payout summaries for specific satellite period/allTime added Change-Id: I144138304f01f23d5c4b10931988eaaced656aaf
This commit is contained in:
parent
dfe85beac2
commit
f2812d76cd
@ -58,22 +58,28 @@ func (controller *Payouts) SatelliteEstimations(w http.ResponseWriter, r *http.R
|
||||
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["satelliteID"]
|
||||
if !ok {
|
||||
controller.serveError(w, http.StatusBadRequest, ErrPayouts.Wrap(err))
|
||||
controller.serveError(w, http.StatusBadRequest, ErrPayouts.New("couldn't receive route variable satelliteID"))
|
||||
return
|
||||
}
|
||||
|
||||
satelliteID, err := storj.NodeIDFromString(id)
|
||||
if err != nil {
|
||||
controller.serveError(w, http.StatusBadRequest, ErrPayouts.Wrap(err))
|
||||
return
|
||||
}
|
||||
estimatedEarnings, err := controller.service.AllNodesSatelliteEstimations(ctx, satelliteID)
|
||||
|
||||
estimatedEarnings, err := controller.service.NodesSatelliteEstimations(ctx, satelliteID)
|
||||
if err != nil {
|
||||
controller.serveError(w, http.StatusInternalServerError, ErrPayouts.Wrap(err))
|
||||
return
|
||||
}
|
||||
|
||||
if err = json.NewEncoder(w).Encode(estimatedEarnings); err != nil {
|
||||
controller.log.Error("failed to write json response", zap.Error(err))
|
||||
return
|
||||
@ -85,11 +91,15 @@ func (controller *Payouts) Estimations(w http.ResponseWriter, r *http.Request) {
|
||||
ctx := r.Context()
|
||||
var err error
|
||||
defer mon.Task()(&ctx)(&err)
|
||||
estimatedEarnings, err := controller.service.AllNodesEstimations(ctx)
|
||||
|
||||
w.Header().Add("Content-Type", "application/json")
|
||||
|
||||
estimatedEarnings, err := controller.service.NodesEstimations(ctx)
|
||||
if err != nil {
|
||||
controller.serveError(w, http.StatusInternalServerError, ErrPayouts.Wrap(err))
|
||||
return
|
||||
}
|
||||
|
||||
if err = json.NewEncoder(w).Encode(estimatedEarnings); err != nil {
|
||||
controller.log.Error("failed to write json response", zap.Error(err))
|
||||
return
|
||||
@ -102,12 +112,12 @@ func (controller *Payouts) PeriodSummary(w http.ResponseWriter, r *http.Request)
|
||||
var err error
|
||||
defer mon.Task()(&ctx)(&err)
|
||||
|
||||
segmentParams := mux.Vars(r)
|
||||
w.Header().Add("Content-Type", "application/json")
|
||||
segmentParams := mux.Vars(r)
|
||||
|
||||
period, ok := segmentParams["period"]
|
||||
if !ok {
|
||||
controller.serveError(w, http.StatusBadRequest, ErrPayouts.Wrap(err))
|
||||
controller.serveError(w, http.StatusBadRequest, ErrPayouts.New("couldn't receive route variable period"))
|
||||
return
|
||||
}
|
||||
|
||||
@ -143,6 +153,78 @@ func (controller *Payouts) Summary(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
}
|
||||
|
||||
// SatellitePeriodSummary handles retrieval from nodes from specific satellite for specific period.
|
||||
func (controller *Payouts) SatellitePeriodSummary(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)
|
||||
|
||||
period, ok := segmentParams["period"]
|
||||
if !ok {
|
||||
controller.serveError(w, http.StatusBadRequest, ErrPayouts.New("couldn't receive route variable period"))
|
||||
return
|
||||
}
|
||||
|
||||
id, ok := segmentParams["id"]
|
||||
if !ok {
|
||||
controller.serveError(w, http.StatusBadRequest, ErrPayouts.New("couldn't receive route variable satelliteID"))
|
||||
return
|
||||
}
|
||||
|
||||
satelliteID, err := storj.NodeIDFromString(id)
|
||||
if err != nil {
|
||||
controller.serveError(w, http.StatusBadRequest, ErrPayouts.Wrap(err))
|
||||
return
|
||||
}
|
||||
|
||||
summary, err := controller.service.NodesSatellitePeriodSummary(ctx, satelliteID, period)
|
||||
if err != nil {
|
||||
controller.serveError(w, http.StatusInternalServerError, ErrPayouts.Wrap(err))
|
||||
return
|
||||
}
|
||||
|
||||
if err = json.NewEncoder(w).Encode(summary); err != nil {
|
||||
controller.log.Error("failed to write json response", zap.Error(err))
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
// SatelliteSummary handles retrieval from nodes from specific satellite.
|
||||
func (controller *Payouts) SatelliteSummary(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 satelliteID"))
|
||||
return
|
||||
}
|
||||
|
||||
satelliteID, err := storj.NodeIDFromString(id)
|
||||
if err != nil {
|
||||
controller.serveError(w, http.StatusBadRequest, ErrPayouts.Wrap(err))
|
||||
return
|
||||
}
|
||||
|
||||
summary, err := controller.service.NodesSatelliteSummary(ctx, satelliteID)
|
||||
if err != nil {
|
||||
controller.serveError(w, http.StatusInternalServerError, ErrPayouts.Wrap(err))
|
||||
return
|
||||
}
|
||||
|
||||
if err = json.NewEncoder(w).Encode(summary); err != nil {
|
||||
controller.log.Error("failed to write json response", zap.Error(err))
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
// serveError set http statuses and send json error.
|
||||
func (controller *Payouts) serveError(w http.ResponseWriter, status int, err error) {
|
||||
w.WriteHeader(status)
|
||||
|
@ -75,6 +75,8 @@ func NewServer(log *zap.Logger, config Config, nodes *nodes.Service, payouts *pa
|
||||
|
||||
payoutsController := controllers.NewPayouts(server.log, server.payouts)
|
||||
payoutsRouter := apiRouter.PathPrefix("/payouts").Subrouter()
|
||||
payoutsRouter.HandleFunc("/satellite/{id}/summary/{period}", payoutsController.SatellitePeriodSummary).Methods(http.MethodGet)
|
||||
payoutsRouter.HandleFunc("/satellite/{id}/summary", payoutsController.SatelliteSummary).Methods(http.MethodGet)
|
||||
payoutsRouter.HandleFunc("/summary/{period}", payoutsController.PeriodSummary).Methods(http.MethodGet)
|
||||
payoutsRouter.HandleFunc("/summary", payoutsController.Summary).Methods(http.MethodGet)
|
||||
payoutsRouter.HandleFunc("/total-earned", payoutsController.GetAllNodesTotalEarned).Methods(http.MethodGet)
|
||||
|
@ -16,6 +16,7 @@ type SatelliteSummary struct {
|
||||
// NodeSummary contains node's payout information.
|
||||
type NodeSummary struct {
|
||||
NodeID storj.NodeID `json:"nodeId"`
|
||||
NodeName string `json:"nodeName"`
|
||||
Held int64 `json:"held"`
|
||||
Paid int64 `json:"paid"`
|
||||
}
|
||||
@ -27,3 +28,16 @@ type Summary struct {
|
||||
TotalPaid int64 `json:"totalPaid"`
|
||||
NodeSummary []NodeSummary `json:"nodeSummary"`
|
||||
}
|
||||
|
||||
// Add appends node payout data to summary.
|
||||
func (summary *Summary) Add(held, paid int64, id storj.NodeID, name string) {
|
||||
summary.TotalPaid += paid
|
||||
summary.TotalHeld += held
|
||||
summary.TotalEarned += paid + held
|
||||
summary.NodeSummary = append(summary.NodeSummary, NodeSummary{
|
||||
NodeID: id,
|
||||
Held: held,
|
||||
Paid: paid,
|
||||
NodeName: name,
|
||||
})
|
||||
}
|
||||
|
@ -129,17 +129,9 @@ func (service *Service) NodesSummary(ctx context.Context) (_ Summary, err error)
|
||||
return Summary{}, Error.Wrap(err)
|
||||
}
|
||||
|
||||
summary.TotalPaid += info.Paid
|
||||
summary.TotalHeld += info.Held
|
||||
summary.NodeSummary = append(summary.NodeSummary, NodeSummary{
|
||||
NodeID: node.ID,
|
||||
Held: info.Held,
|
||||
Paid: info.Paid,
|
||||
})
|
||||
summary.Add(info.Held, info.Paid, node.ID, node.Name)
|
||||
}
|
||||
|
||||
summary.TotalEarned = summary.TotalPaid + summary.TotalHeld
|
||||
|
||||
return summary, nil
|
||||
}
|
||||
|
||||
@ -160,20 +152,110 @@ func (service *Service) NodesPeriodSummary(ctx context.Context, period string) (
|
||||
return Summary{}, Error.Wrap(err)
|
||||
}
|
||||
|
||||
summary.TotalPaid += info.Paid
|
||||
summary.TotalHeld += info.Held
|
||||
summary.NodeSummary = append(summary.NodeSummary, NodeSummary{
|
||||
NodeID: node.ID,
|
||||
Held: info.Held,
|
||||
Paid: info.Paid,
|
||||
})
|
||||
summary.Add(info.Held, info.Paid, node.ID, node.Name)
|
||||
}
|
||||
|
||||
summary.TotalEarned = summary.TotalPaid + summary.TotalHeld
|
||||
return summary, nil
|
||||
}
|
||||
|
||||
// NodesSatelliteSummary returns specific satellite all time stats.
|
||||
func (service *Service) NodesSatelliteSummary(ctx context.Context, satelliteID storj.NodeID) (_ Summary, err error) {
|
||||
defer mon.Task()(&ctx)(&err)
|
||||
var summary Summary
|
||||
|
||||
list, err := service.nodes.List(ctx)
|
||||
if err != nil {
|
||||
return Summary{}, Error.Wrap(err)
|
||||
}
|
||||
|
||||
for _, node := range list {
|
||||
info, err := service.nodeSatelliteSummary(ctx, node, satelliteID)
|
||||
if err != nil {
|
||||
return Summary{}, Error.Wrap(err)
|
||||
}
|
||||
|
||||
summary.Add(info.Held, info.Paid, node.ID, node.Name)
|
||||
}
|
||||
|
||||
return summary, nil
|
||||
}
|
||||
|
||||
// NodesSatellitePeriodSummary returns specific satellite stats for specific period.
|
||||
func (service *Service) NodesSatellitePeriodSummary(ctx context.Context, satelliteID storj.NodeID, period string) (_ Summary, err error) {
|
||||
defer mon.Task()(&ctx)(&err)
|
||||
var summary Summary
|
||||
|
||||
list, err := service.nodes.List(ctx)
|
||||
if err != nil {
|
||||
return Summary{}, Error.Wrap(err)
|
||||
}
|
||||
|
||||
for _, node := range list {
|
||||
info, err := service.nodeSatellitePeriodSummary(ctx, node, satelliteID, period)
|
||||
if err != nil {
|
||||
return Summary{}, Error.Wrap(err)
|
||||
}
|
||||
|
||||
summary.Add(info.Held, info.Paid, node.ID, node.Name)
|
||||
}
|
||||
|
||||
return summary, nil
|
||||
}
|
||||
|
||||
// nodeSatelliteSummary returns payout info for single satellite, for specific node.
|
||||
func (service *Service) nodeSatelliteSummary(ctx context.Context, node nodes.Node, satelliteID storj.NodeID) (info *multinodepb.PayoutInfo, err error) {
|
||||
conn, err := service.dialer.DialNodeURL(ctx, storj.NodeURL{
|
||||
ID: node.ID,
|
||||
Address: node.PublicAddress,
|
||||
})
|
||||
if err != nil {
|
||||
return &multinodepb.PayoutInfo{}, Error.Wrap(err)
|
||||
}
|
||||
|
||||
defer func() {
|
||||
err = errs.Combine(err, conn.Close())
|
||||
}()
|
||||
|
||||
payoutClient := multinodepb.NewDRPCPayoutClient(conn)
|
||||
header := &multinodepb.RequestHeader{
|
||||
ApiKey: node.APISecret,
|
||||
}
|
||||
|
||||
response, err := payoutClient.SatelliteSummary(ctx, &multinodepb.SatelliteSummaryRequest{Header: header, SatelliteId: satelliteID})
|
||||
if err != nil {
|
||||
return &multinodepb.PayoutInfo{}, Error.Wrap(err)
|
||||
}
|
||||
|
||||
return response.PayoutInfo, nil
|
||||
}
|
||||
|
||||
// nodeSatellitePeriodSummary returns satellite payout info for specific node for specific period.
|
||||
func (service *Service) nodeSatellitePeriodSummary(ctx context.Context, node nodes.Node, satelliteID storj.NodeID, period string) (info *multinodepb.PayoutInfo, err error) {
|
||||
conn, err := service.dialer.DialNodeURL(ctx, storj.NodeURL{
|
||||
ID: node.ID,
|
||||
Address: node.PublicAddress,
|
||||
})
|
||||
if err != nil {
|
||||
return &multinodepb.PayoutInfo{}, Error.Wrap(err)
|
||||
}
|
||||
|
||||
defer func() {
|
||||
err = errs.Combine(err, conn.Close())
|
||||
}()
|
||||
|
||||
payoutClient := multinodepb.NewDRPCPayoutClient(conn)
|
||||
header := &multinodepb.RequestHeader{
|
||||
ApiKey: node.APISecret,
|
||||
}
|
||||
|
||||
response, err := payoutClient.SatellitePeriodSummary(ctx, &multinodepb.SatellitePeriodSummaryRequest{Header: header, SatelliteId: satelliteID, Period: period})
|
||||
if err != nil {
|
||||
return &multinodepb.PayoutInfo{}, Error.Wrap(err)
|
||||
}
|
||||
|
||||
return response.PayoutInfo, nil
|
||||
}
|
||||
|
||||
func (service *Service) getAllSatellitesPeriod(ctx context.Context, node nodes.Node, period string) (info *multinodepb.PayoutInfo, err error) {
|
||||
conn, err := service.dialer.DialNodeURL(ctx, storj.NodeURL{
|
||||
ID: node.ID,
|
||||
@ -226,8 +308,8 @@ func (service *Service) getAllSatellitesAllTime(ctx context.Context, node nodes.
|
||||
return response.PayoutInfo, nil
|
||||
}
|
||||
|
||||
// AllNodesSatelliteEstimations returns specific satellite all time estimated earnings.
|
||||
func (service *Service) AllNodesSatelliteEstimations(ctx context.Context, satelliteID storj.NodeID) (_ int64, err error) {
|
||||
// NodesSatelliteEstimations returns specific satellite all time estimated earnings.
|
||||
func (service *Service) NodesSatelliteEstimations(ctx context.Context, satelliteID storj.NodeID) (_ int64, err error) {
|
||||
defer mon.Task()(&ctx)(&err)
|
||||
|
||||
var estimatedEarnings int64
|
||||
@ -249,8 +331,8 @@ func (service *Service) AllNodesSatelliteEstimations(ctx context.Context, satell
|
||||
return estimatedEarnings, nil
|
||||
}
|
||||
|
||||
// AllNodesEstimations returns all satellites all time estimated earnings.
|
||||
func (service *Service) AllNodesEstimations(ctx context.Context) (_ int64, err error) {
|
||||
// NodesEstimations returns all satellites all time estimated earnings.
|
||||
func (service *Service) NodesEstimations(ctx context.Context) (_ int64, err error) {
|
||||
defer mon.Task()(&ctx)(&err)
|
||||
|
||||
var estimatedEarnings int64
|
||||
|
@ -1002,6 +1002,168 @@ func (m *AllSatellitesPeriodSummaryResponse) GetPayoutInfo() *PayoutInfo {
|
||||
return nil
|
||||
}
|
||||
|
||||
type SatelliteSummaryRequest 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 *SatelliteSummaryRequest) Reset() { *m = SatelliteSummaryRequest{} }
|
||||
func (m *SatelliteSummaryRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*SatelliteSummaryRequest) ProtoMessage() {}
|
||||
func (*SatelliteSummaryRequest) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_9a45fd79b06f3a1b, []int{21}
|
||||
}
|
||||
func (m *SatelliteSummaryRequest) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_SatelliteSummaryRequest.Unmarshal(m, b)
|
||||
}
|
||||
func (m *SatelliteSummaryRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_SatelliteSummaryRequest.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *SatelliteSummaryRequest) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_SatelliteSummaryRequest.Merge(m, src)
|
||||
}
|
||||
func (m *SatelliteSummaryRequest) XXX_Size() int {
|
||||
return xxx_messageInfo_SatelliteSummaryRequest.Size(m)
|
||||
}
|
||||
func (m *SatelliteSummaryRequest) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_SatelliteSummaryRequest.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_SatelliteSummaryRequest proto.InternalMessageInfo
|
||||
|
||||
func (m *SatelliteSummaryRequest) GetHeader() *RequestHeader {
|
||||
if m != nil {
|
||||
return m.Header
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type SatelliteSummaryResponse struct {
|
||||
PayoutInfo *PayoutInfo `protobuf:"bytes,1,opt,name=payout_info,json=payoutInfo,proto3" json:"payout_info,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *SatelliteSummaryResponse) Reset() { *m = SatelliteSummaryResponse{} }
|
||||
func (m *SatelliteSummaryResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*SatelliteSummaryResponse) ProtoMessage() {}
|
||||
func (*SatelliteSummaryResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_9a45fd79b06f3a1b, []int{22}
|
||||
}
|
||||
func (m *SatelliteSummaryResponse) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_SatelliteSummaryResponse.Unmarshal(m, b)
|
||||
}
|
||||
func (m *SatelliteSummaryResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_SatelliteSummaryResponse.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *SatelliteSummaryResponse) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_SatelliteSummaryResponse.Merge(m, src)
|
||||
}
|
||||
func (m *SatelliteSummaryResponse) XXX_Size() int {
|
||||
return xxx_messageInfo_SatelliteSummaryResponse.Size(m)
|
||||
}
|
||||
func (m *SatelliteSummaryResponse) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_SatelliteSummaryResponse.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_SatelliteSummaryResponse proto.InternalMessageInfo
|
||||
|
||||
func (m *SatelliteSummaryResponse) GetPayoutInfo() *PayoutInfo {
|
||||
if m != nil {
|
||||
return m.PayoutInfo
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type SatellitePeriodSummaryRequest 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"`
|
||||
Period string `protobuf:"bytes,3,opt,name=period,proto3" json:"period,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *SatellitePeriodSummaryRequest) Reset() { *m = SatellitePeriodSummaryRequest{} }
|
||||
func (m *SatellitePeriodSummaryRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*SatellitePeriodSummaryRequest) ProtoMessage() {}
|
||||
func (*SatellitePeriodSummaryRequest) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_9a45fd79b06f3a1b, []int{23}
|
||||
}
|
||||
func (m *SatellitePeriodSummaryRequest) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_SatellitePeriodSummaryRequest.Unmarshal(m, b)
|
||||
}
|
||||
func (m *SatellitePeriodSummaryRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_SatellitePeriodSummaryRequest.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *SatellitePeriodSummaryRequest) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_SatellitePeriodSummaryRequest.Merge(m, src)
|
||||
}
|
||||
func (m *SatellitePeriodSummaryRequest) XXX_Size() int {
|
||||
return xxx_messageInfo_SatellitePeriodSummaryRequest.Size(m)
|
||||
}
|
||||
func (m *SatellitePeriodSummaryRequest) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_SatellitePeriodSummaryRequest.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_SatellitePeriodSummaryRequest proto.InternalMessageInfo
|
||||
|
||||
func (m *SatellitePeriodSummaryRequest) GetHeader() *RequestHeader {
|
||||
if m != nil {
|
||||
return m.Header
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *SatellitePeriodSummaryRequest) GetPeriod() string {
|
||||
if m != nil {
|
||||
return m.Period
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type SatellitePeriodSummaryResponse struct {
|
||||
PayoutInfo *PayoutInfo `protobuf:"bytes,1,opt,name=payout_info,json=payoutInfo,proto3" json:"payout_info,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *SatellitePeriodSummaryResponse) Reset() { *m = SatellitePeriodSummaryResponse{} }
|
||||
func (m *SatellitePeriodSummaryResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*SatellitePeriodSummaryResponse) ProtoMessage() {}
|
||||
func (*SatellitePeriodSummaryResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_9a45fd79b06f3a1b, []int{24}
|
||||
}
|
||||
func (m *SatellitePeriodSummaryResponse) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_SatellitePeriodSummaryResponse.Unmarshal(m, b)
|
||||
}
|
||||
func (m *SatellitePeriodSummaryResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_SatellitePeriodSummaryResponse.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *SatellitePeriodSummaryResponse) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_SatellitePeriodSummaryResponse.Merge(m, src)
|
||||
}
|
||||
func (m *SatellitePeriodSummaryResponse) XXX_Size() int {
|
||||
return xxx_messageInfo_SatellitePeriodSummaryResponse.Size(m)
|
||||
}
|
||||
func (m *SatellitePeriodSummaryResponse) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_SatellitePeriodSummaryResponse.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_SatellitePeriodSummaryResponse proto.InternalMessageInfo
|
||||
|
||||
func (m *SatellitePeriodSummaryResponse) GetPayoutInfo() *PayoutInfo {
|
||||
if m != nil {
|
||||
return m.PayoutInfo
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type EarnedRequest struct {
|
||||
Header *RequestHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
@ -1013,7 +1175,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{21}
|
||||
return fileDescriptor_9a45fd79b06f3a1b, []int{25}
|
||||
}
|
||||
func (m *EarnedRequest) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_EarnedRequest.Unmarshal(m, b)
|
||||
@ -1051,7 +1213,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{22}
|
||||
return fileDescriptor_9a45fd79b06f3a1b, []int{26}
|
||||
}
|
||||
func (m *EarnedResponse) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_EarnedResponse.Unmarshal(m, b)
|
||||
@ -1089,7 +1251,7 @@ func (m *EarnedPerSatelliteRequest) Reset() { *m = EarnedPerSatelliteReq
|
||||
func (m *EarnedPerSatelliteRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*EarnedPerSatelliteRequest) ProtoMessage() {}
|
||||
func (*EarnedPerSatelliteRequest) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_9a45fd79b06f3a1b, []int{23}
|
||||
return fileDescriptor_9a45fd79b06f3a1b, []int{27}
|
||||
}
|
||||
func (m *EarnedPerSatelliteRequest) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_EarnedPerSatelliteRequest.Unmarshal(m, b)
|
||||
@ -1127,7 +1289,7 @@ func (m *EarnedPerSatelliteResponse) Reset() { *m = EarnedPerSatelliteRe
|
||||
func (m *EarnedPerSatelliteResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*EarnedPerSatelliteResponse) ProtoMessage() {}
|
||||
func (*EarnedPerSatelliteResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_9a45fd79b06f3a1b, []int{24}
|
||||
return fileDescriptor_9a45fd79b06f3a1b, []int{28}
|
||||
}
|
||||
func (m *EarnedPerSatelliteResponse) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_EarnedPerSatelliteResponse.Unmarshal(m, b)
|
||||
@ -1166,7 +1328,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{25}
|
||||
return fileDescriptor_9a45fd79b06f3a1b, []int{29}
|
||||
}
|
||||
func (m *EarnedSatellite) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_EarnedSatellite.Unmarshal(m, b)
|
||||
@ -1205,7 +1367,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{26}
|
||||
return fileDescriptor_9a45fd79b06f3a1b, []int{30}
|
||||
}
|
||||
func (m *PayoutInfo) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_PayoutInfo.Unmarshal(m, b)
|
||||
@ -1264,6 +1426,10 @@ func init() {
|
||||
proto.RegisterType((*AllSatellitesSummaryResponse)(nil), "multinode.AllSatellitesSummaryResponse")
|
||||
proto.RegisterType((*AllSatellitesPeriodSummaryRequest)(nil), "multinode.AllSatellitesPeriodSummaryRequest")
|
||||
proto.RegisterType((*AllSatellitesPeriodSummaryResponse)(nil), "multinode.AllSatellitesPeriodSummaryResponse")
|
||||
proto.RegisterType((*SatelliteSummaryRequest)(nil), "multinode.SatelliteSummaryRequest")
|
||||
proto.RegisterType((*SatelliteSummaryResponse)(nil), "multinode.SatelliteSummaryResponse")
|
||||
proto.RegisterType((*SatellitePeriodSummaryRequest)(nil), "multinode.SatellitePeriodSummaryRequest")
|
||||
proto.RegisterType((*SatellitePeriodSummaryResponse)(nil), "multinode.SatellitePeriodSummaryResponse")
|
||||
proto.RegisterType((*EarnedRequest)(nil), "multinode.EarnedRequest")
|
||||
proto.RegisterType((*EarnedResponse)(nil), "multinode.EarnedResponse")
|
||||
proto.RegisterType((*EarnedPerSatelliteRequest)(nil), "multinode.EarnedPerSatelliteRequest")
|
||||
@ -1275,75 +1441,80 @@ func init() {
|
||||
func init() { proto.RegisterFile("multinode.proto", fileDescriptor_9a45fd79b06f3a1b) }
|
||||
|
||||
var fileDescriptor_9a45fd79b06f3a1b = []byte{
|
||||
// 1120 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0x5f, 0x73, 0xdb, 0x44,
|
||||
0x10, 0x47, 0x4d, 0x22, 0xd7, 0xeb, 0x34, 0x7f, 0x8e, 0x00, 0x8a, 0xea, 0xd4, 0x41, 0x0d, 0x4d,
|
||||
0xa0, 0xad, 0x03, 0x2e, 0xc3, 0x0c, 0x33, 0x30, 0x43, 0x42, 0x52, 0x9a, 0x21, 0xa1, 0xa9, 0x1c,
|
||||
0xfa, 0x50, 0x98, 0x7a, 0x2e, 0xd6, 0xc5, 0x16, 0x95, 0x75, 0x42, 0x77, 0x0a, 0xf8, 0x0b, 0xf0,
|
||||
0xcc, 0x37, 0x62, 0x78, 0x61, 0xf8, 0x0c, 0x3c, 0x94, 0x2f, 0xc0, 0x3b, 0xaf, 0xcc, 0xfd, 0xb1,
|
||||
0x2c, 0xdb, 0xb2, 0x93, 0xb1, 0x67, 0x78, 0xbb, 0xdb, 0xfd, 0xed, 0x6f, 0xf7, 0x76, 0xef, 0xf6,
|
||||
0x16, 0x96, 0x3b, 0x49, 0xc0, 0xfd, 0x90, 0x7a, 0xa4, 0x1a, 0xc5, 0x94, 0x53, 0x54, 0x4c, 0x05,
|
||||
0x36, 0xb4, 0x68, 0x8b, 0x2a, 0xb1, 0x5d, 0x69, 0x51, 0xda, 0x0a, 0xc8, 0xae, 0xdc, 0x9d, 0x27,
|
||||
0x17, 0xbb, 0xdc, 0xef, 0x10, 0xc6, 0x71, 0x27, 0x52, 0x00, 0x67, 0x07, 0x6e, 0xb9, 0xe4, 0xc7,
|
||||
0x84, 0x30, 0xfe, 0x84, 0x60, 0x8f, 0xc4, 0xe8, 0x1d, 0x28, 0xe0, 0xc8, 0x6f, 0xbc, 0x22, 0x5d,
|
||||
0xcb, 0xd8, 0x34, 0x76, 0x16, 0x5d, 0x13, 0x47, 0xfe, 0xd7, 0xa4, 0xeb, 0x1c, 0xc0, 0xca, 0x81,
|
||||
0xcf, 0x5e, 0xd5, 0x23, 0xdc, 0x24, 0xda, 0x04, 0x7d, 0x08, 0x66, 0x5b, 0x9a, 0x49, 0x6c, 0xa9,
|
||||
0x66, 0x55, 0xfb, 0x71, 0x0d, 0xd0, 0xba, 0x1a, 0xe7, 0xfc, 0x66, 0xc0, 0x6a, 0x86, 0x86, 0x45,
|
||||
0x34, 0x64, 0x04, 0x95, 0xa1, 0x88, 0x83, 0x80, 0x36, 0x31, 0x27, 0x9e, 0xa4, 0x9a, 0x73, 0xfb,
|
||||
0x02, 0x54, 0x81, 0x52, 0xc2, 0x88, 0xd7, 0x88, 0x7c, 0xd2, 0x24, 0xcc, 0xba, 0x21, 0xf5, 0x20,
|
||||
0x44, 0xa7, 0x52, 0x82, 0x36, 0x40, 0xee, 0x1a, 0x3c, 0xc6, 0xac, 0x6d, 0xcd, 0x29, 0x7b, 0x21,
|
||||
0x39, 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
||||
0x82, 0xc0, 0xe7, 0xa4, 0xe1, 0x7b, 0xf2, 0xd6, 0x2d, 0xee, 0x2f, 0x09, 0x9f, 0x7f, 0xbd, 0xae,
|
||||
0x98, 0xdf, 0x50, 0x8f, 0x1c, 0x1d, 0xb8, 0xa5, 0x14, 0x73, 0xe4, 0x39, 0xff, 0x1a, 0x80, 0xb2,
|
||||
0xae, 0xf5, 0xc9, 0x3e, 0x03, 0x93, 0x86, 0x81, 0x1f, 0x12, 0xed, 0x7b, 0x6b, 0xc0, 0xf7, 0x30,
|
||||
0xbc, 0xfa, 0x54, 0x62, 0x5d, 0x6d, 0x83, 0x3e, 0x85, 0x05, 0x9c, 0x78, 0x3e, 0x97, 0x01, 0x94,
|
||||
0x6a, 0x77, 0x27, 0x1b, 0xef, 0x09, 0xa8, 0xab, 0x2c, 0xec, 0x3b, 0x60, 0x2a, 0x32, 0xb4, 0x06,
|
||||
0x0b, 0xac, 0x49, 0x63, 0x15, 0x81, 0xe1, 0xaa, 0x8d, 0xfd, 0x04, 0x16, 0x24, 0x3e, 0x5f, 0x8d,
|
||||
0xde, 0x87, 0x15, 0x96, 0xb0, 0x88, 0x84, 0xa2, 0xfc, 0x0d, 0x05, 0xb8, 0x21, 0x01, 0xcb, 0x7d,
|
||||
0x79, 0x5d, 0x88, 0x9d, 0x63, 0xb0, 0xce, 0xe2, 0x84, 0x71, 0xe2, 0xd5, 0x7b, 0xf9, 0x60, 0xd3,
|
||||
0xdf, 0x90, 0x3f, 0x0c, 0x58, 0xcf, 0xa1, 0xd3, 0xe9, 0xfc, 0x0e, 0x10, 0x57, 0xca, 0x46, 0x9a,
|
||||
0x7c, 0x66, 0x19, 0x9b, 0x73, 0x3b, 0xa5, 0xda, 0x83, 0x0c, 0xf7, 0x58, 0x86, 0xaa, 0xa8, 0xdd,
|
||||
0xb7, 0xee, 0xb1, 0xbb, 0xca, 0x87, 0x21, 0xf6, 0x31, 0x14, 0xb4, 0x16, 0x6d, 0x43, 0x41, 0xf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x09, 0xab, 0x23, 0xff,
|
||||
0x19, 0xba, 0x3b, 0xf9, 0xb7, 0x53, 0xc4, 0x5b, 0xd7, 0xf9, 0x12, 0x6b, 0xff, 0xcc, 0x83, 0xa9,
|
||||
0x6e, 0x0f, 0x6a, 0xc1, 0x5a, 0x5e, 0x9f, 0x43, 0xf7, 0x32, 0x44, 0x13, 0x3a, 0xab, 0xbd, 0x7d,
|
||||
0x25, 0x4e, 0x9f, 0xa9, 0x0b, 0xf6, 0xf8, 0x4e, 0x84, 0x1e, 0x8c, 0xa3, 0xc9, 0xeb, 0x8f, 0xf6,
|
||||
0xc3, 0x6b, 0xa2, 0xb5, 0xeb, 0xcf, 0xc1, 0x54, 0xef, 0x10, 0x59, 0x23, 0xcf, 0xb7, 0x47, 0xb9,
|
||||
0x9e, 0xa3, 0xd1, 0xe6, 0x18, 0xd0, 0x68, 0xaf, 0x40, 0x5b, 0x23, 0x06, 0x39, 0x9d, 0xc9, 0x7e,
|
||||
0xef, 0x0a, 0x94, 0x76, 0xc1, 0xc0, 0x1a, 0xf7, 0x63, 0xa3, 0x0f, 0xb2, 0x14, 0x93, 0xc7, 0x0b,
|
||||
0xfb, 0xfe, 0xb5, 0xb0, 0xda, 0x69, 0x0b, 0xd6, 0xf2, 0xbe, 0xe0, 0x81, 0xd2, 0x4f, 0xf8, 0xf4,
|
||||
0x07, 0x4a, 0x3f, 0xe9, 0x2f, 0xdf, 0xdf, 0x7a, 0xe1, 0x30, 0x4e, 0xe3, 0x1f, 0xaa, 0x3e, 0xdd,
|
||||
0x95, 0x8b, 0xdd, 0x28, 0xf6, 0x2f, 0x31, 0x27, 0xbb, 0x29, 0x41, 0x74, 0x7e, 0x6e, 0xca, 0xa1,
|
||||
0xff, 0xd1, 0x7f, 0x01, 0x00, 0x00, 0xff, 0xff, 0xe2, 0x80, 0x59, 0xb0, 0xed, 0x0e, 0x00, 0x00,
|
||||
// 1199 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x57, 0xdd, 0x72, 0xdb, 0x44,
|
||||
0x14, 0x46, 0x4d, 0x22, 0xd7, 0xc7, 0x69, 0x7e, 0x96, 0xd0, 0x2a, 0xaa, 0x13, 0x07, 0x25, 0x34,
|
||||
0x29, 0x6d, 0x1d, 0x70, 0x19, 0x66, 0x98, 0x81, 0x19, 0x12, 0x92, 0xd2, 0x0c, 0x09, 0x4d, 0x95,
|
||||
0xd0, 0x61, 0x0a, 0x53, 0xcf, 0xc6, 0xda, 0x38, 0xa2, 0xb2, 0x56, 0x68, 0xd7, 0x81, 0xdc, 0x70,
|
||||
0xc9, 0x35, 0x0f, 0xc0, 0x83, 0x70, 0xc7, 0x70, 0xc3, 0xf0, 0x0c, 0x5c, 0x94, 0xc7, 0xe0, 0x96,
|
||||
0xd9, 0x1f, 0xcb, 0xb2, 0x2d, 0x2b, 0xc1, 0x66, 0xb8, 0xdb, 0x3d, 0x3f, 0xdf, 0x39, 0xbb, 0xe7,
|
||||
0xe8, 0xec, 0x27, 0x98, 0x6d, 0xb5, 0x03, 0xee, 0x87, 0xd4, 0x23, 0xd5, 0x28, 0xa6, 0x9c, 0xa2,
|
||||
0x62, 0x22, 0xb0, 0xa1, 0x49, 0x9b, 0x54, 0x89, 0xed, 0x4a, 0x93, 0xd2, 0x66, 0x40, 0x36, 0xe5,
|
||||
0xee, 0xa4, 0x7d, 0xba, 0xc9, 0xfd, 0x16, 0x61, 0x1c, 0xb7, 0x22, 0x65, 0xe0, 0x6c, 0xc0, 0x0d,
|
||||
0x97, 0x7c, 0xdb, 0x26, 0x8c, 0x3f, 0x26, 0xd8, 0x23, 0x31, 0xba, 0x05, 0x05, 0x1c, 0xf9, 0xf5,
|
||||
0x97, 0xe4, 0xc2, 0x32, 0x56, 0x8c, 0x8d, 0x69, 0xd7, 0xc4, 0x91, 0xff, 0x19, 0xb9, 0x70, 0x76,
|
||||
0x60, 0x6e, 0xc7, 0x67, 0x2f, 0x8f, 0x22, 0xdc, 0x20, 0xda, 0x05, 0xbd, 0x03, 0xe6, 0x99, 0x74,
|
||||
0x93, 0xb6, 0xa5, 0x9a, 0x55, 0xed, 0xe6, 0xd5, 0x03, 0xeb, 0x6a, 0x3b, 0xe7, 0x57, 0x03, 0xe6,
|
||||
0x53, 0x30, 0x2c, 0xa2, 0x21, 0x23, 0xa8, 0x0c, 0x45, 0x1c, 0x04, 0xb4, 0x81, 0x39, 0xf1, 0x24,
|
||||
0xd4, 0x84, 0xdb, 0x15, 0xa0, 0x0a, 0x94, 0xda, 0x8c, 0x78, 0xf5, 0xc8, 0x27, 0x0d, 0xc2, 0xac,
|
||||
0x6b, 0x52, 0x0f, 0x42, 0x74, 0x28, 0x25, 0x68, 0x09, 0xe4, 0xae, 0xce, 0x63, 0xcc, 0xce, 0xac,
|
||||
0x09, 0xe5, 0x2f, 0x24, 0xc7, 0x42, 0x80, 0x10, 0x4c, 0x9e, 0xc6, 0x84, 0x58, 0x93, 0x52, 0x21,
|
||||
0xd7, 0x32, 0xe2, 0x39, 0xf6, 0x03, 0x7c, 0x12, 0x10, 0x6b, 0x4a, 0x47, 0xec, 0x08, 0x90, 0x0d,
|
||||
0xd7, 0xe9, 0x39, 0x89, 0x05, 0x84, 0x65, 0x4a, 0x65, 0xb2, 0x77, 0x0e, 0xa1, 0xbc, 0x8d, 0x43,
|
||||
0xef, 0x3b, 0xdf, 0xe3, 0x67, 0x07, 0x34, 0xe4, 0x67, 0x47, 0xed, 0x56, 0x0b, 0xc7, 0x17, 0xa3,
|
||||
0xdf, 0xc9, 0x43, 0x58, 0x1a, 0x82, 0xa8, 0xaf, 0x07, 0xc1, 0xa4, 0x4c, 0x45, 0xdd, 0x8c, 0x5c,
|
||||
0x3b, 0xdb, 0x30, 0xf3, 0x8c, 0xc4, 0xcc, 0xa7, 0xe1, 0xe8, 0x81, 0xef, 0xc1, 0x6c, 0x82, 0xa1,
|
||||
0x43, 0x59, 0x50, 0x38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x28, 0x7d, 0xfc,
|
||||
0x1e, 0x40, 0xb7, 0x28, 0x82, 0xff, 0x9d, 0x91, 0x20, 0xe1, 0x7f, 0x62, 0x2d, 0x64, 0x11, 0xd6,
|
||||
0x60, 0x13, 0xae, 0x5c, 0xd7, 0x9e, 0x42, 0xe1, 0x88, 0xd3, 0x18, 0x37, 0x09, 0x7a, 0x04, 0xc5,
|
||||
0x84, 0x66, 0xa3, 0xdb, 0xa9, 0x63, 0xf5, 0x73, 0x78, 0xbb, 0x9c, 0xad, 0x54, 0x77, 0x55, 0x0b,
|
||||
0xa1, 0x98, 0x70, 0x53, 0x84, 0x61, 0x3a, 0xcd, 0x4f, 0xd1, 0x7a, 0xca, 0x35, 0x8f, 0x13, 0xdb,
|
||||
0x1b, 0x97, 0x1b, 0xea, 0x78, 0xbf, 0x5d, 0x83, 0x49, 0x71, 0x21, 0xe8, 0x63, 0x28, 0x68, 0x6e,
|
||||
0x8a, 0x16, 0x53, 0xde, 0xbd, 0x9c, 0xd7, 0xb6, 0xb3, 0x54, 0xba, 0xcc, 0xfb, 0x50, 0x4a, 0x11,
|
||||
0x4d, 0xb4, 0x94, 0x32, 0x1d, 0x24, 0xb2, 0xf6, 0xf2, 0x30, 0xb5, 0x46, 0xdb, 0x03, 0xe8, 0xf2,
|
||||
0x2d, 0x54, 0x1e, 0x42, 0xc3, 0x14, 0xd6, 0x52, 0x2e, 0x49, 0x43, 0x2f, 0x60, 0x7e, 0x80, 0x9c,
|
||||
0xa0, 0xd5, 0x7c, 0xea, 0xa2, 0x80, 0xd7, 0xae, 0xc2, 0x6f, 0x6a, 0xbf, 0x98, 0x60, 0xaa, 0xee,
|
||||
0x41, 0x4d, 0x58, 0xc8, 0x7a, 0xb4, 0xd0, 0x9d, 0x14, 0x50, 0xce, 0x33, 0x69, 0xaf, 0x5f, 0x6a,
|
||||
0xa7, 0xcf, 0x74, 0x01, 0xf6, 0xf0, 0x67, 0x05, 0xdd, 0x1f, 0x06, 0x93, 0x35, 0x4e, 0xed, 0x07,
|
||||
0x57, 0xb4, 0x4e, 0x08, 0xe1, 0x5c, 0xff, 0xcc, 0x47, 0x4e, 0x0a, 0x62, 0xc8, 0x83, 0x64, 0xaf,
|
||||
0xe6, 0xda, 0x68, 0xf0, 0x16, 0xdc, 0xcc, 0x9e, 0xae, 0x68, 0x23, 0xcb, 0x3d, 0xf3, 0x3c, 0x77,
|
||||
0xaf, 0x60, 0xa9, 0xc3, 0x7d, 0x04, 0xa6, 0x9a, 0x29, 0xc8, 0x1a, 0x18, 0x45, 0x1d, 0xb8, 0xc5,
|
||||
0x0c, 0x8d, 0x76, 0xc7, 0x80, 0x06, 0xe7, 0x1e, 0x5a, 0x1b, 0x70, 0xc8, 0x98, 0xb2, 0xf6, 0x5b,
|
||||
0x97, 0x58, 0xe9, 0x10, 0x0c, 0xac, 0x61, 0x54, 0x12, 0xbd, 0x9d, 0x86, 0xc8, 0xe7, 0xbd, 0xf6,
|
||||
0xbd, 0x2b, 0xd9, 0xea, 0xa0, 0x4d, 0x58, 0xc8, 0xe2, 0x86, 0x3d, 0x6d, 0x9c, 0xc3, 0x46, 0x7b,
|
||||
0xda, 0x38, 0x8f, 0x64, 0x6e, 0xaf, 0x3d, 0x77, 0x18, 0xa7, 0xf1, 0x37, 0x55, 0x9f, 0x6e, 0xca,
|
||||
0xc5, 0x66, 0x14, 0xfb, 0xe7, 0x98, 0x93, 0xcd, 0x04, 0x20, 0x3a, 0x39, 0x31, 0xe5, 0xdf, 0xe8,
|
||||
0xc3, 0x7f, 0x02, 0x00, 0x00, 0xff, 0xff, 0x44, 0x72, 0xb4, 0x3b, 0x86, 0x11, 0x00, 0x00,
|
||||
}
|
||||
|
@ -99,6 +99,8 @@ message TrustedSatellitesResponse {
|
||||
service Payout {
|
||||
rpc AllSatellitesSummary(AllSatellitesSummaryRequest) returns (AllSatellitesSummaryResponse);
|
||||
rpc AllSatellitesPeriodSummary(AllSatellitesPeriodSummaryRequest) returns (AllSatellitesPeriodSummaryResponse);
|
||||
rpc SatelliteSummary(SatelliteSummaryRequest) returns (SatelliteSummaryResponse);
|
||||
rpc SatellitePeriodSummary(SatellitePeriodSummaryRequest) returns (SatellitePeriodSummaryResponse);
|
||||
rpc Earned(EarnedRequest) returns (EarnedResponse);
|
||||
rpc EarnedPerSatellite(EarnedPerSatelliteRequest) returns (EarnedPerSatelliteResponse);
|
||||
rpc EstimatedPayoutSatellite(EstimatedPayoutSatelliteRequest) returns (EstimatedPayoutSatelliteResponse);
|
||||
@ -109,12 +111,15 @@ message EstimatedPayoutSatelliteRequest {
|
||||
RequestHeader header = 1;
|
||||
bytes satellite_id = 2 [(gogoproto.customtype) = "NodeID", (gogoproto.nullable) = false];
|
||||
}
|
||||
|
||||
message EstimatedPayoutSatelliteResponse {
|
||||
int64 estimated_earnings = 1;
|
||||
}
|
||||
|
||||
message EstimatedPayoutTotalRequest {
|
||||
RequestHeader header = 1;
|
||||
}
|
||||
|
||||
message EstimatedPayoutTotalResponse {
|
||||
int64 estimated_earnings = 1;
|
||||
}
|
||||
@ -136,6 +141,25 @@ message AllSatellitesPeriodSummaryResponse {
|
||||
PayoutInfo payout_info = 1;
|
||||
}
|
||||
|
||||
message SatelliteSummaryRequest {
|
||||
RequestHeader header = 1;
|
||||
bytes satellite_id = 2 [(gogoproto.customtype) = "NodeID", (gogoproto.nullable) = false];
|
||||
}
|
||||
|
||||
message SatelliteSummaryResponse {
|
||||
PayoutInfo payout_info = 1;
|
||||
}
|
||||
|
||||
message SatellitePeriodSummaryRequest {
|
||||
RequestHeader header = 1;
|
||||
bytes satellite_id = 2 [(gogoproto.customtype) = "NodeID", (gogoproto.nullable) = false];
|
||||
string period = 3;
|
||||
}
|
||||
|
||||
message SatellitePeriodSummaryResponse {
|
||||
PayoutInfo payout_info = 1;
|
||||
}
|
||||
|
||||
message EarnedRequest {
|
||||
RequestHeader header = 1;
|
||||
}
|
||||
|
@ -389,6 +389,8 @@ type DRPCPayoutClient interface {
|
||||
|
||||
AllSatellitesSummary(ctx context.Context, in *AllSatellitesSummaryRequest) (*AllSatellitesSummaryResponse, error)
|
||||
AllSatellitesPeriodSummary(ctx context.Context, in *AllSatellitesPeriodSummaryRequest) (*AllSatellitesPeriodSummaryResponse, error)
|
||||
SatelliteSummary(ctx context.Context, in *SatelliteSummaryRequest) (*SatelliteSummaryResponse, error)
|
||||
SatellitePeriodSummary(ctx context.Context, in *SatellitePeriodSummaryRequest) (*SatellitePeriodSummaryResponse, error)
|
||||
Earned(ctx context.Context, in *EarnedRequest) (*EarnedResponse, error)
|
||||
EarnedPerSatellite(ctx context.Context, in *EarnedPerSatelliteRequest) (*EarnedPerSatelliteResponse, error)
|
||||
EstimatedPayoutSatellite(ctx context.Context, in *EstimatedPayoutSatelliteRequest) (*EstimatedPayoutSatelliteResponse, error)
|
||||
@ -423,6 +425,24 @@ func (c *drpcPayoutClient) AllSatellitesPeriodSummary(ctx context.Context, in *A
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *drpcPayoutClient) SatelliteSummary(ctx context.Context, in *SatelliteSummaryRequest) (*SatelliteSummaryResponse, error) {
|
||||
out := new(SatelliteSummaryResponse)
|
||||
err := c.cc.Invoke(ctx, "/multinode.Payout/SatelliteSummary", drpcEncoding_File_multinode_proto{}, in, out)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *drpcPayoutClient) SatellitePeriodSummary(ctx context.Context, in *SatellitePeriodSummaryRequest) (*SatellitePeriodSummaryResponse, error) {
|
||||
out := new(SatellitePeriodSummaryResponse)
|
||||
err := c.cc.Invoke(ctx, "/multinode.Payout/SatellitePeriodSummary", drpcEncoding_File_multinode_proto{}, in, out)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *drpcPayoutClient) Earned(ctx context.Context, in *EarnedRequest) (*EarnedResponse, error) {
|
||||
out := new(EarnedResponse)
|
||||
err := c.cc.Invoke(ctx, "/multinode.Payout/Earned", drpcEncoding_File_multinode_proto{}, in, out)
|
||||
@ -462,6 +482,8 @@ func (c *drpcPayoutClient) EstimatedPayoutTotal(ctx context.Context, in *Estimat
|
||||
type DRPCPayoutServer interface {
|
||||
AllSatellitesSummary(context.Context, *AllSatellitesSummaryRequest) (*AllSatellitesSummaryResponse, error)
|
||||
AllSatellitesPeriodSummary(context.Context, *AllSatellitesPeriodSummaryRequest) (*AllSatellitesPeriodSummaryResponse, error)
|
||||
SatelliteSummary(context.Context, *SatelliteSummaryRequest) (*SatelliteSummaryResponse, error)
|
||||
SatellitePeriodSummary(context.Context, *SatellitePeriodSummaryRequest) (*SatellitePeriodSummaryResponse, error)
|
||||
Earned(context.Context, *EarnedRequest) (*EarnedResponse, error)
|
||||
EarnedPerSatellite(context.Context, *EarnedPerSatelliteRequest) (*EarnedPerSatelliteResponse, error)
|
||||
EstimatedPayoutSatellite(context.Context, *EstimatedPayoutSatelliteRequest) (*EstimatedPayoutSatelliteResponse, error)
|
||||
@ -478,6 +500,14 @@ func (s *DRPCPayoutUnimplementedServer) AllSatellitesPeriodSummary(context.Conte
|
||||
return nil, drpcerr.WithCode(errors.New("Unimplemented"), 12)
|
||||
}
|
||||
|
||||
func (s *DRPCPayoutUnimplementedServer) SatelliteSummary(context.Context, *SatelliteSummaryRequest) (*SatelliteSummaryResponse, error) {
|
||||
return nil, drpcerr.WithCode(errors.New("Unimplemented"), 12)
|
||||
}
|
||||
|
||||
func (s *DRPCPayoutUnimplementedServer) SatellitePeriodSummary(context.Context, *SatellitePeriodSummaryRequest) (*SatellitePeriodSummaryResponse, error) {
|
||||
return nil, drpcerr.WithCode(errors.New("Unimplemented"), 12)
|
||||
}
|
||||
|
||||
func (s *DRPCPayoutUnimplementedServer) Earned(context.Context, *EarnedRequest) (*EarnedResponse, error) {
|
||||
return nil, drpcerr.WithCode(errors.New("Unimplemented"), 12)
|
||||
}
|
||||
@ -496,7 +526,7 @@ func (s *DRPCPayoutUnimplementedServer) EstimatedPayoutTotal(context.Context, *E
|
||||
|
||||
type DRPCPayoutDescription struct{}
|
||||
|
||||
func (DRPCPayoutDescription) NumMethods() int { return 6 }
|
||||
func (DRPCPayoutDescription) NumMethods() int { return 8 }
|
||||
|
||||
func (DRPCPayoutDescription) Method(n int) (string, drpc.Encoding, drpc.Receiver, interface{}, bool) {
|
||||
switch n {
|
||||
@ -519,6 +549,24 @@ func (DRPCPayoutDescription) Method(n int) (string, drpc.Encoding, drpc.Receiver
|
||||
)
|
||||
}, DRPCPayoutServer.AllSatellitesPeriodSummary, true
|
||||
case 2:
|
||||
return "/multinode.Payout/SatelliteSummary", drpcEncoding_File_multinode_proto{},
|
||||
func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) {
|
||||
return srv.(DRPCPayoutServer).
|
||||
SatelliteSummary(
|
||||
ctx,
|
||||
in1.(*SatelliteSummaryRequest),
|
||||
)
|
||||
}, DRPCPayoutServer.SatelliteSummary, true
|
||||
case 3:
|
||||
return "/multinode.Payout/SatellitePeriodSummary", drpcEncoding_File_multinode_proto{},
|
||||
func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) {
|
||||
return srv.(DRPCPayoutServer).
|
||||
SatellitePeriodSummary(
|
||||
ctx,
|
||||
in1.(*SatellitePeriodSummaryRequest),
|
||||
)
|
||||
}, DRPCPayoutServer.SatellitePeriodSummary, true
|
||||
case 4:
|
||||
return "/multinode.Payout/Earned", drpcEncoding_File_multinode_proto{},
|
||||
func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) {
|
||||
return srv.(DRPCPayoutServer).
|
||||
@ -527,7 +575,7 @@ func (DRPCPayoutDescription) Method(n int) (string, drpc.Encoding, drpc.Receiver
|
||||
in1.(*EarnedRequest),
|
||||
)
|
||||
}, DRPCPayoutServer.Earned, true
|
||||
case 3:
|
||||
case 5:
|
||||
return "/multinode.Payout/EarnedPerSatellite", drpcEncoding_File_multinode_proto{},
|
||||
func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) {
|
||||
return srv.(DRPCPayoutServer).
|
||||
@ -536,7 +584,7 @@ func (DRPCPayoutDescription) Method(n int) (string, drpc.Encoding, drpc.Receiver
|
||||
in1.(*EarnedPerSatelliteRequest),
|
||||
)
|
||||
}, DRPCPayoutServer.EarnedPerSatellite, true
|
||||
case 4:
|
||||
case 6:
|
||||
return "/multinode.Payout/EstimatedPayoutSatellite", drpcEncoding_File_multinode_proto{},
|
||||
func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) {
|
||||
return srv.(DRPCPayoutServer).
|
||||
@ -545,7 +593,7 @@ func (DRPCPayoutDescription) Method(n int) (string, drpc.Encoding, drpc.Receiver
|
||||
in1.(*EstimatedPayoutSatelliteRequest),
|
||||
)
|
||||
}, DRPCPayoutServer.EstimatedPayoutSatellite, true
|
||||
case 5:
|
||||
case 7:
|
||||
return "/multinode.Payout/EstimatedPayoutTotal", drpcEncoding_File_multinode_proto{},
|
||||
func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) {
|
||||
return srv.(DRPCPayoutServer).
|
||||
@ -595,6 +643,38 @@ func (x *drpcPayout_AllSatellitesPeriodSummaryStream) SendAndClose(m *AllSatelli
|
||||
return x.CloseSend()
|
||||
}
|
||||
|
||||
type DRPCPayout_SatelliteSummaryStream interface {
|
||||
drpc.Stream
|
||||
SendAndClose(*SatelliteSummaryResponse) error
|
||||
}
|
||||
|
||||
type drpcPayout_SatelliteSummaryStream struct {
|
||||
drpc.Stream
|
||||
}
|
||||
|
||||
func (x *drpcPayout_SatelliteSummaryStream) SendAndClose(m *SatelliteSummaryResponse) error {
|
||||
if err := x.MsgSend(m, drpcEncoding_File_multinode_proto{}); err != nil {
|
||||
return err
|
||||
}
|
||||
return x.CloseSend()
|
||||
}
|
||||
|
||||
type DRPCPayout_SatellitePeriodSummaryStream interface {
|
||||
drpc.Stream
|
||||
SendAndClose(*SatellitePeriodSummaryResponse) error
|
||||
}
|
||||
|
||||
type drpcPayout_SatellitePeriodSummaryStream struct {
|
||||
drpc.Stream
|
||||
}
|
||||
|
||||
func (x *drpcPayout_SatellitePeriodSummaryStream) SendAndClose(m *SatellitePeriodSummaryResponse) error {
|
||||
if err := x.MsgSend(m, drpcEncoding_File_multinode_proto{}); err != nil {
|
||||
return err
|
||||
}
|
||||
return x.CloseSend()
|
||||
}
|
||||
|
||||
type DRPCPayout_EarnedStream interface {
|
||||
drpc.Stream
|
||||
SendAndClose(*EarnedResponse) error
|
||||
|
@ -172,3 +172,39 @@ func (payout *PayoutEndpoint) AllSatellitesPeriodSummary(ctx context.Context, re
|
||||
|
||||
return &multinodepb.AllSatellitesPeriodSummaryResponse{PayoutInfo: &multinodepb.PayoutInfo{Held: totalHeld, Paid: totalPaid}}, nil
|
||||
}
|
||||
|
||||
// SatelliteSummary returns satellite all time payout summary.
|
||||
func (payout *PayoutEndpoint) SatelliteSummary(ctx context.Context, req *multinodepb.SatelliteSummaryRequest) (_ *multinodepb.SatelliteSummaryResponse, err error) {
|
||||
defer mon.Task()(&ctx)(&err)
|
||||
|
||||
if err = authenticate(ctx, payout.apiKeys, req.GetHeader()); err != nil {
|
||||
return nil, rpcstatus.Wrap(rpcstatus.Unauthenticated, err)
|
||||
}
|
||||
|
||||
var totalPaid, totalHeld int64
|
||||
|
||||
totalPaid, totalHeld, err = payout.db.GetSatelliteSummary(ctx, req.SatelliteId)
|
||||
if err != nil {
|
||||
return &multinodepb.SatelliteSummaryResponse{}, rpcstatus.Wrap(rpcstatus.Internal, err)
|
||||
}
|
||||
|
||||
return &multinodepb.SatelliteSummaryResponse{PayoutInfo: &multinodepb.PayoutInfo{Held: totalHeld, Paid: totalPaid}}, nil
|
||||
}
|
||||
|
||||
// SatellitePeriodSummary returns satellite period payout summary.
|
||||
func (payout *PayoutEndpoint) SatellitePeriodSummary(ctx context.Context, req *multinodepb.SatellitePeriodSummaryRequest) (_ *multinodepb.SatellitePeriodSummaryResponse, err error) {
|
||||
defer mon.Task()(&ctx)(&err)
|
||||
|
||||
if err = authenticate(ctx, payout.apiKeys, req.GetHeader()); err != nil {
|
||||
return nil, rpcstatus.Wrap(rpcstatus.Unauthenticated, err)
|
||||
}
|
||||
|
||||
var totalPaid, totalHeld int64
|
||||
|
||||
totalPaid, totalHeld, err = payout.db.GetSatellitePeriodSummary(ctx, req.SatelliteId, req.Period)
|
||||
if err != nil {
|
||||
return &multinodepb.SatellitePeriodSummaryResponse{}, rpcstatus.Wrap(rpcstatus.Internal, err)
|
||||
}
|
||||
|
||||
return &multinodepb.SatellitePeriodSummaryResponse{PayoutInfo: &multinodepb.PayoutInfo{Held: totalHeld, Paid: totalPaid}}, nil
|
||||
}
|
||||
|
@ -16,7 +16,6 @@ import (
|
||||
"storj.io/common/testcontext"
|
||||
"storj.io/common/testrand"
|
||||
"storj.io/storj/private/multinodepb"
|
||||
"storj.io/storj/private/testplanet"
|
||||
"storj.io/storj/storagenode"
|
||||
"storj.io/storj/storagenode/apikeys"
|
||||
"storj.io/storj/storagenode/multinode"
|
||||
@ -49,14 +48,26 @@ var (
|
||||
}
|
||||
)
|
||||
|
||||
func TestEarnedPerSatellite(t *testing.T) {
|
||||
testplanet.Run(t, testplanet.Config{
|
||||
StorageNodeCount: 1,
|
||||
}, func(t *testing.T, ctx *testcontext.Context, planet *testplanet.Planet) {
|
||||
func TestPayoutsEndpointSummary(t *testing.T) {
|
||||
storagenodedbtest.Run(t, func(ctx *testcontext.Context, t *testing.T, db storagenode.DB) {
|
||||
log := zaptest.NewLogger(t)
|
||||
service := apikeys.NewService(planet.StorageNodes[0].DB.APIKeys())
|
||||
estimatedPayoutsService := estimatedpayouts.NewService(planet.StorageNodes[0].DB.Bandwidth(), planet.StorageNodes[0].DB.Reputation(), planet.StorageNodes[0].DB.StorageUsage(), planet.StorageNodes[0].DB.Pricing(), planet.StorageNodes[0].DB.Satellites(), &trust.Pool{})
|
||||
endpoint := multinode.NewPayoutEndpoint(log, service, estimatedPayoutsService, planet.StorageNodes[0].DB.Payout())
|
||||
satelliteID := testrand.NodeID()
|
||||
apikeydb := db.APIKeys()
|
||||
payoutdb := db.Payout()
|
||||
service := apikeys.NewService(apikeydb)
|
||||
|
||||
// Initialize a trust pool
|
||||
poolConfig := trust.Config{
|
||||
CachePath: ctx.File("trust-cache.json"),
|
||||
}
|
||||
poolConfig.Sources = append(poolConfig.Sources, &trust.StaticURLSource{URL: trust.SatelliteURL{ID: satelliteID}})
|
||||
|
||||
trustPool, err := trust.NewPool(zaptest.NewLogger(t), trust.Dialer(rpc.Dialer{}), poolConfig)
|
||||
require.NoError(t, err)
|
||||
require.NoError(t, trustPool.Refresh(ctx))
|
||||
|
||||
estimatedPayoutsService := estimatedpayouts.NewService(db.Bandwidth(), db.Reputation(), db.StorageUsage(), db.Pricing(), db.Satellites(), trustPool)
|
||||
endpoint := multinode.NewPayoutEndpoint(log, service, estimatedPayoutsService, db.Payout())
|
||||
|
||||
id := testrand.NodeID()
|
||||
id2 := testrand.NodeID()
|
||||
@ -64,7 +75,7 @@ func TestEarnedPerSatellite(t *testing.T) {
|
||||
var amount int64 = 200
|
||||
var amount2 int64 = 150
|
||||
|
||||
err := planet.StorageNodes[0].DB.Payout().StorePayStub(ctx, payouts.PayStub{
|
||||
err = payoutdb.StorePayStub(ctx, payouts.PayStub{
|
||||
SatelliteID: id,
|
||||
Held: amount,
|
||||
Paid: amount,
|
||||
@ -72,7 +83,7 @@ func TestEarnedPerSatellite(t *testing.T) {
|
||||
})
|
||||
require.NoError(t, err)
|
||||
|
||||
err = planet.StorageNodes[0].DB.Payout().StorePayStub(ctx, payouts.PayStub{
|
||||
err = payoutdb.StorePayStub(ctx, payouts.PayStub{
|
||||
SatelliteID: id2,
|
||||
Held: amount2,
|
||||
Paid: amount2,
|
||||
@ -100,10 +111,28 @@ func TestEarnedPerSatellite(t *testing.T) {
|
||||
require.NoError(t, err)
|
||||
require.Equal(t, response2.PayoutInfo.Paid, amount+amount2)
|
||||
require.Equal(t, response2.PayoutInfo.Held, amount+amount2)
|
||||
|
||||
response3, err := endpoint.SatellitePeriodSummary(ctx, &multinodepb.SatellitePeriodSummaryRequest{
|
||||
Header: &multinodepb.RequestHeader{
|
||||
ApiKey: key.Secret[:],
|
||||
}, SatelliteId: id2, Period: "2020-11",
|
||||
})
|
||||
require.NoError(t, err)
|
||||
require.Equal(t, response3.PayoutInfo.Paid, amount2)
|
||||
require.Equal(t, response3.PayoutInfo.Held, amount2)
|
||||
|
||||
response4, err := endpoint.SatelliteSummary(ctx, &multinodepb.SatelliteSummaryRequest{
|
||||
Header: &multinodepb.RequestHeader{
|
||||
ApiKey: key.Secret[:],
|
||||
}, SatelliteId: id,
|
||||
})
|
||||
require.NoError(t, err)
|
||||
require.Equal(t, response4.PayoutInfo.Paid, amount)
|
||||
require.Equal(t, response4.PayoutInfo.Held, amount)
|
||||
})
|
||||
}
|
||||
|
||||
func TestStorageNodeApi(t *testing.T) {
|
||||
func TestPayoutsEndpointEstimations(t *testing.T) {
|
||||
storagenodedbtest.Run(t, func(ctx *testcontext.Context, t *testing.T, db storagenode.DB) {
|
||||
satelliteID := testrand.NodeID()
|
||||
bandwidthdb := db.Bandwidth()
|
||||
|
Loading…
Reference in New Issue
Block a user