pb: use *UnimplementedServer to avoid breaking API changes
Change-Id: I99a34eeb37ac4453411f273511710562a519f57a
This commit is contained in:
parent
c8a3e0ff96
commit
86e698f572
@ -18,6 +18,8 @@ import (
|
||||
|
||||
// Endpoint implements pb.CertificatesServer.
|
||||
type Endpoint struct {
|
||||
pb.DRPCCertificatesUnimplementedServer
|
||||
|
||||
rpclog *rpcerrs.Log
|
||||
log *zap.Logger
|
||||
ca *identity.FullCertificateAuthority
|
||||
|
@ -26,6 +26,7 @@ var (
|
||||
|
||||
// Endpoint implements the contact service Endpoints.
|
||||
type Endpoint struct {
|
||||
pb.DRPCNodeUnimplementedServer
|
||||
log *zap.Logger
|
||||
service *Service
|
||||
}
|
||||
|
@ -40,6 +40,8 @@ var (
|
||||
|
||||
// Endpoint for handling the transfer of pieces for Graceful Exit.
|
||||
type Endpoint struct {
|
||||
pb.DRPCSatelliteGracefulExitUnimplementedServer
|
||||
|
||||
log *zap.Logger
|
||||
interval time.Duration
|
||||
signer signing.Signer
|
||||
|
@ -30,6 +30,7 @@ var (
|
||||
//
|
||||
// architecture: Endpoint
|
||||
type Endpoint struct {
|
||||
internalpb.DRPCHealthInspectorUnimplementedServer
|
||||
log *zap.Logger
|
||||
overlay *overlay.Service
|
||||
metabaseDB metainfo.MetabaseDB
|
||||
|
@ -62,6 +62,8 @@ type APIKeys interface {
|
||||
//
|
||||
// architecture: Endpoint
|
||||
type Endpoint struct {
|
||||
pb.DRPCMetainfoUnimplementedServer
|
||||
|
||||
log *zap.Logger
|
||||
metainfo *Service
|
||||
deletePieces *piecedeletion.Service
|
||||
@ -1001,13 +1003,6 @@ func (endpoint *Endpoint) ListObjects(ctx context.Context, req *pb.ObjectListReq
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
// GetPendingObjects get pending objects according to specific parameters.
|
||||
func (endpoint *Endpoint) GetPendingObjects(ctx context.Context, req *pb.GetPendingObjectsRequest) (resp *pb.GetPendingObjectsResponse, err error) {
|
||||
defer mon.Task()(&ctx)(&err)
|
||||
|
||||
return nil, rpcstatus.Error(rpcstatus.Unimplemented, "Not Implemented")
|
||||
}
|
||||
|
||||
// ListPendingObjectStreams list pending objects according to specific parameters.
|
||||
func (endpoint *Endpoint) ListPendingObjectStreams(ctx context.Context, req *pb.ObjectListPendingStreamsRequest) (resp *pb.ObjectListPendingStreamsResponse, err error) {
|
||||
defer mon.Task()(&ctx)(&err)
|
||||
@ -1195,12 +1190,6 @@ func (endpoint *Endpoint) BeginDeleteObject(ctx context.Context, req *pb.ObjectB
|
||||
}, nil
|
||||
}
|
||||
|
||||
// FinishDeleteObject finishes object deletion.
|
||||
func (endpoint *Endpoint) FinishDeleteObject(ctx context.Context, req *pb.ObjectFinishDeleteRequest) (resp *pb.ObjectFinishDeleteResponse, err error) {
|
||||
// all logic for deleting is now in BeginDeleteObject
|
||||
return nil, rpcstatus.Error(rpcstatus.Unimplemented, "not implemented")
|
||||
}
|
||||
|
||||
// GetObjectIPs returns the IP addresses of the nodes holding the pieces for
|
||||
// the provided object. This is useful for knowing the locations of the pieces.
|
||||
func (endpoint *Endpoint) GetObjectIPs(ctx context.Context, req *pb.ObjectGetIPsRequest) (resp *pb.ObjectGetIPsResponse, err error) {
|
||||
@ -1643,18 +1632,6 @@ func (endpoint *Endpoint) makeInlineSegment(ctx context.Context, req *pb.Segment
|
||||
return nil, &pb.SegmentMakeInlineResponse{}, nil
|
||||
}
|
||||
|
||||
// BeginDeleteSegment begins segment deletion process.
|
||||
func (endpoint *Endpoint) BeginDeleteSegment(ctx context.Context, req *pb.SegmentBeginDeleteRequest) (resp *pb.SegmentBeginDeleteResponse, err error) {
|
||||
// all logic for deleting is now in BeginDeleteObject
|
||||
return nil, rpcstatus.Error(rpcstatus.Unimplemented, "not implemented")
|
||||
}
|
||||
|
||||
// FinishDeleteSegment finishes segment deletion process.
|
||||
func (endpoint *Endpoint) FinishDeleteSegment(ctx context.Context, req *pb.SegmentFinishDeleteRequest) (resp *pb.SegmentFinishDeleteResponse, err error) {
|
||||
// all logic for deleting is now in BeginDeleteObject
|
||||
return nil, rpcstatus.Error(rpcstatus.Unimplemented, "not implemented")
|
||||
}
|
||||
|
||||
// ListSegments list object segments.
|
||||
func (endpoint *Endpoint) ListSegments(ctx context.Context, req *pb.SegmentListRequest) (resp *pb.SegmentListResponse, err error) {
|
||||
defer mon.Task()(&ctx)(&err)
|
||||
@ -1729,12 +1706,6 @@ func (endpoint *Endpoint) ListSegments(ctx context.Context, req *pb.SegmentListR
|
||||
}, nil
|
||||
}
|
||||
|
||||
// DownloadObject returns all the information necessary to begin downloading an object in a single request.
|
||||
func (endpoint *Endpoint) DownloadObject(ctx context.Context, req *pb.ObjectDownloadRequest) (resp *pb.ObjectDownloadResponse, err error) {
|
||||
defer mon.Task()(&ctx)(&err)
|
||||
return nil, rpcstatus.Error(rpcstatus.Unimplemented, "Not Implemented")
|
||||
}
|
||||
|
||||
// DownloadSegment returns data necessary to download segment.
|
||||
func (endpoint *Endpoint) DownloadSegment(ctx context.Context, req *pb.SegmentDownloadRequest) (resp *pb.SegmentDownloadResponse, err error) {
|
||||
defer mon.Task()(&ctx)(&err)
|
||||
|
@ -25,6 +25,8 @@ var (
|
||||
//
|
||||
// architecture: Endpoint
|
||||
type Endpoint struct {
|
||||
pb.DRPCNodeStatsUnimplementedServer
|
||||
|
||||
log *zap.Logger
|
||||
overlay overlay.DB
|
||||
accounting accounting.StoragenodeAccounting
|
||||
|
@ -146,6 +146,7 @@ func SortStoragenodeBandwidthRollups(rollups []StoragenodeBandwidthRollup) {
|
||||
//
|
||||
// architecture: Endpoint
|
||||
type Endpoint struct {
|
||||
pb.DRPCOrdersUnimplementedServer
|
||||
log *zap.Logger
|
||||
satelliteSignee signing.Signee
|
||||
DB DB
|
||||
|
@ -6,8 +6,6 @@ package overlay
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/zeebo/errs"
|
||||
|
||||
"storj.io/storj/satellite/internalpb"
|
||||
)
|
||||
|
||||
@ -15,6 +13,7 @@ import (
|
||||
//
|
||||
// architecture: Endpoint
|
||||
type Inspector struct {
|
||||
internalpb.DRPCOverlayInspectorUnimplementedServer
|
||||
service *Service
|
||||
}
|
||||
|
||||
@ -35,9 +34,3 @@ func (srv *Inspector) CountNodes(ctx context.Context, req *internalpb.CountNodes
|
||||
Count: int64(len(overlayKeys)),
|
||||
}, nil
|
||||
}
|
||||
|
||||
// DumpNodes returns all of the nodes in the overlay.
|
||||
func (srv *Inspector) DumpNodes(ctx context.Context, req *internalpb.DumpNodesRequest) (_ *internalpb.DumpNodesResponse, err error) {
|
||||
defer mon.Task()(&ctx)(&err)
|
||||
return &internalpb.DumpNodesResponse{}, errs.New("Not Implemented")
|
||||
}
|
||||
|
@ -19,6 +19,8 @@ var (
|
||||
//
|
||||
// architecture: Endpoint
|
||||
type Inspector struct {
|
||||
internalpb.DRPCIrreparableInspectorUnimplementedServer
|
||||
|
||||
irrdb DB
|
||||
}
|
||||
|
||||
|
@ -25,6 +25,8 @@ var (
|
||||
//
|
||||
// architecture: Endpoint
|
||||
type Endpoint struct {
|
||||
pb.DRPCHeldAmountUnimplementedServer
|
||||
|
||||
service *Service
|
||||
log *zap.Logger
|
||||
overlay overlay.DB
|
||||
|
@ -20,6 +20,7 @@ import (
|
||||
//
|
||||
// architecture: Endpoint
|
||||
type Endpoint struct {
|
||||
pb.DRPCContactUnimplementedServer
|
||||
log *zap.Logger
|
||||
pingStats *PingStats
|
||||
}
|
||||
|
@ -21,6 +21,8 @@ import (
|
||||
|
||||
// Endpoint implements private inspector for Graceful Exit.
|
||||
type Endpoint struct {
|
||||
internalpb.DRPCNodeGracefulExitUnimplementedServer
|
||||
|
||||
log *zap.Logger
|
||||
usageCache *pieces.BlobsUsageCache
|
||||
trust *trust.Pool
|
||||
|
@ -31,6 +31,8 @@ var (
|
||||
//
|
||||
// architecture: Endpoint
|
||||
type Endpoint struct {
|
||||
internalpb.DRPCPieceStoreInspectorUnimplementedServer
|
||||
|
||||
log *zap.Logger
|
||||
pieceStore *pieces.Store
|
||||
contact *contact.Service
|
||||
|
@ -21,6 +21,8 @@ var _ multinodepb.DRPCBandwidthServer = (*BandwidthEndpoint)(nil)
|
||||
//
|
||||
// architecture: Endpoint
|
||||
type BandwidthEndpoint struct {
|
||||
multinodepb.DRPCBandwidthUnimplementedServer
|
||||
|
||||
log *zap.Logger
|
||||
apiKeys *apikeys.Service
|
||||
db bandwidth.DB
|
||||
|
@ -23,6 +23,8 @@ var _ multinodepb.DRPCNodeServer = (*NodeEndpoint)(nil)
|
||||
//
|
||||
// architecture: Endpoint
|
||||
type NodeEndpoint struct {
|
||||
multinodepb.DRPCNodeUnimplementedServer
|
||||
|
||||
log *zap.Logger
|
||||
apiKeys *apikeys.Service
|
||||
version version.Info
|
||||
|
@ -20,6 +20,8 @@ var _ multinodepb.DRPCPayoutServer = (*PayoutEndpoint)(nil)
|
||||
//
|
||||
// architecture: Endpoint
|
||||
type PayoutEndpoint struct {
|
||||
multinodepb.DRPCPayoutUnimplementedServer
|
||||
|
||||
log *zap.Logger
|
||||
apiKeys *apikeys.Service
|
||||
db payouts.DB
|
||||
|
@ -20,6 +20,8 @@ var _ multinodepb.DRPCStorageServer = (*StorageEndpoint)(nil)
|
||||
//
|
||||
// architecture: Endpoint
|
||||
type StorageEndpoint struct {
|
||||
multinodepb.DRPCStorageUnimplementedServer
|
||||
|
||||
log *zap.Logger
|
||||
apiKeys *apikeys.Service
|
||||
monitor *monitor.Service
|
||||
|
@ -78,6 +78,8 @@ type pingStatsSource interface {
|
||||
//
|
||||
// architecture: Endpoint
|
||||
type Endpoint struct {
|
||||
pb.DRPCContactUnimplementedServer
|
||||
|
||||
log *zap.Logger
|
||||
config Config
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user