[#401] control: Serve DropObjects RPC

Re-compile protobuf definition of Control service. Implement required
messages on DropObjects RPC request and response messages. Implement
`DropObjects` method on Control service server of the node. Use
`StorageEngine.Delete` method as a deleted object handler on server.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2021-02-21 11:30:32 +03:00 committed by Alex Vanin
parent f2337baedc
commit aa24702ebe
6 changed files with 624 additions and 79 deletions

View file

@ -5,7 +5,9 @@ import (
"encoding/hex" "encoding/hex"
"net" "net"
"github.com/nspcc-dev/neofs-api-go/pkg/object"
crypto "github.com/nspcc-dev/neofs-crypto" crypto "github.com/nspcc-dev/neofs-crypto"
"github.com/nspcc-dev/neofs-node/pkg/local_object_storage/engine"
"github.com/nspcc-dev/neofs-node/pkg/services/control" "github.com/nspcc-dev/neofs-node/pkg/services/control"
controlSvc "github.com/nspcc-dev/neofs-node/pkg/services/control/server" controlSvc "github.com/nspcc-dev/neofs-node/pkg/services/control/server"
"github.com/pkg/errors" "github.com/pkg/errors"
@ -44,6 +46,13 @@ func initControlService(c *cfg) {
controlSvc.WithHealthChecker(c), controlSvc.WithHealthChecker(c),
controlSvc.WithNetMapSource(c.cfgNetmap.wrapper), controlSvc.WithNetMapSource(c.cfgNetmap.wrapper),
controlSvc.WithNodeState(c), controlSvc.WithNodeState(c),
controlSvc.WithDeletedObjectHandler(func(addrList []*object.Address) error {
prm := new(engine.DeletePrm).WithAddresses(addrList...)
_, err := c.cfgObject.cfgLocalStorage.localStorage.Delete(prm)
return err
}),
) )
var ( var (

View file

@ -0,0 +1,61 @@
package control
import (
"context"
"fmt"
"github.com/nspcc-dev/neofs-api-go/pkg/object"
"github.com/nspcc-dev/neofs-node/pkg/services/control"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
)
// DeletedObjectHandler is a handler of objects to be removed.
type DeletedObjectHandler func([]*object.Address) error
// DropObjects marks objects to be removed from the local node.
//
// Objects are marked via garbage collector's callback.
//
// If some address is not a valid object address in a binary format, an error returns.
// If request is unsigned or signed by disallowed key, permission error returns.
func (s *Server) DropObjects(_ context.Context, req *control.DropObjectsRequest) (*control.DropObjectsResponse, error) {
// verify request
if err := s.isValidRequest(req); err != nil {
return nil, status.Error(codes.PermissionDenied, err.Error())
}
binAddrList := req.GetBody().GetAddressList()
addrList := make([]*object.Address, 0, len(binAddrList))
for i := range binAddrList {
a := object.NewAddress()
err := a.Unmarshal(binAddrList[i])
if err != nil {
return nil, status.Error(codes.InvalidArgument,
fmt.Sprintf("invalid binary object address: %v", err),
)
}
addrList = append(addrList, a)
}
err := s.delObjHandler(addrList)
if err != nil {
return nil, status.Error(codes.Internal, err.Error())
}
// create and fill response
resp := new(control.DropObjectsResponse)
body := new(control.DropObjectsResponse_Body)
resp.SetBody(body)
// sign the response
if err := SignMessage(s.key, resp); err != nil {
return nil, status.Error(codes.Internal, err.Error())
}
return resp, nil
}

View file

@ -47,6 +47,8 @@ type cfg struct {
netMapSrc netmap.Source netMapSrc netmap.Source
nodeState NodeState nodeState NodeState
delObjHandler DeletedObjectHandler
} }
func defaultCfg() *cfg { func defaultCfg() *cfg {
@ -103,3 +105,11 @@ func WithNodeState(state NodeState) Option {
c.nodeState = state c.nodeState = state
} }
} }
// WithDeletedObjectHandler returns option to function
// which is called on the objects being deleted.
func WithDeletedObjectHandler(h DeletedObjectHandler) Option {
return func(c *cfg) {
c.delObjHandler = h
}
}

View file

@ -453,3 +453,144 @@ func (x *SetNetmapStatusResponse) ReadSignedData(buf []byte) ([]byte, error) {
func (x *SetNetmapStatusResponse) SignedDataSize() int { func (x *SetNetmapStatusResponse) SignedDataSize() int {
return x.GetBody().StableSize() return x.GetBody().StableSize()
} }
// SetAddressList sets list of objects to be removed in NeoFS API binary format.
func (x *DropObjectsRequest_Body) SetAddressList(v [][]byte) {
if x != nil {
x.AddressList = v
}
}
const (
_ = iota
addrListReqBodyStatusFNum
)
// StableMarshal reads binary representation of "Drop objects" request body
// in protobuf binary format.
//
// If buffer length is less than x.StableSize(), new buffer is allocated.
//
// Returns any error encountered which did not allow writing the data completely.
// Otherwise, returns the buffer in which the data is written.
//
// Structures with the same field values have the same binary format.
func (x *DropObjectsRequest_Body) StableMarshal(buf []byte) ([]byte, error) {
if x == nil {
return []byte{}, nil
}
if sz := x.StableSize(); len(buf) < sz {
buf = make([]byte, sz)
}
_, err := proto.RepeatedBytesMarshal(addrListReqBodyStatusFNum, buf, x.AddressList)
if err != nil {
return nil, err
}
return buf, nil
}
// StableSize returns binary size of "Drop objects" response body
// in protobuf binary format.
//
// Structures with the same field values have the same binary size.
func (x *DropObjectsRequest_Body) StableSize() int {
if x == nil {
return 0
}
size := 0
size += proto.RepeatedBytesSize(addrListReqBodyStatusFNum, x.AddressList)
return size
}
// SetBody sets body of the set "Drop objects" request.
func (x *DropObjectsRequest) SetBody(v *DropObjectsRequest_Body) {
if x != nil {
x.Body = v
}
}
// SetSignature sets signature of the "Drop objects" request body.
func (x *DropObjectsRequest) SetSignature(body *Signature) {
if x != nil {
x.Signature = body
}
}
// ReadSignedData reads signed data of "Drop objects" request to buf.
//
// If buffer length is less than x.SignedDataSize(), new buffer is allocated.
//
// Returns any error encountered which did not allow writing the data completely.
// Otherwise, returns the buffer in which the data is written.
//
// Structures with the same field values have the same signed data.
func (x *DropObjectsRequest) ReadSignedData(buf []byte) ([]byte, error) {
return x.GetBody().StableMarshal(buf)
}
// SignedDataSize returns binary size of the signed data of "Drop objects" request.
//
// Structures with the same field values have the same signed data size.
func (x *DropObjectsRequest) SignedDataSize() int {
return x.GetBody().StableSize()
}
// StableMarshal reads binary representation of "Drop objects" response body
// in protobuf binary format.
//
// If buffer length is less than x.StableSize(), new buffer is allocated.
//
// Returns any error encountered which did not allow writing the data completely.
// Otherwise, returns the buffer in which the data is written.
//
// Structures with the same field values have the same binary format.
func (x *DropObjectsResponse_Body) StableMarshal(buf []byte) ([]byte, error) {
return buf, nil
}
// StableSize returns binary size of "Drop objects" response body
// in protobuf binary format.
//
// Structures with the same field values have the same binary size.
func (x *DropObjectsResponse_Body) StableSize() int {
return 0
}
// SetBody sets set body of the "Drop objects" response.
func (x *DropObjectsResponse) SetBody(v *DropObjectsResponse_Body) {
if x != nil {
x.Body = v
}
}
// SetSignature sets signature of the "Drop objects" response body.
func (x *DropObjectsResponse) SetSignature(v *Signature) {
if x != nil {
x.Signature = v
}
}
// ReadSignedData reads signed data of "Drop objects" response to buf.
//
// If buffer length is less than x.SignedDataSize(), new buffer is allocated.
//
// Returns any error encountered which did not allow writing the data completely.
// Otherwise, returns the buffer in which the data is written.
//
// Structures with the same field values have the same signed data.
func (x *DropObjectsResponse) ReadSignedData(buf []byte) ([]byte, error) {
return x.GetBody().StableMarshal(buf)
}
// SignedDataSize returns binary size of the signed data of "Drop objects" response.
//
// Structures with the same field values have the same signed data size.
func (x *DropObjectsResponse) SignedDataSize() int {
return x.GetBody().StableSize()
}

View file

@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT. // Code generated by protoc-gen-go. DO NOT EDIT.
// versions: // versions:
// protoc-gen-go v1.23.0 // protoc-gen-go v1.25.0
// protoc v3.14.0 // protoc v3.14.0
// source: pkg/services/control/service.proto // source: pkg/services/control/service.proto
@ -377,6 +377,122 @@ func (x *SetNetmapStatusResponse) GetSignature() *Signature {
return nil return nil
} }
// Request to drop the objects.
type DropObjectsRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Body of the request message.
Body *DropObjectsRequest_Body `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"`
// Body signature.
Signature *Signature `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"`
}
func (x *DropObjectsRequest) Reset() {
*x = DropObjectsRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_pkg_services_control_service_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *DropObjectsRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DropObjectsRequest) ProtoMessage() {}
func (x *DropObjectsRequest) ProtoReflect() protoreflect.Message {
mi := &file_pkg_services_control_service_proto_msgTypes[6]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use DropObjectsRequest.ProtoReflect.Descriptor instead.
func (*DropObjectsRequest) Descriptor() ([]byte, []int) {
return file_pkg_services_control_service_proto_rawDescGZIP(), []int{6}
}
func (x *DropObjectsRequest) GetBody() *DropObjectsRequest_Body {
if x != nil {
return x.Body
}
return nil
}
func (x *DropObjectsRequest) GetSignature() *Signature {
if x != nil {
return x.Signature
}
return nil
}
// Response to request to drop the objects.
type DropObjectsResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Body of the response message.
Body *DropObjectsResponse_Body `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"`
// Body signature.
Signature *Signature `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"`
}
func (x *DropObjectsResponse) Reset() {
*x = DropObjectsResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_pkg_services_control_service_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *DropObjectsResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DropObjectsResponse) ProtoMessage() {}
func (x *DropObjectsResponse) ProtoReflect() protoreflect.Message {
mi := &file_pkg_services_control_service_proto_msgTypes[7]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use DropObjectsResponse.ProtoReflect.Descriptor instead.
func (*DropObjectsResponse) Descriptor() ([]byte, []int) {
return file_pkg_services_control_service_proto_rawDescGZIP(), []int{7}
}
func (x *DropObjectsResponse) GetBody() *DropObjectsResponse_Body {
if x != nil {
return x.Body
}
return nil
}
func (x *DropObjectsResponse) GetSignature() *Signature {
if x != nil {
return x.Signature
}
return nil
}
// Health check request body. // Health check request body.
type HealthCheckRequest_Body struct { type HealthCheckRequest_Body struct {
state protoimpl.MessageState state protoimpl.MessageState
@ -387,7 +503,7 @@ type HealthCheckRequest_Body struct {
func (x *HealthCheckRequest_Body) Reset() { func (x *HealthCheckRequest_Body) Reset() {
*x = HealthCheckRequest_Body{} *x = HealthCheckRequest_Body{}
if protoimpl.UnsafeEnabled { if protoimpl.UnsafeEnabled {
mi := &file_pkg_services_control_service_proto_msgTypes[6] mi := &file_pkg_services_control_service_proto_msgTypes[8]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
@ -400,7 +516,7 @@ func (x *HealthCheckRequest_Body) String() string {
func (*HealthCheckRequest_Body) ProtoMessage() {} func (*HealthCheckRequest_Body) ProtoMessage() {}
func (x *HealthCheckRequest_Body) ProtoReflect() protoreflect.Message { func (x *HealthCheckRequest_Body) ProtoReflect() protoreflect.Message {
mi := &file_pkg_services_control_service_proto_msgTypes[6] mi := &file_pkg_services_control_service_proto_msgTypes[8]
if protoimpl.UnsafeEnabled && x != nil { if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
@ -431,7 +547,7 @@ type HealthCheckResponse_Body struct {
func (x *HealthCheckResponse_Body) Reset() { func (x *HealthCheckResponse_Body) Reset() {
*x = HealthCheckResponse_Body{} *x = HealthCheckResponse_Body{}
if protoimpl.UnsafeEnabled { if protoimpl.UnsafeEnabled {
mi := &file_pkg_services_control_service_proto_msgTypes[7] mi := &file_pkg_services_control_service_proto_msgTypes[9]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
@ -444,7 +560,7 @@ func (x *HealthCheckResponse_Body) String() string {
func (*HealthCheckResponse_Body) ProtoMessage() {} func (*HealthCheckResponse_Body) ProtoMessage() {}
func (x *HealthCheckResponse_Body) ProtoReflect() protoreflect.Message { func (x *HealthCheckResponse_Body) ProtoReflect() protoreflect.Message {
mi := &file_pkg_services_control_service_proto_msgTypes[7] mi := &file_pkg_services_control_service_proto_msgTypes[9]
if protoimpl.UnsafeEnabled && x != nil { if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
@ -484,7 +600,7 @@ type NetmapSnapshotRequest_Body struct {
func (x *NetmapSnapshotRequest_Body) Reset() { func (x *NetmapSnapshotRequest_Body) Reset() {
*x = NetmapSnapshotRequest_Body{} *x = NetmapSnapshotRequest_Body{}
if protoimpl.UnsafeEnabled { if protoimpl.UnsafeEnabled {
mi := &file_pkg_services_control_service_proto_msgTypes[8] mi := &file_pkg_services_control_service_proto_msgTypes[10]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
@ -497,7 +613,7 @@ func (x *NetmapSnapshotRequest_Body) String() string {
func (*NetmapSnapshotRequest_Body) ProtoMessage() {} func (*NetmapSnapshotRequest_Body) ProtoMessage() {}
func (x *NetmapSnapshotRequest_Body) ProtoReflect() protoreflect.Message { func (x *NetmapSnapshotRequest_Body) ProtoReflect() protoreflect.Message {
mi := &file_pkg_services_control_service_proto_msgTypes[8] mi := &file_pkg_services_control_service_proto_msgTypes[10]
if protoimpl.UnsafeEnabled && x != nil { if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
@ -526,7 +642,7 @@ type NetmapSnapshotResponse_Body struct {
func (x *NetmapSnapshotResponse_Body) Reset() { func (x *NetmapSnapshotResponse_Body) Reset() {
*x = NetmapSnapshotResponse_Body{} *x = NetmapSnapshotResponse_Body{}
if protoimpl.UnsafeEnabled { if protoimpl.UnsafeEnabled {
mi := &file_pkg_services_control_service_proto_msgTypes[9] mi := &file_pkg_services_control_service_proto_msgTypes[11]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
@ -539,7 +655,7 @@ func (x *NetmapSnapshotResponse_Body) String() string {
func (*NetmapSnapshotResponse_Body) ProtoMessage() {} func (*NetmapSnapshotResponse_Body) ProtoMessage() {}
func (x *NetmapSnapshotResponse_Body) ProtoReflect() protoreflect.Message { func (x *NetmapSnapshotResponse_Body) ProtoReflect() protoreflect.Message {
mi := &file_pkg_services_control_service_proto_msgTypes[9] mi := &file_pkg_services_control_service_proto_msgTypes[11]
if protoimpl.UnsafeEnabled && x != nil { if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
@ -575,7 +691,7 @@ type SetNetmapStatusRequest_Body struct {
func (x *SetNetmapStatusRequest_Body) Reset() { func (x *SetNetmapStatusRequest_Body) Reset() {
*x = SetNetmapStatusRequest_Body{} *x = SetNetmapStatusRequest_Body{}
if protoimpl.UnsafeEnabled { if protoimpl.UnsafeEnabled {
mi := &file_pkg_services_control_service_proto_msgTypes[10] mi := &file_pkg_services_control_service_proto_msgTypes[12]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
@ -588,7 +704,7 @@ func (x *SetNetmapStatusRequest_Body) String() string {
func (*SetNetmapStatusRequest_Body) ProtoMessage() {} func (*SetNetmapStatusRequest_Body) ProtoMessage() {}
func (x *SetNetmapStatusRequest_Body) ProtoReflect() protoreflect.Message { func (x *SetNetmapStatusRequest_Body) ProtoReflect() protoreflect.Message {
mi := &file_pkg_services_control_service_proto_msgTypes[10] mi := &file_pkg_services_control_service_proto_msgTypes[12]
if protoimpl.UnsafeEnabled && x != nil { if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
@ -621,7 +737,7 @@ type SetNetmapStatusResponse_Body struct {
func (x *SetNetmapStatusResponse_Body) Reset() { func (x *SetNetmapStatusResponse_Body) Reset() {
*x = SetNetmapStatusResponse_Body{} *x = SetNetmapStatusResponse_Body{}
if protoimpl.UnsafeEnabled { if protoimpl.UnsafeEnabled {
mi := &file_pkg_services_control_service_proto_msgTypes[11] mi := &file_pkg_services_control_service_proto_msgTypes[13]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
@ -634,7 +750,7 @@ func (x *SetNetmapStatusResponse_Body) String() string {
func (*SetNetmapStatusResponse_Body) ProtoMessage() {} func (*SetNetmapStatusResponse_Body) ProtoMessage() {}
func (x *SetNetmapStatusResponse_Body) ProtoReflect() protoreflect.Message { func (x *SetNetmapStatusResponse_Body) ProtoReflect() protoreflect.Message {
mi := &file_pkg_services_control_service_proto_msgTypes[11] mi := &file_pkg_services_control_service_proto_msgTypes[13]
if protoimpl.UnsafeEnabled && x != nil { if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
@ -650,6 +766,95 @@ func (*SetNetmapStatusResponse_Body) Descriptor() ([]byte, []int) {
return file_pkg_services_control_service_proto_rawDescGZIP(), []int{5, 0} return file_pkg_services_control_service_proto_rawDescGZIP(), []int{5, 0}
} }
// Request body structure.
type DropObjectsRequest_Body struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// List of object addresses to be removed.
// in NeoFS API binary format.
AddressList [][]byte `protobuf:"bytes,1,rep,name=address_list,json=addressList,proto3" json:"address_list,omitempty"`
}
func (x *DropObjectsRequest_Body) Reset() {
*x = DropObjectsRequest_Body{}
if protoimpl.UnsafeEnabled {
mi := &file_pkg_services_control_service_proto_msgTypes[14]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *DropObjectsRequest_Body) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DropObjectsRequest_Body) ProtoMessage() {}
func (x *DropObjectsRequest_Body) ProtoReflect() protoreflect.Message {
mi := &file_pkg_services_control_service_proto_msgTypes[14]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use DropObjectsRequest_Body.ProtoReflect.Descriptor instead.
func (*DropObjectsRequest_Body) Descriptor() ([]byte, []int) {
return file_pkg_services_control_service_proto_rawDescGZIP(), []int{6, 0}
}
func (x *DropObjectsRequest_Body) GetAddressList() [][]byte {
if x != nil {
return x.AddressList
}
return nil
}
// Response body structure.
type DropObjectsResponse_Body struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *DropObjectsResponse_Body) Reset() {
*x = DropObjectsResponse_Body{}
if protoimpl.UnsafeEnabled {
mi := &file_pkg_services_control_service_proto_msgTypes[15]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *DropObjectsResponse_Body) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DropObjectsResponse_Body) ProtoMessage() {}
func (x *DropObjectsResponse_Body) ProtoReflect() protoreflect.Message {
mi := &file_pkg_services_control_service_proto_msgTypes[15]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use DropObjectsResponse_Body.ProtoReflect.Descriptor instead.
func (*DropObjectsResponse_Body) Descriptor() ([]byte, []int) {
return file_pkg_services_control_service_proto_rawDescGZIP(), []int{7, 0}
}
var File_pkg_services_control_service_proto protoreflect.FileDescriptor var File_pkg_services_control_service_proto protoreflect.FileDescriptor
var file_pkg_services_control_service_proto_rawDesc = []byte{ var file_pkg_services_control_service_proto_rawDesc = []byte{
@ -723,28 +928,51 @@ var file_pkg_services_control_service_proto_rawDesc = []byte{
0x79, 0x12, 0x30, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x79, 0x12, 0x30, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x53, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x53,
0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74,
0x75, 0x72, 0x65, 0x1a, 0x06, 0x0a, 0x04, 0x42, 0x6f, 0x64, 0x79, 0x32, 0x83, 0x02, 0x0a, 0x0e, 0x75, 0x72, 0x65, 0x1a, 0x06, 0x0a, 0x04, 0x42, 0x6f, 0x64, 0x79, 0x22, 0xa7, 0x01, 0x0a, 0x12,
0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x48, 0x44, 0x72, 0x6f, 0x70, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65,
0x0a, 0x0b, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x1b, 0x2e, 0x73, 0x74, 0x12, 0x34, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x20, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x44, 0x72, 0x6f, 0x70, 0x4f,
0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x42, 0x6f,
0x64, 0x79, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, 0x30, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e,
0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x63, 0x6f,
0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52,
0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x1a, 0x29, 0x0a, 0x04, 0x42, 0x6f,
0x64, 0x79, 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x6c, 0x69,
0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x0b, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73,
0x73, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x86, 0x01, 0x0a, 0x13, 0x44, 0x72, 0x6f, 0x70, 0x4f, 0x62,
0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a,
0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x63, 0x6f,
0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x44, 0x72, 0x6f, 0x70, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74,
0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x42, 0x6f, 0x64, 0x79, 0x52, 0x04,
0x62, 0x6f, 0x64, 0x79, 0x12, 0x30, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72,
0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f,
0x6c, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x09, 0x73, 0x69, 0x67,
0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x1a, 0x06, 0x0a, 0x04, 0x42, 0x6f, 0x64, 0x79, 0x32, 0xcd,
0x02, 0x0a, 0x0e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63,
0x65, 0x12, 0x48, 0x0a, 0x0b, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b,
0x12, 0x1b, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74,
0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e,
0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68,
0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x63, 0x6f, 0x6e, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x51, 0x0a, 0x0e, 0x4e,
0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x65, 0x74, 0x6d, 0x61, 0x70, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x12, 0x1e, 0x2e,
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x51, 0x0a, 0x0e, 0x4e, 0x65, 0x74, 0x6d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x4e, 0x65, 0x74, 0x6d, 0x61, 0x70, 0x53, 0x6e,
0x61, 0x70, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x12, 0x1e, 0x2e, 0x63, 0x6f, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e,
0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x4e, 0x65, 0x74, 0x6d, 0x61, 0x70, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x4e, 0x65, 0x74, 0x6d, 0x61, 0x70, 0x53, 0x6e,
0x68, 0x6f, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x63, 0x6f, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x54,
0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x4e, 0x65, 0x74, 0x6d, 0x61, 0x70, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x0a, 0x0f, 0x53, 0x65, 0x74, 0x4e, 0x65, 0x74, 0x6d, 0x61, 0x70, 0x53, 0x74, 0x61, 0x74, 0x75,
0x68, 0x6f, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x54, 0x0a, 0x0f, 0x53, 0x73, 0x12, 0x1f, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x53, 0x65, 0x74, 0x4e,
0x65, 0x74, 0x4e, 0x65, 0x74, 0x6d, 0x61, 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1f, 0x65, 0x74, 0x6d, 0x61, 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65,
0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x53, 0x65, 0x74, 0x4e, 0x65, 0x74, 0x6d, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x53, 0x65, 0x74,
0x61, 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x4e, 0x65, 0x74, 0x6d, 0x61, 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70,
0x20, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x53, 0x65, 0x74, 0x4e, 0x65, 0x74, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x48, 0x0a, 0x0b, 0x44, 0x72, 0x6f, 0x70, 0x4f, 0x62, 0x6a, 0x65,
0x6d, 0x61, 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x63, 0x74, 0x73, 0x12, 0x1b, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x44, 0x72,
0x65, 0x42, 0x36, 0x5a, 0x34, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x70, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x6e, 0x73, 0x70, 0x63, 0x63, 0x2d, 0x64, 0x65, 0x76, 0x2f, 0x6e, 0x65, 0x6f, 0x66, 0x73, 0x2d, 0x1a, 0x1c, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x44, 0x72, 0x6f, 0x70, 0x4f,
0x6e, 0x6f, 0x64, 0x65, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x36,
0x73, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x5a, 0x34, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6e, 0x73, 0x70,
0x33, 0x63, 0x63, 0x2d, 0x64, 0x65, 0x76, 0x2f, 0x6e, 0x65, 0x6f, 0x66, 0x73, 0x2d, 0x6e, 0x6f, 0x64,
0x65, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2f, 0x63,
0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
} }
var ( var (
@ -759,7 +987,7 @@ func file_pkg_services_control_service_proto_rawDescGZIP() []byte {
return file_pkg_services_control_service_proto_rawDescData return file_pkg_services_control_service_proto_rawDescData
} }
var file_pkg_services_control_service_proto_msgTypes = make([]protoimpl.MessageInfo, 12) var file_pkg_services_control_service_proto_msgTypes = make([]protoimpl.MessageInfo, 16)
var file_pkg_services_control_service_proto_goTypes = []interface{}{ var file_pkg_services_control_service_proto_goTypes = []interface{}{
(*HealthCheckRequest)(nil), // 0: control.HealthCheckRequest (*HealthCheckRequest)(nil), // 0: control.HealthCheckRequest
(*HealthCheckResponse)(nil), // 1: control.HealthCheckResponse (*HealthCheckResponse)(nil), // 1: control.HealthCheckResponse
@ -767,45 +995,55 @@ var file_pkg_services_control_service_proto_goTypes = []interface{}{
(*NetmapSnapshotResponse)(nil), // 3: control.NetmapSnapshotResponse (*NetmapSnapshotResponse)(nil), // 3: control.NetmapSnapshotResponse
(*SetNetmapStatusRequest)(nil), // 4: control.SetNetmapStatusRequest (*SetNetmapStatusRequest)(nil), // 4: control.SetNetmapStatusRequest
(*SetNetmapStatusResponse)(nil), // 5: control.SetNetmapStatusResponse (*SetNetmapStatusResponse)(nil), // 5: control.SetNetmapStatusResponse
(*HealthCheckRequest_Body)(nil), // 6: control.HealthCheckRequest.Body (*DropObjectsRequest)(nil), // 6: control.DropObjectsRequest
(*HealthCheckResponse_Body)(nil), // 7: control.HealthCheckResponse.Body (*DropObjectsResponse)(nil), // 7: control.DropObjectsResponse
(*NetmapSnapshotRequest_Body)(nil), // 8: control.NetmapSnapshotRequest.Body (*HealthCheckRequest_Body)(nil), // 8: control.HealthCheckRequest.Body
(*NetmapSnapshotResponse_Body)(nil), // 9: control.NetmapSnapshotResponse.Body (*HealthCheckResponse_Body)(nil), // 9: control.HealthCheckResponse.Body
(*SetNetmapStatusRequest_Body)(nil), // 10: control.SetNetmapStatusRequest.Body (*NetmapSnapshotRequest_Body)(nil), // 10: control.NetmapSnapshotRequest.Body
(*SetNetmapStatusResponse_Body)(nil), // 11: control.SetNetmapStatusResponse.Body (*NetmapSnapshotResponse_Body)(nil), // 11: control.NetmapSnapshotResponse.Body
(*Signature)(nil), // 12: control.Signature (*SetNetmapStatusRequest_Body)(nil), // 12: control.SetNetmapStatusRequest.Body
(NetmapStatus)(0), // 13: control.NetmapStatus (*SetNetmapStatusResponse_Body)(nil), // 13: control.SetNetmapStatusResponse.Body
(HealthStatus)(0), // 14: control.HealthStatus (*DropObjectsRequest_Body)(nil), // 14: control.DropObjectsRequest.Body
(*Netmap)(nil), // 15: control.Netmap (*DropObjectsResponse_Body)(nil), // 15: control.DropObjectsResponse.Body
(*Signature)(nil), // 16: control.Signature
(NetmapStatus)(0), // 17: control.NetmapStatus
(HealthStatus)(0), // 18: control.HealthStatus
(*Netmap)(nil), // 19: control.Netmap
} }
var file_pkg_services_control_service_proto_depIdxs = []int32{ var file_pkg_services_control_service_proto_depIdxs = []int32{
6, // 0: control.HealthCheckRequest.body:type_name -> control.HealthCheckRequest.Body 8, // 0: control.HealthCheckRequest.body:type_name -> control.HealthCheckRequest.Body
12, // 1: control.HealthCheckRequest.signature:type_name -> control.Signature 16, // 1: control.HealthCheckRequest.signature:type_name -> control.Signature
7, // 2: control.HealthCheckResponse.body:type_name -> control.HealthCheckResponse.Body 9, // 2: control.HealthCheckResponse.body:type_name -> control.HealthCheckResponse.Body
12, // 3: control.HealthCheckResponse.signature:type_name -> control.Signature 16, // 3: control.HealthCheckResponse.signature:type_name -> control.Signature
8, // 4: control.NetmapSnapshotRequest.body:type_name -> control.NetmapSnapshotRequest.Body 10, // 4: control.NetmapSnapshotRequest.body:type_name -> control.NetmapSnapshotRequest.Body
12, // 5: control.NetmapSnapshotRequest.signature:type_name -> control.Signature 16, // 5: control.NetmapSnapshotRequest.signature:type_name -> control.Signature
9, // 6: control.NetmapSnapshotResponse.body:type_name -> control.NetmapSnapshotResponse.Body 11, // 6: control.NetmapSnapshotResponse.body:type_name -> control.NetmapSnapshotResponse.Body
12, // 7: control.NetmapSnapshotResponse.signature:type_name -> control.Signature 16, // 7: control.NetmapSnapshotResponse.signature:type_name -> control.Signature
10, // 8: control.SetNetmapStatusRequest.body:type_name -> control.SetNetmapStatusRequest.Body 12, // 8: control.SetNetmapStatusRequest.body:type_name -> control.SetNetmapStatusRequest.Body
12, // 9: control.SetNetmapStatusRequest.signature:type_name -> control.Signature 16, // 9: control.SetNetmapStatusRequest.signature:type_name -> control.Signature
11, // 10: control.SetNetmapStatusResponse.body:type_name -> control.SetNetmapStatusResponse.Body 13, // 10: control.SetNetmapStatusResponse.body:type_name -> control.SetNetmapStatusResponse.Body
12, // 11: control.SetNetmapStatusResponse.signature:type_name -> control.Signature 16, // 11: control.SetNetmapStatusResponse.signature:type_name -> control.Signature
13, // 12: control.HealthCheckResponse.Body.netmap_status:type_name -> control.NetmapStatus 14, // 12: control.DropObjectsRequest.body:type_name -> control.DropObjectsRequest.Body
14, // 13: control.HealthCheckResponse.Body.health_status:type_name -> control.HealthStatus 16, // 13: control.DropObjectsRequest.signature:type_name -> control.Signature
15, // 14: control.NetmapSnapshotResponse.Body.netmap:type_name -> control.Netmap 15, // 14: control.DropObjectsResponse.body:type_name -> control.DropObjectsResponse.Body
13, // 15: control.SetNetmapStatusRequest.Body.status:type_name -> control.NetmapStatus 16, // 15: control.DropObjectsResponse.signature:type_name -> control.Signature
0, // 16: control.ControlService.HealthCheck:input_type -> control.HealthCheckRequest 17, // 16: control.HealthCheckResponse.Body.netmap_status:type_name -> control.NetmapStatus
2, // 17: control.ControlService.NetmapSnapshot:input_type -> control.NetmapSnapshotRequest 18, // 17: control.HealthCheckResponse.Body.health_status:type_name -> control.HealthStatus
4, // 18: control.ControlService.SetNetmapStatus:input_type -> control.SetNetmapStatusRequest 19, // 18: control.NetmapSnapshotResponse.Body.netmap:type_name -> control.Netmap
1, // 19: control.ControlService.HealthCheck:output_type -> control.HealthCheckResponse 17, // 19: control.SetNetmapStatusRequest.Body.status:type_name -> control.NetmapStatus
3, // 20: control.ControlService.NetmapSnapshot:output_type -> control.NetmapSnapshotResponse 0, // 20: control.ControlService.HealthCheck:input_type -> control.HealthCheckRequest
5, // 21: control.ControlService.SetNetmapStatus:output_type -> control.SetNetmapStatusResponse 2, // 21: control.ControlService.NetmapSnapshot:input_type -> control.NetmapSnapshotRequest
19, // [19:22] is the sub-list for method output_type 4, // 22: control.ControlService.SetNetmapStatus:input_type -> control.SetNetmapStatusRequest
16, // [16:19] is the sub-list for method input_type 6, // 23: control.ControlService.DropObjects:input_type -> control.DropObjectsRequest
16, // [16:16] is the sub-list for extension type_name 1, // 24: control.ControlService.HealthCheck:output_type -> control.HealthCheckResponse
16, // [16:16] is the sub-list for extension extendee 3, // 25: control.ControlService.NetmapSnapshot:output_type -> control.NetmapSnapshotResponse
0, // [0:16] is the sub-list for field type_name 5, // 26: control.ControlService.SetNetmapStatus:output_type -> control.SetNetmapStatusResponse
7, // 27: control.ControlService.DropObjects:output_type -> control.DropObjectsResponse
24, // [24:28] is the sub-list for method output_type
20, // [20:24] is the sub-list for method input_type
20, // [20:20] is the sub-list for extension type_name
20, // [20:20] is the sub-list for extension extendee
0, // [0:20] is the sub-list for field type_name
} }
func init() { file_pkg_services_control_service_proto_init() } func init() { file_pkg_services_control_service_proto_init() }
@ -888,7 +1126,7 @@ func file_pkg_services_control_service_proto_init() {
} }
} }
file_pkg_services_control_service_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { file_pkg_services_control_service_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*HealthCheckRequest_Body); i { switch v := v.(*DropObjectsRequest); i {
case 0: case 0:
return &v.state return &v.state
case 1: case 1:
@ -900,7 +1138,7 @@ func file_pkg_services_control_service_proto_init() {
} }
} }
file_pkg_services_control_service_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { file_pkg_services_control_service_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*HealthCheckResponse_Body); i { switch v := v.(*DropObjectsResponse); i {
case 0: case 0:
return &v.state return &v.state
case 1: case 1:
@ -912,7 +1150,7 @@ func file_pkg_services_control_service_proto_init() {
} }
} }
file_pkg_services_control_service_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { file_pkg_services_control_service_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*NetmapSnapshotRequest_Body); i { switch v := v.(*HealthCheckRequest_Body); i {
case 0: case 0:
return &v.state return &v.state
case 1: case 1:
@ -924,7 +1162,7 @@ func file_pkg_services_control_service_proto_init() {
} }
} }
file_pkg_services_control_service_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { file_pkg_services_control_service_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*NetmapSnapshotResponse_Body); i { switch v := v.(*HealthCheckResponse_Body); i {
case 0: case 0:
return &v.state return &v.state
case 1: case 1:
@ -936,7 +1174,7 @@ func file_pkg_services_control_service_proto_init() {
} }
} }
file_pkg_services_control_service_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { file_pkg_services_control_service_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SetNetmapStatusRequest_Body); i { switch v := v.(*NetmapSnapshotRequest_Body); i {
case 0: case 0:
return &v.state return &v.state
case 1: case 1:
@ -948,6 +1186,30 @@ func file_pkg_services_control_service_proto_init() {
} }
} }
file_pkg_services_control_service_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { file_pkg_services_control_service_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*NetmapSnapshotResponse_Body); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_pkg_services_control_service_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SetNetmapStatusRequest_Body); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_pkg_services_control_service_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SetNetmapStatusResponse_Body); i { switch v := v.(*SetNetmapStatusResponse_Body); i {
case 0: case 0:
return &v.state return &v.state
@ -959,6 +1221,30 @@ func file_pkg_services_control_service_proto_init() {
return nil return nil
} }
} }
file_pkg_services_control_service_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DropObjectsRequest_Body); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_pkg_services_control_service_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DropObjectsResponse_Body); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
} }
type x struct{} type x struct{}
out := protoimpl.TypeBuilder{ out := protoimpl.TypeBuilder{
@ -966,7 +1252,7 @@ func file_pkg_services_control_service_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(), GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_pkg_services_control_service_proto_rawDesc, RawDescriptor: file_pkg_services_control_service_proto_rawDesc,
NumEnums: 0, NumEnums: 0,
NumMessages: 12, NumMessages: 16,
NumExtensions: 0, NumExtensions: 0,
NumServices: 1, NumServices: 1,
}, },
@ -998,6 +1284,8 @@ type ControlServiceClient interface {
NetmapSnapshot(ctx context.Context, in *NetmapSnapshotRequest, opts ...grpc.CallOption) (*NetmapSnapshotResponse, error) NetmapSnapshot(ctx context.Context, in *NetmapSnapshotRequest, opts ...grpc.CallOption) (*NetmapSnapshotResponse, error)
// Sets status of the storage node in NeoFS network map. // Sets status of the storage node in NeoFS network map.
SetNetmapStatus(ctx context.Context, in *SetNetmapStatusRequest, opts ...grpc.CallOption) (*SetNetmapStatusResponse, error) SetNetmapStatus(ctx context.Context, in *SetNetmapStatusRequest, opts ...grpc.CallOption) (*SetNetmapStatusResponse, error)
// Mark objects to be removed from node's local object storage.
DropObjects(ctx context.Context, in *DropObjectsRequest, opts ...grpc.CallOption) (*DropObjectsResponse, error)
} }
type controlServiceClient struct { type controlServiceClient struct {
@ -1035,6 +1323,15 @@ func (c *controlServiceClient) SetNetmapStatus(ctx context.Context, in *SetNetma
return out, nil return out, nil
} }
func (c *controlServiceClient) DropObjects(ctx context.Context, in *DropObjectsRequest, opts ...grpc.CallOption) (*DropObjectsResponse, error) {
out := new(DropObjectsResponse)
err := c.cc.Invoke(ctx, "/control.ControlService/DropObjects", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// ControlServiceServer is the server API for ControlService service. // ControlServiceServer is the server API for ControlService service.
type ControlServiceServer interface { type ControlServiceServer interface {
// Performs health check of the storage node. // Performs health check of the storage node.
@ -1043,6 +1340,8 @@ type ControlServiceServer interface {
NetmapSnapshot(context.Context, *NetmapSnapshotRequest) (*NetmapSnapshotResponse, error) NetmapSnapshot(context.Context, *NetmapSnapshotRequest) (*NetmapSnapshotResponse, error)
// Sets status of the storage node in NeoFS network map. // Sets status of the storage node in NeoFS network map.
SetNetmapStatus(context.Context, *SetNetmapStatusRequest) (*SetNetmapStatusResponse, error) SetNetmapStatus(context.Context, *SetNetmapStatusRequest) (*SetNetmapStatusResponse, error)
// Mark objects to be removed from node's local object storage.
DropObjects(context.Context, *DropObjectsRequest) (*DropObjectsResponse, error)
} }
// UnimplementedControlServiceServer can be embedded to have forward compatible implementations. // UnimplementedControlServiceServer can be embedded to have forward compatible implementations.
@ -1058,6 +1357,9 @@ func (*UnimplementedControlServiceServer) NetmapSnapshot(context.Context, *Netma
func (*UnimplementedControlServiceServer) SetNetmapStatus(context.Context, *SetNetmapStatusRequest) (*SetNetmapStatusResponse, error) { func (*UnimplementedControlServiceServer) SetNetmapStatus(context.Context, *SetNetmapStatusRequest) (*SetNetmapStatusResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method SetNetmapStatus not implemented") return nil, status.Errorf(codes.Unimplemented, "method SetNetmapStatus not implemented")
} }
func (*UnimplementedControlServiceServer) DropObjects(context.Context, *DropObjectsRequest) (*DropObjectsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method DropObjects not implemented")
}
func RegisterControlServiceServer(s *grpc.Server, srv ControlServiceServer) { func RegisterControlServiceServer(s *grpc.Server, srv ControlServiceServer) {
s.RegisterService(&_ControlService_serviceDesc, srv) s.RegisterService(&_ControlService_serviceDesc, srv)
@ -1117,6 +1419,24 @@ func _ControlService_SetNetmapStatus_Handler(srv interface{}, ctx context.Contex
return interceptor(ctx, in, info, handler) return interceptor(ctx, in, info, handler)
} }
func _ControlService_DropObjects_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DropObjectsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ControlServiceServer).DropObjects(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/control.ControlService/DropObjects",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ControlServiceServer).DropObjects(ctx, req.(*DropObjectsRequest))
}
return interceptor(ctx, in, info, handler)
}
var _ControlService_serviceDesc = grpc.ServiceDesc{ var _ControlService_serviceDesc = grpc.ServiceDesc{
ServiceName: "control.ControlService", ServiceName: "control.ControlService",
HandlerType: (*ControlServiceServer)(nil), HandlerType: (*ControlServiceServer)(nil),
@ -1133,6 +1453,10 @@ var _ControlService_serviceDesc = grpc.ServiceDesc{
MethodName: "SetNetmapStatus", MethodName: "SetNetmapStatus",
Handler: _ControlService_SetNetmapStatus_Handler, Handler: _ControlService_SetNetmapStatus_Handler,
}, },
{
MethodName: "DropObjects",
Handler: _ControlService_DropObjects_Handler,
},
}, },
Streams: []grpc.StreamDesc{}, Streams: []grpc.StreamDesc{},
Metadata: "pkg/services/control/service.proto", Metadata: "pkg/services/control/service.proto",

View file

@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT. // Code generated by protoc-gen-go. DO NOT EDIT.
// versions: // versions:
// protoc-gen-go v1.23.0 // protoc-gen-go v1.25.0
// protoc v3.14.0 // protoc v3.14.0
// source: pkg/services/control/types.proto // source: pkg/services/control/types.proto