[#733] frostfs-cli: Add `control ir remove-container`
DCO action / DCO (pull_request) Successful in 3m51s Details
Vulncheck / Vulncheck (pull_request) Successful in 3m49s Details
Build / Build Components (1.21) (pull_request) Successful in 4m34s Details
Build / Build Components (1.20) (pull_request) Successful in 6m21s Details
Tests and linters / Tests (1.21) (pull_request) Successful in 9m1s Details
Tests and linters / Tests (1.20) (pull_request) Successful in 9m12s Details
Tests and linters / Staticcheck (pull_request) Successful in 6m40s Details
Tests and linters / Tests with -race (pull_request) Successful in 9m21s Details
Tests and linters / Lint (pull_request) Successful in 9m39s Details

Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
pull/742/head
Dmitrii Stepanov 2023-10-16 18:15:04 +03:00
parent f2437f7ae9
commit 189dbb01be
14 changed files with 806 additions and 110 deletions

View File

@ -12,8 +12,10 @@ func initControlIRCmd() {
irCmd.AddCommand(tickEpochCmd)
irCmd.AddCommand(removeNodeCmd)
irCmd.AddCommand(irHealthCheckCmd)
irCmd.AddCommand(removeContainerCmd)
initControlIRTickEpochCmd()
initControlIRRemoveNodeCmd()
initControlIRHealthCheckCmd()
initControlIRRemoveContainerCmd()
}

View File

@ -0,0 +1,94 @@
package control
import (
"errors"
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/refs"
rawclient "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/rpc/client"
"git.frostfs.info/TrueCloudLab/frostfs-node/cmd/frostfs-cli/internal/commonflags"
"git.frostfs.info/TrueCloudLab/frostfs-node/cmd/frostfs-cli/internal/key"
commonCmd "git.frostfs.info/TrueCloudLab/frostfs-node/cmd/internal/common"
ircontrol "git.frostfs.info/TrueCloudLab/frostfs-node/pkg/services/control/ir"
ircontrolsrv "git.frostfs.info/TrueCloudLab/frostfs-node/pkg/services/control/ir/server"
cid "git.frostfs.info/TrueCloudLab/frostfs-sdk-go/container/id"
"git.frostfs.info/TrueCloudLab/frostfs-sdk-go/user"
"github.com/spf13/cobra"
)
const (
ownerFlag = "owner"
)
var removeContainerCmd = &cobra.Command{
Use: "remove-container",
Short: "Schedules a container removal",
Long: `Schedules a container removal via a notary request.
Container data will be deleted asynchronously by policer.
To check removal status "frostfs-cli container list" command can be used.`,
Run: removeContainer,
}
func initControlIRRemoveContainerCmd() {
initControlFlags(removeContainerCmd)
flags := removeContainerCmd.Flags()
flags.String(commonflags.CIDFlag, "", commonflags.CIDFlagUsage)
flags.String(ownerFlag, "", "Container owner's wallet address.")
removeContainerCmd.MarkFlagsMutuallyExclusive(commonflags.CIDFlag, ownerFlag)
}
func removeContainer(cmd *cobra.Command, _ []string) {
req := prepareRemoveContainerRequest(cmd)
pk := key.Get(cmd)
c := getClient(cmd, pk)
commonCmd.ExitOnErr(cmd, "could not sign request: %w", ircontrolsrv.SignMessage(pk, req))
var resp *ircontrol.RemoveContainerResponse
err := c.ExecRaw(func(client *rawclient.Client) error {
var err error
resp, err = ircontrol.RemoveContainer(client, req)
return err
})
commonCmd.ExitOnErr(cmd, "failed to execute request: %w", err)
verifyResponse(cmd, resp.GetSignature(), resp.GetBody())
if len(req.GetBody().GetContainerId()) > 0 {
cmd.Println("Container scheduled to removal")
} else {
cmd.Println("User containers sheduled to removal")
}
}
func prepareRemoveContainerRequest(cmd *cobra.Command) *ircontrol.RemoveContainerRequest {
req := &ircontrol.RemoveContainerRequest{
Body: &ircontrol.RemoveContainerRequest_Body{},
}
cidStr, err := cmd.Flags().GetString(commonflags.CIDFlag)
commonCmd.ExitOnErr(cmd, "failed to get cid: ", err)
ownerStr, err := cmd.Flags().GetString(ownerFlag)
commonCmd.ExitOnErr(cmd, "failed to get owner: ", err)
if len(ownerStr) == 0 && len(cidStr) == 0 {
commonCmd.ExitOnErr(cmd, "invalid usage: %w", errors.New("neither owner's wallet address nor container ID are specified"))
}
if len(ownerStr) > 0 {
var owner user.ID
commonCmd.ExitOnErr(cmd, "invalid owner ID: %w", owner.DecodeString(ownerStr))
var ownerID refs.OwnerID
owner.WriteToV2(&ownerID)
req.Body.Owner = ownerID.StableMarshal(nil)
}
if len(cidStr) > 0 {
var containerID cid.ID
commonCmd.ExitOnErr(cmd, "invalid container ID: %w", containerID.DecodeString(cidStr))
req.Body.ContainerId = containerID[:]
}
return req
}

View File

@ -343,7 +343,7 @@ func (s *Server) initGRPCServer(cfg *viper.Viper) error {
p.SetPrivateKey(*s.key)
p.SetHealthChecker(s)
controlSvc := controlsrv.New(p, s.netmapClient,
controlSvc := controlsrv.New(p, s.netmapClient, s.containerClient,
controlsrv.WithAllowedKeys(authKeys),
)
@ -389,6 +389,7 @@ func (s *Server) initClientsFromMorph() (*serverMorphClients, error) {
if err != nil {
return nil, err
}
s.containerClient = result.CnrClient
s.netmapClient, err = nmClient.NewFromMorph(s.morphClient, s.contracts.netmap, fee, nmClient.TryNotary(), nmClient.AsAlphabet())
if err != nil {

View File

@ -16,6 +16,7 @@ import (
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/metrics"
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/morph/client"
balanceClient "git.frostfs.info/TrueCloudLab/frostfs-node/pkg/morph/client/balance"
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/morph/client/container"
nmClient "git.frostfs.info/TrueCloudLab/frostfs-node/pkg/morph/client/netmap"
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/morph/event"
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/morph/subscriber"
@ -46,16 +47,17 @@ type (
epochTimer *timer.BlockTimer
// global state
morphClient *client.Client
mainnetClient *client.Client
epochCounter atomic.Uint64
epochDuration atomic.Uint64
statusIndex *innerRingIndexer
precision precision.Fixed8Converter
healthStatus atomic.Int32
balanceClient *balanceClient.Client
netmapClient *nmClient.Client
persistate *state.PersistentStorage
morphClient *client.Client
mainnetClient *client.Client
epochCounter atomic.Uint64
epochDuration atomic.Uint64
statusIndex *innerRingIndexer
precision precision.Fixed8Converter
healthStatus atomic.Int32
balanceClient *balanceClient.Client
netmapClient *nmClient.Client
persistate *state.PersistentStorage
containerClient *container.Client
// metrics
irMetrics *metrics.InnerRingServiceMetrics

View File

@ -67,7 +67,7 @@ func (d *DeletePrm) SetKey(key []byte) {
//
// If TryNotary is provided, calls notary contract.
func (c *Client) Delete(p DeletePrm) error {
if len(p.signature) == 0 {
if len(p.signature) == 0 && p.IsControl() {
return errNilArgument
}

View File

@ -115,6 +115,11 @@ func (i *InvokePrmOptional) SetControlTX(b bool) {
i.controlTX = b
}
// IsControl gets whether a control transaction will be used.
func (i *InvokePrmOptional) IsControl() bool {
return i.controlTX
}
// Invoke calls Invoke method of Client with static internal script hash and fee.
// Supported args types are the same as in Client.
//

View File

@ -9,9 +9,10 @@ import (
const serviceName = "ircontrol.ControlService"
const (
rpcHealthCheck = "HealthCheck"
rpcTickEpoch = "TickEpoch"
rpcRemoveNode = "RemoveNode"
rpcHealthCheck = "HealthCheck"
rpcTickEpoch = "TickEpoch"
rpcRemoveNode = "RemoveNode"
rpcRemoveContainer = "RemoveContainer"
)
// HealthCheck executes ControlService.HealthCheck RPC.
@ -40,6 +41,14 @@ func RemoveNode(
return sendUnary[RemoveNodeRequest, RemoveNodeResponse](cli, rpcRemoveNode, req, opts...)
}
func RemoveContainer(
cli *client.Client,
req *RemoveContainerRequest,
opts ...client.CallOption,
) (*RemoveContainerResponse, error) {
return sendUnary[RemoveContainerRequest, RemoveContainerResponse](cli, rpcRemoveContainer, req, opts...)
}
func sendUnary[I, O grpc.Message](cli *client.Client, rpcName string, req *I, opts ...client.CallOption) (*O, error) {
var resp O
wResp := &responseWrapper[*O]{

View File

@ -5,8 +5,12 @@ import (
"context"
"fmt"
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/refs"
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/morph/client/container"
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/morph/client/netmap"
control "git.frostfs.info/TrueCloudLab/frostfs-node/pkg/services/control/ir"
cid "git.frostfs.info/TrueCloudLab/frostfs-sdk-go/container/id"
"git.frostfs.info/TrueCloudLab/frostfs-sdk-go/user"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
)
@ -99,3 +103,63 @@ func (s *Server) RemoveNode(_ context.Context, req *control.RemoveNodeRequest) (
return resp, nil
}
// RemoveContainer forces a container removal.
func (s *Server) RemoveContainer(_ context.Context, req *control.RemoveContainerRequest) (*control.RemoveContainerResponse, error) {
if err := s.isValidRequest(req); err != nil {
return nil, status.Error(codes.PermissionDenied, err.Error())
}
if len(req.Body.GetContainerId()) > 0 && len(req.Body.GetOwner()) > 0 {
return nil, status.Error(codes.InvalidArgument, "specify the owner and container at the same time is not allowed")
}
if len(req.Body.GetContainerId()) > 0 {
var containerID cid.ID
if err := containerID.Decode(req.Body.GetContainerId()); err != nil {
return nil, status.Error(codes.InvalidArgument, fmt.Sprintf("failed to parse container ID: %s", err.Error()))
}
if err := s.removeContainer(containerID); err != nil {
return nil, err
}
} else {
var ownerID refs.OwnerID
if err := ownerID.Unmarshal(req.GetBody().GetOwner()); err != nil {
return nil, status.Error(codes.InvalidArgument, fmt.Sprintf("failed to parse ownerID: %s", err.Error()))
}
var owner user.ID
if err := owner.ReadFromV2(ownerID); err != nil {
return nil, status.Error(codes.InvalidArgument, fmt.Sprintf("failed to read owner: %s", err.Error()))
}
cids, err := s.containerClient.ContainersOf(&owner)
if err != nil {
return nil, fmt.Errorf("failed to get owner's containers: %w", err)
}
for _, containerID := range cids {
if err := s.removeContainer(containerID); err != nil {
return nil, err
}
}
}
resp := &control.RemoveContainerResponse{
Body: &control.RemoveContainerResponse_Body{},
}
if err := SignMessage(&s.prm.key.PrivateKey, resp); err != nil {
return nil, status.Error(codes.Internal, err.Error())
}
return resp, nil
}
func (s *Server) removeContainer(containerID cid.ID) error {
var prm container.DeletePrm
prm.SetCID(containerID[:])
prm.SetControlTX(true)
if err := s.containerClient.Delete(prm); err != nil {
return fmt.Errorf("forcing container removal: %w", err)
}
return nil
}

View File

@ -3,6 +3,7 @@ package control
import (
"fmt"
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/morph/client/container"
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/morph/client/netmap"
)
@ -12,10 +13,10 @@ import (
// To gain access to the service, any request must be
// signed with a key from the white list.
type Server struct {
prm Prm
netmapClient *netmap.Client
allowedKeys [][]byte
prm Prm
netmapClient *netmap.Client
containerClient *container.Client
allowedKeys [][]byte
}
func panicOnPrmValue(n string, v any) {
@ -32,7 +33,7 @@ func panicOnPrmValue(n string, v any) {
// Forms white list from all keys specified via
// WithAllowedKeys option and a public key of
// the parameterized private key.
func New(prm Prm, netmapClient *netmap.Client, opts ...Option) *Server {
func New(prm Prm, netmapClient *netmap.Client, containerClient *container.Client, opts ...Option) *Server {
// verify required parameters
switch {
case prm.healthChecker == nil:
@ -47,8 +48,9 @@ func New(prm Prm, netmapClient *netmap.Client, opts ...Option) *Server {
}
return &Server{
prm: prm,
netmapClient: netmapClient,
prm: prm,
netmapClient: netmapClient,
containerClient: containerClient,
allowedKeys: append(o.allowedKeys, prm.key.PublicKey().Bytes()),
}

View File

@ -1,7 +1,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.26.0
// protoc v3.12.4
// protoc v4.24.4
// source: pkg/services/control/ir/service.proto
package control
@ -358,6 +358,116 @@ func (x *RemoveNodeResponse) GetSignature() *Signature {
return nil
}
type RemoveContainerRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Body *RemoveContainerRequest_Body `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"`
Signature *Signature `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"`
}
func (x *RemoveContainerRequest) Reset() {
*x = RemoveContainerRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_pkg_services_control_ir_service_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *RemoveContainerRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*RemoveContainerRequest) ProtoMessage() {}
func (x *RemoveContainerRequest) ProtoReflect() protoreflect.Message {
mi := &file_pkg_services_control_ir_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 RemoveContainerRequest.ProtoReflect.Descriptor instead.
func (*RemoveContainerRequest) Descriptor() ([]byte, []int) {
return file_pkg_services_control_ir_service_proto_rawDescGZIP(), []int{6}
}
func (x *RemoveContainerRequest) GetBody() *RemoveContainerRequest_Body {
if x != nil {
return x.Body
}
return nil
}
func (x *RemoveContainerRequest) GetSignature() *Signature {
if x != nil {
return x.Signature
}
return nil
}
type RemoveContainerResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Body *RemoveContainerResponse_Body `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"`
Signature *Signature `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"`
}
func (x *RemoveContainerResponse) Reset() {
*x = RemoveContainerResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_pkg_services_control_ir_service_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *RemoveContainerResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*RemoveContainerResponse) ProtoMessage() {}
func (x *RemoveContainerResponse) ProtoReflect() protoreflect.Message {
mi := &file_pkg_services_control_ir_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 RemoveContainerResponse.ProtoReflect.Descriptor instead.
func (*RemoveContainerResponse) Descriptor() ([]byte, []int) {
return file_pkg_services_control_ir_service_proto_rawDescGZIP(), []int{7}
}
func (x *RemoveContainerResponse) GetBody() *RemoveContainerResponse_Body {
if x != nil {
return x.Body
}
return nil
}
func (x *RemoveContainerResponse) GetSignature() *Signature {
if x != nil {
return x.Signature
}
return nil
}
// Health check request body.
type HealthCheckRequest_Body struct {
state protoimpl.MessageState
@ -368,7 +478,7 @@ type HealthCheckRequest_Body struct {
func (x *HealthCheckRequest_Body) Reset() {
*x = HealthCheckRequest_Body{}
if protoimpl.UnsafeEnabled {
mi := &file_pkg_services_control_ir_service_proto_msgTypes[6]
mi := &file_pkg_services_control_ir_service_proto_msgTypes[8]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -381,7 +491,7 @@ func (x *HealthCheckRequest_Body) String() string {
func (*HealthCheckRequest_Body) ProtoMessage() {}
func (x *HealthCheckRequest_Body) ProtoReflect() protoreflect.Message {
mi := &file_pkg_services_control_ir_service_proto_msgTypes[6]
mi := &file_pkg_services_control_ir_service_proto_msgTypes[8]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -410,7 +520,7 @@ type HealthCheckResponse_Body struct {
func (x *HealthCheckResponse_Body) Reset() {
*x = HealthCheckResponse_Body{}
if protoimpl.UnsafeEnabled {
mi := &file_pkg_services_control_ir_service_proto_msgTypes[7]
mi := &file_pkg_services_control_ir_service_proto_msgTypes[9]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -423,7 +533,7 @@ func (x *HealthCheckResponse_Body) String() string {
func (*HealthCheckResponse_Body) ProtoMessage() {}
func (x *HealthCheckResponse_Body) ProtoReflect() protoreflect.Message {
mi := &file_pkg_services_control_ir_service_proto_msgTypes[7]
mi := &file_pkg_services_control_ir_service_proto_msgTypes[9]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -455,7 +565,7 @@ type TickEpochRequest_Body struct {
func (x *TickEpochRequest_Body) Reset() {
*x = TickEpochRequest_Body{}
if protoimpl.UnsafeEnabled {
mi := &file_pkg_services_control_ir_service_proto_msgTypes[8]
mi := &file_pkg_services_control_ir_service_proto_msgTypes[10]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -468,7 +578,7 @@ func (x *TickEpochRequest_Body) String() string {
func (*TickEpochRequest_Body) ProtoMessage() {}
func (x *TickEpochRequest_Body) ProtoReflect() protoreflect.Message {
mi := &file_pkg_services_control_ir_service_proto_msgTypes[8]
mi := &file_pkg_services_control_ir_service_proto_msgTypes[10]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -493,7 +603,7 @@ type TickEpochResponse_Body struct {
func (x *TickEpochResponse_Body) Reset() {
*x = TickEpochResponse_Body{}
if protoimpl.UnsafeEnabled {
mi := &file_pkg_services_control_ir_service_proto_msgTypes[9]
mi := &file_pkg_services_control_ir_service_proto_msgTypes[11]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -506,7 +616,7 @@ func (x *TickEpochResponse_Body) String() string {
func (*TickEpochResponse_Body) ProtoMessage() {}
func (x *TickEpochResponse_Body) ProtoReflect() protoreflect.Message {
mi := &file_pkg_services_control_ir_service_proto_msgTypes[9]
mi := &file_pkg_services_control_ir_service_proto_msgTypes[11]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -533,7 +643,7 @@ type RemoveNodeRequest_Body struct {
func (x *RemoveNodeRequest_Body) Reset() {
*x = RemoveNodeRequest_Body{}
if protoimpl.UnsafeEnabled {
mi := &file_pkg_services_control_ir_service_proto_msgTypes[10]
mi := &file_pkg_services_control_ir_service_proto_msgTypes[12]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -546,7 +656,7 @@ func (x *RemoveNodeRequest_Body) String() string {
func (*RemoveNodeRequest_Body) ProtoMessage() {}
func (x *RemoveNodeRequest_Body) ProtoReflect() protoreflect.Message {
mi := &file_pkg_services_control_ir_service_proto_msgTypes[10]
mi := &file_pkg_services_control_ir_service_proto_msgTypes[12]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -578,7 +688,7 @@ type RemoveNodeResponse_Body struct {
func (x *RemoveNodeResponse_Body) Reset() {
*x = RemoveNodeResponse_Body{}
if protoimpl.UnsafeEnabled {
mi := &file_pkg_services_control_ir_service_proto_msgTypes[11]
mi := &file_pkg_services_control_ir_service_proto_msgTypes[13]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -591,7 +701,7 @@ func (x *RemoveNodeResponse_Body) String() string {
func (*RemoveNodeResponse_Body) ProtoMessage() {}
func (x *RemoveNodeResponse_Body) ProtoReflect() protoreflect.Message {
mi := &file_pkg_services_control_ir_service_proto_msgTypes[11]
mi := &file_pkg_services_control_ir_service_proto_msgTypes[13]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -607,6 +717,99 @@ func (*RemoveNodeResponse_Body) Descriptor() ([]byte, []int) {
return file_pkg_services_control_ir_service_proto_rawDescGZIP(), []int{5, 0}
}
type RemoveContainerRequest_Body struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
ContainerId []byte `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"`
Owner []byte `protobuf:"bytes,2,opt,name=owner,proto3" json:"owner,omitempty"`
}
func (x *RemoveContainerRequest_Body) Reset() {
*x = RemoveContainerRequest_Body{}
if protoimpl.UnsafeEnabled {
mi := &file_pkg_services_control_ir_service_proto_msgTypes[14]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *RemoveContainerRequest_Body) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*RemoveContainerRequest_Body) ProtoMessage() {}
func (x *RemoveContainerRequest_Body) ProtoReflect() protoreflect.Message {
mi := &file_pkg_services_control_ir_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 RemoveContainerRequest_Body.ProtoReflect.Descriptor instead.
func (*RemoveContainerRequest_Body) Descriptor() ([]byte, []int) {
return file_pkg_services_control_ir_service_proto_rawDescGZIP(), []int{6, 0}
}
func (x *RemoveContainerRequest_Body) GetContainerId() []byte {
if x != nil {
return x.ContainerId
}
return nil
}
func (x *RemoveContainerRequest_Body) GetOwner() []byte {
if x != nil {
return x.Owner
}
return nil
}
type RemoveContainerResponse_Body struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *RemoveContainerResponse_Body) Reset() {
*x = RemoveContainerResponse_Body{}
if protoimpl.UnsafeEnabled {
mi := &file_pkg_services_control_ir_service_proto_msgTypes[15]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *RemoveContainerResponse_Body) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*RemoveContainerResponse_Body) ProtoMessage() {}
func (x *RemoveContainerResponse_Body) ProtoReflect() protoreflect.Message {
mi := &file_pkg_services_control_ir_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 RemoveContainerResponse_Body.ProtoReflect.Descriptor instead.
func (*RemoveContainerResponse_Body) Descriptor() ([]byte, []int) {
return file_pkg_services_control_ir_service_proto_rawDescGZIP(), []int{7, 0}
}
var File_pkg_services_control_ir_service_proto protoreflect.FileDescriptor
var file_pkg_services_control_ir_service_proto_rawDesc = []byte{
@ -672,27 +875,54 @@ var file_pkg_services_control_ir_service_proto_rawDesc = []byte{
0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x69, 0x72, 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, 0xf1, 0x01, 0x0a, 0x0e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x53,
0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4c, 0x0a, 0x0b, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68,
0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x1d, 0x2e, 0x69, 0x72, 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, 0x1e, 0x2e, 0x69, 0x72, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c,
0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x12, 0x46, 0x0a, 0x09, 0x54, 0x69, 0x63, 0x6b, 0x45, 0x70, 0x6f, 0x63,
0x68, 0x12, 0x1b, 0x2e, 0x69, 0x72, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x54, 0x69,
0x63, 0x6b, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c,
0x2e, 0x69, 0x72, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x54, 0x69, 0x63, 0x6b, 0x45,
0x70, 0x6f, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x49, 0x0a, 0x0a,
0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x1c, 0x2e, 0x69, 0x72, 0x63,
0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4e, 0x6f, 0x64,
0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x69, 0x72, 0x63, 0x6f, 0x6e,
0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x52,
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x44, 0x5a, 0x42, 0x67, 0x69, 0x74, 0x2e, 0x66,
0x72, 0x6f, 0x73, 0x74, 0x66, 0x73, 0x2e, 0x69, 0x6e, 0x66, 0x6f, 0x2f, 0x54, 0x72, 0x75, 0x65,
0x43, 0x6c, 0x6f, 0x75, 0x64, 0x4c, 0x61, 0x62, 0x2f, 0x66, 0x72, 0x6f, 0x73, 0x74, 0x66, 0x73,
0x2d, 0x6e, 0x6f, 0x64, 0x65, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63,
0x65, 0x73, 0x2f, 0x69, 0x72, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x62, 0x06, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x33,
0x6f, 0x64, 0x79, 0x22, 0xc9, 0x01, 0x0a, 0x16, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x43, 0x6f,
0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3a,
0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x69,
0x72, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x43,
0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e,
0x42, 0x6f, 0x64, 0x79, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, 0x32, 0x0a, 0x09, 0x73, 0x69,
0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e,
0x69, 0x72, 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, 0x3f,
0x0a, 0x04, 0x42, 0x6f, 0x64, 0x79, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69,
0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x63, 0x6f,
0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x77, 0x6e,
0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x22,
0x92, 0x01, 0x0a, 0x17, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69,
0x6e, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x04, 0x62,
0x6f, 0x64, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x69, 0x72, 0x63, 0x6f,
0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x43, 0x6f, 0x6e, 0x74,
0x61, 0x69, 0x6e, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x42, 0x6f,
0x64, 0x79, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, 0x32, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e,
0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x69, 0x72,
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, 0xcb, 0x02, 0x0a, 0x0e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c,
0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4c, 0x0a, 0x0b, 0x48, 0x65, 0x61, 0x6c, 0x74,
0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x1d, 0x2e, 0x69, 0x72, 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, 0x1e, 0x2e, 0x69, 0x72, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f,
0x6c, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x46, 0x0a, 0x09, 0x54, 0x69, 0x63, 0x6b, 0x45, 0x70, 0x6f,
0x63, 0x68, 0x12, 0x1b, 0x2e, 0x69, 0x72, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x54,
0x69, 0x63, 0x6b, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
0x1c, 0x2e, 0x69, 0x72, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x54, 0x69, 0x63, 0x6b,
0x45, 0x70, 0x6f, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x49, 0x0a,
0x0a, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x1c, 0x2e, 0x69, 0x72,
0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4e, 0x6f,
0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x69, 0x72, 0x63, 0x6f,
0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4e, 0x6f, 0x64, 0x65,
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x58, 0x0a, 0x0f, 0x52, 0x65, 0x6d, 0x6f,
0x76, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x12, 0x21, 0x2e, 0x69, 0x72,
0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x43, 0x6f,
0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22,
0x2e, 0x69, 0x72, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76,
0x65, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
0x73, 0x65, 0x42, 0x44, 0x5a, 0x42, 0x67, 0x69, 0x74, 0x2e, 0x66, 0x72, 0x6f, 0x73, 0x74, 0x66,
0x73, 0x2e, 0x69, 0x6e, 0x66, 0x6f, 0x2f, 0x54, 0x72, 0x75, 0x65, 0x43, 0x6c, 0x6f, 0x75, 0x64,
0x4c, 0x61, 0x62, 0x2f, 0x66, 0x72, 0x6f, 0x73, 0x74, 0x66, 0x73, 0x2d, 0x6e, 0x6f, 0x64, 0x65,
0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2f, 0x69, 0x72,
0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
@ -707,48 +937,58 @@ func file_pkg_services_control_ir_service_proto_rawDescGZIP() []byte {
return file_pkg_services_control_ir_service_proto_rawDescData
}
var file_pkg_services_control_ir_service_proto_msgTypes = make([]protoimpl.MessageInfo, 12)
var file_pkg_services_control_ir_service_proto_msgTypes = make([]protoimpl.MessageInfo, 16)
var file_pkg_services_control_ir_service_proto_goTypes = []interface{}{
(*HealthCheckRequest)(nil), // 0: ircontrol.HealthCheckRequest
(*HealthCheckResponse)(nil), // 1: ircontrol.HealthCheckResponse
(*TickEpochRequest)(nil), // 2: ircontrol.TickEpochRequest
(*TickEpochResponse)(nil), // 3: ircontrol.TickEpochResponse
(*RemoveNodeRequest)(nil), // 4: ircontrol.RemoveNodeRequest
(*RemoveNodeResponse)(nil), // 5: ircontrol.RemoveNodeResponse
(*HealthCheckRequest_Body)(nil), // 6: ircontrol.HealthCheckRequest.Body
(*HealthCheckResponse_Body)(nil), // 7: ircontrol.HealthCheckResponse.Body
(*TickEpochRequest_Body)(nil), // 8: ircontrol.TickEpochRequest.Body
(*TickEpochResponse_Body)(nil), // 9: ircontrol.TickEpochResponse.Body
(*RemoveNodeRequest_Body)(nil), // 10: ircontrol.RemoveNodeRequest.Body
(*RemoveNodeResponse_Body)(nil), // 11: ircontrol.RemoveNodeResponse.Body
(*Signature)(nil), // 12: ircontrol.Signature
(HealthStatus)(0), // 13: ircontrol.HealthStatus
(*HealthCheckRequest)(nil), // 0: ircontrol.HealthCheckRequest
(*HealthCheckResponse)(nil), // 1: ircontrol.HealthCheckResponse
(*TickEpochRequest)(nil), // 2: ircontrol.TickEpochRequest
(*TickEpochResponse)(nil), // 3: ircontrol.TickEpochResponse
(*RemoveNodeRequest)(nil), // 4: ircontrol.RemoveNodeRequest
(*RemoveNodeResponse)(nil), // 5: ircontrol.RemoveNodeResponse
(*RemoveContainerRequest)(nil), // 6: ircontrol.RemoveContainerRequest
(*RemoveContainerResponse)(nil), // 7: ircontrol.RemoveContainerResponse
(*HealthCheckRequest_Body)(nil), // 8: ircontrol.HealthCheckRequest.Body
(*HealthCheckResponse_Body)(nil), // 9: ircontrol.HealthCheckResponse.Body
(*TickEpochRequest_Body)(nil), // 10: ircontrol.TickEpochRequest.Body
(*TickEpochResponse_Body)(nil), // 11: ircontrol.TickEpochResponse.Body
(*RemoveNodeRequest_Body)(nil), // 12: ircontrol.RemoveNodeRequest.Body
(*RemoveNodeResponse_Body)(nil), // 13: ircontrol.RemoveNodeResponse.Body
(*RemoveContainerRequest_Body)(nil), // 14: ircontrol.RemoveContainerRequest.Body
(*RemoveContainerResponse_Body)(nil), // 15: ircontrol.RemoveContainerResponse.Body
(*Signature)(nil), // 16: ircontrol.Signature
(HealthStatus)(0), // 17: ircontrol.HealthStatus
}
var file_pkg_services_control_ir_service_proto_depIdxs = []int32{
6, // 0: ircontrol.HealthCheckRequest.body:type_name -> ircontrol.HealthCheckRequest.Body
12, // 1: ircontrol.HealthCheckRequest.signature:type_name -> ircontrol.Signature
7, // 2: ircontrol.HealthCheckResponse.body:type_name -> ircontrol.HealthCheckResponse.Body
12, // 3: ircontrol.HealthCheckResponse.signature:type_name -> ircontrol.Signature
8, // 4: ircontrol.TickEpochRequest.body:type_name -> ircontrol.TickEpochRequest.Body
12, // 5: ircontrol.TickEpochRequest.signature:type_name -> ircontrol.Signature
9, // 6: ircontrol.TickEpochResponse.body:type_name -> ircontrol.TickEpochResponse.Body
12, // 7: ircontrol.TickEpochResponse.signature:type_name -> ircontrol.Signature
10, // 8: ircontrol.RemoveNodeRequest.body:type_name -> ircontrol.RemoveNodeRequest.Body
12, // 9: ircontrol.RemoveNodeRequest.signature:type_name -> ircontrol.Signature
11, // 10: ircontrol.RemoveNodeResponse.body:type_name -> ircontrol.RemoveNodeResponse.Body
12, // 11: ircontrol.RemoveNodeResponse.signature:type_name -> ircontrol.Signature
13, // 12: ircontrol.HealthCheckResponse.Body.health_status:type_name -> ircontrol.HealthStatus
0, // 13: ircontrol.ControlService.HealthCheck:input_type -> ircontrol.HealthCheckRequest
2, // 14: ircontrol.ControlService.TickEpoch:input_type -> ircontrol.TickEpochRequest
4, // 15: ircontrol.ControlService.RemoveNode:input_type -> ircontrol.RemoveNodeRequest
1, // 16: ircontrol.ControlService.HealthCheck:output_type -> ircontrol.HealthCheckResponse
3, // 17: ircontrol.ControlService.TickEpoch:output_type -> ircontrol.TickEpochResponse
5, // 18: ircontrol.ControlService.RemoveNode:output_type -> ircontrol.RemoveNodeResponse
16, // [16:19] is the sub-list for method output_type
13, // [13:16] is the sub-list for method input_type
13, // [13:13] is the sub-list for extension type_name
13, // [13:13] is the sub-list for extension extendee
0, // [0:13] is the sub-list for field type_name
8, // 0: ircontrol.HealthCheckRequest.body:type_name -> ircontrol.HealthCheckRequest.Body
16, // 1: ircontrol.HealthCheckRequest.signature:type_name -> ircontrol.Signature
9, // 2: ircontrol.HealthCheckResponse.body:type_name -> ircontrol.HealthCheckResponse.Body
16, // 3: ircontrol.HealthCheckResponse.signature:type_name -> ircontrol.Signature
10, // 4: ircontrol.TickEpochRequest.body:type_name -> ircontrol.TickEpochRequest.Body
16, // 5: ircontrol.TickEpochRequest.signature:type_name -> ircontrol.Signature
11, // 6: ircontrol.TickEpochResponse.body:type_name -> ircontrol.TickEpochResponse.Body
16, // 7: ircontrol.TickEpochResponse.signature:type_name -> ircontrol.Signature
12, // 8: ircontrol.RemoveNodeRequest.body:type_name -> ircontrol.RemoveNodeRequest.Body
16, // 9: ircontrol.RemoveNodeRequest.signature:type_name -> ircontrol.Signature
13, // 10: ircontrol.RemoveNodeResponse.body:type_name -> ircontrol.RemoveNodeResponse.Body
16, // 11: ircontrol.RemoveNodeResponse.signature:type_name -> ircontrol.Signature
14, // 12: ircontrol.RemoveContainerRequest.body:type_name -> ircontrol.RemoveContainerRequest.Body
16, // 13: ircontrol.RemoveContainerRequest.signature:type_name -> ircontrol.Signature
15, // 14: ircontrol.RemoveContainerResponse.body:type_name -> ircontrol.RemoveContainerResponse.Body
16, // 15: ircontrol.RemoveContainerResponse.signature:type_name -> ircontrol.Signature
17, // 16: ircontrol.HealthCheckResponse.Body.health_status:type_name -> ircontrol.HealthStatus
0, // 17: ircontrol.ControlService.HealthCheck:input_type -> ircontrol.HealthCheckRequest
2, // 18: ircontrol.ControlService.TickEpoch:input_type -> ircontrol.TickEpochRequest
4, // 19: ircontrol.ControlService.RemoveNode:input_type -> ircontrol.RemoveNodeRequest
6, // 20: ircontrol.ControlService.RemoveContainer:input_type -> ircontrol.RemoveContainerRequest
1, // 21: ircontrol.ControlService.HealthCheck:output_type -> ircontrol.HealthCheckResponse
3, // 22: ircontrol.ControlService.TickEpoch:output_type -> ircontrol.TickEpochResponse
5, // 23: ircontrol.ControlService.RemoveNode:output_type -> ircontrol.RemoveNodeResponse
7, // 24: ircontrol.ControlService.RemoveContainer:output_type -> ircontrol.RemoveContainerResponse
21, // [21:25] is the sub-list for method output_type
17, // [17:21] is the sub-list for method input_type
17, // [17:17] is the sub-list for extension type_name
17, // [17:17] is the sub-list for extension extendee
0, // [0:17] is the sub-list for field type_name
}
func init() { file_pkg_services_control_ir_service_proto_init() }
@ -831,7 +1071,7 @@ func file_pkg_services_control_ir_service_proto_init() {
}
}
file_pkg_services_control_ir_service_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*HealthCheckRequest_Body); i {
switch v := v.(*RemoveContainerRequest); i {
case 0:
return &v.state
case 1:
@ -843,7 +1083,7 @@ func file_pkg_services_control_ir_service_proto_init() {
}
}
file_pkg_services_control_ir_service_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*HealthCheckResponse_Body); i {
switch v := v.(*RemoveContainerResponse); i {
case 0:
return &v.state
case 1:
@ -855,7 +1095,7 @@ func file_pkg_services_control_ir_service_proto_init() {
}
}
file_pkg_services_control_ir_service_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*TickEpochRequest_Body); i {
switch v := v.(*HealthCheckRequest_Body); i {
case 0:
return &v.state
case 1:
@ -867,7 +1107,7 @@ func file_pkg_services_control_ir_service_proto_init() {
}
}
file_pkg_services_control_ir_service_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*TickEpochResponse_Body); i {
switch v := v.(*HealthCheckResponse_Body); i {
case 0:
return &v.state
case 1:
@ -879,7 +1119,7 @@ func file_pkg_services_control_ir_service_proto_init() {
}
}
file_pkg_services_control_ir_service_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*RemoveNodeRequest_Body); i {
switch v := v.(*TickEpochRequest_Body); i {
case 0:
return &v.state
case 1:
@ -891,6 +1131,30 @@ func file_pkg_services_control_ir_service_proto_init() {
}
}
file_pkg_services_control_ir_service_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*TickEpochResponse_Body); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_pkg_services_control_ir_service_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*RemoveNodeRequest_Body); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_pkg_services_control_ir_service_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*RemoveNodeResponse_Body); i {
case 0:
return &v.state
@ -902,6 +1166,30 @@ func file_pkg_services_control_ir_service_proto_init() {
return nil
}
}
file_pkg_services_control_ir_service_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*RemoveContainerRequest_Body); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_pkg_services_control_ir_service_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*RemoveContainerResponse_Body); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
@ -909,7 +1197,7 @@ func file_pkg_services_control_ir_service_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_pkg_services_control_ir_service_proto_rawDesc,
NumEnums: 0,
NumMessages: 12,
NumMessages: 16,
NumExtensions: 0,
NumServices: 1,
},

View File

@ -14,6 +14,8 @@ service ControlService {
rpc TickEpoch (TickEpochRequest) returns (TickEpochResponse);
// Forces a node removal to be signaled by the IR node with high probability.
rpc RemoveNode (RemoveNodeRequest) returns (RemoveNodeResponse);
// Forces a container removal to be signaled by the IR node with high probability.
rpc RemoveContainer(RemoveContainerRequest) returns (RemoveContainerResponse);
}
// Health check request.
@ -75,3 +77,20 @@ message RemoveNodeResponse {
Body body = 1;
Signature signature = 2;
}
message RemoveContainerRequest {
message Body{
bytes container_id = 1;
bytes owner = 2;
}
Body body = 1;
Signature signature = 2;
}
message RemoveContainerResponse {
message Body{}
Body body = 1;
Signature signature = 2;
}

View File

@ -483,3 +483,168 @@ func (x *RemoveNodeResponse) ReadSignedData(buf []byte) ([]byte, error) {
func (x *RemoveNodeResponse) SetSignature(sig *Signature) {
x.Signature = sig
}
// StableSize returns the size of x in protobuf format.
//
// Structures with the same field values have the same binary size.
func (x *RemoveContainerRequest_Body) StableSize() (size int) {
if x == nil {
return 0
}
size += proto.BytesSize(1, x.ContainerId)
size += proto.BytesSize(2, x.Owner)
return size
}
// StableMarshal marshals x in protobuf binary format with stable field order.
//
// 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 *RemoveContainerRequest_Body) StableMarshal(buf []byte) []byte {
if x == nil {
return []byte{}
}
if buf == nil {
buf = make([]byte, x.StableSize())
}
var offset int
offset += proto.BytesMarshal(1, buf[offset:], x.ContainerId)
offset += proto.BytesMarshal(2, buf[offset:], x.Owner)
return buf
}
// StableSize returns the size of x in protobuf format.
//
// Structures with the same field values have the same binary size.
func (x *RemoveContainerRequest) StableSize() (size int) {
if x == nil {
return 0
}
size += proto.NestedStructureSize(1, x.Body)
size += proto.NestedStructureSize(2, x.Signature)
return size
}
// StableMarshal marshals x in protobuf binary format with stable field order.
//
// 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 *RemoveContainerRequest) StableMarshal(buf []byte) []byte {
if x == nil {
return []byte{}
}
if buf == nil {
buf = make([]byte, x.StableSize())
}
var offset int
offset += proto.NestedStructureMarshal(1, buf[offset:], x.Body)
offset += proto.NestedStructureMarshal(2, buf[offset:], x.Signature)
return buf
}
// ReadSignedData fills buf with signed data of x.
// 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 *RemoveContainerRequest) SignedDataSize() int {
return x.GetBody().StableSize()
}
// SignedDataSize returns size of the request signed data in bytes.
//
// Structures with the same field values have the same signed data size.
func (x *RemoveContainerRequest) ReadSignedData(buf []byte) ([]byte, error) {
return x.GetBody().StableMarshal(buf), nil
}
func (x *RemoveContainerRequest) SetSignature(sig *Signature) {
x.Signature = sig
}
// StableSize returns the size of x in protobuf format.
//
// Structures with the same field values have the same binary size.
func (x *RemoveContainerResponse_Body) StableSize() (size int) {
if x == nil {
return 0
}
return size
}
// StableMarshal marshals x in protobuf binary format with stable field order.
//
// 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 *RemoveContainerResponse_Body) StableMarshal(buf []byte) []byte {
return buf
}
// StableSize returns the size of x in protobuf format.
//
// Structures with the same field values have the same binary size.
func (x *RemoveContainerResponse) StableSize() (size int) {
if x == nil {
return 0
}
size += proto.NestedStructureSize(1, x.Body)
size += proto.NestedStructureSize(2, x.Signature)
return size
}
// StableMarshal marshals x in protobuf binary format with stable field order.
//
// 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 *RemoveContainerResponse) StableMarshal(buf []byte) []byte {
if x == nil {
return []byte{}
}
if buf == nil {
buf = make([]byte, x.StableSize())
}
var offset int
offset += proto.NestedStructureMarshal(1, buf[offset:], x.Body)
offset += proto.NestedStructureMarshal(2, buf[offset:], x.Signature)
return buf
}
// ReadSignedData fills buf with signed data of x.
// 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 *RemoveContainerResponse) SignedDataSize() int {
return x.GetBody().StableSize()
}
// SignedDataSize returns size of the request signed data in bytes.
//
// Structures with the same field values have the same signed data size.
func (x *RemoveContainerResponse) ReadSignedData(buf []byte) ([]byte, error) {
return x.GetBody().StableMarshal(buf), nil
}
func (x *RemoveContainerResponse) SetSignature(sig *Signature) {
x.Signature = sig
}

View File

@ -1,7 +1,7 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.2.0
// - protoc v3.12.4
// - protoc-gen-go-grpc v1.3.0
// - protoc v4.24.4
// source: pkg/services/control/ir/service.proto
package control
@ -18,6 +18,13 @@ import (
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7
const (
ControlService_HealthCheck_FullMethodName = "/ircontrol.ControlService/HealthCheck"
ControlService_TickEpoch_FullMethodName = "/ircontrol.ControlService/TickEpoch"
ControlService_RemoveNode_FullMethodName = "/ircontrol.ControlService/RemoveNode"
ControlService_RemoveContainer_FullMethodName = "/ircontrol.ControlService/RemoveContainer"
)
// ControlServiceClient is the client API for ControlService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
@ -28,6 +35,8 @@ type ControlServiceClient interface {
TickEpoch(ctx context.Context, in *TickEpochRequest, opts ...grpc.CallOption) (*TickEpochResponse, error)
// Forces a node removal to be signaled by the IR node with high probability.
RemoveNode(ctx context.Context, in *RemoveNodeRequest, opts ...grpc.CallOption) (*RemoveNodeResponse, error)
// Forces a container removal to be signaled by the IR node with high probability.
RemoveContainer(ctx context.Context, in *RemoveContainerRequest, opts ...grpc.CallOption) (*RemoveContainerResponse, error)
}
type controlServiceClient struct {
@ -40,7 +49,7 @@ func NewControlServiceClient(cc grpc.ClientConnInterface) ControlServiceClient {
func (c *controlServiceClient) HealthCheck(ctx context.Context, in *HealthCheckRequest, opts ...grpc.CallOption) (*HealthCheckResponse, error) {
out := new(HealthCheckResponse)
err := c.cc.Invoke(ctx, "/ircontrol.ControlService/HealthCheck", in, out, opts...)
err := c.cc.Invoke(ctx, ControlService_HealthCheck_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
@ -49,7 +58,7 @@ func (c *controlServiceClient) HealthCheck(ctx context.Context, in *HealthCheckR
func (c *controlServiceClient) TickEpoch(ctx context.Context, in *TickEpochRequest, opts ...grpc.CallOption) (*TickEpochResponse, error) {
out := new(TickEpochResponse)
err := c.cc.Invoke(ctx, "/ircontrol.ControlService/TickEpoch", in, out, opts...)
err := c.cc.Invoke(ctx, ControlService_TickEpoch_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
@ -58,7 +67,16 @@ func (c *controlServiceClient) TickEpoch(ctx context.Context, in *TickEpochReque
func (c *controlServiceClient) RemoveNode(ctx context.Context, in *RemoveNodeRequest, opts ...grpc.CallOption) (*RemoveNodeResponse, error) {
out := new(RemoveNodeResponse)
err := c.cc.Invoke(ctx, "/ircontrol.ControlService/RemoveNode", in, out, opts...)
err := c.cc.Invoke(ctx, ControlService_RemoveNode_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *controlServiceClient) RemoveContainer(ctx context.Context, in *RemoveContainerRequest, opts ...grpc.CallOption) (*RemoveContainerResponse, error) {
out := new(RemoveContainerResponse)
err := c.cc.Invoke(ctx, ControlService_RemoveContainer_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
@ -75,6 +93,8 @@ type ControlServiceServer interface {
TickEpoch(context.Context, *TickEpochRequest) (*TickEpochResponse, error)
// Forces a node removal to be signaled by the IR node with high probability.
RemoveNode(context.Context, *RemoveNodeRequest) (*RemoveNodeResponse, error)
// Forces a container removal to be signaled by the IR node with high probability.
RemoveContainer(context.Context, *RemoveContainerRequest) (*RemoveContainerResponse, error)
}
// UnimplementedControlServiceServer should be embedded to have forward compatible implementations.
@ -90,6 +110,9 @@ func (UnimplementedControlServiceServer) TickEpoch(context.Context, *TickEpochRe
func (UnimplementedControlServiceServer) RemoveNode(context.Context, *RemoveNodeRequest) (*RemoveNodeResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method RemoveNode not implemented")
}
func (UnimplementedControlServiceServer) RemoveContainer(context.Context, *RemoveContainerRequest) (*RemoveContainerResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method RemoveContainer not implemented")
}
// UnsafeControlServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to ControlServiceServer will
@ -112,7 +135,7 @@ func _ControlService_HealthCheck_Handler(srv interface{}, ctx context.Context, d
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/ircontrol.ControlService/HealthCheck",
FullMethod: ControlService_HealthCheck_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ControlServiceServer).HealthCheck(ctx, req.(*HealthCheckRequest))
@ -130,7 +153,7 @@ func _ControlService_TickEpoch_Handler(srv interface{}, ctx context.Context, dec
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/ircontrol.ControlService/TickEpoch",
FullMethod: ControlService_TickEpoch_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ControlServiceServer).TickEpoch(ctx, req.(*TickEpochRequest))
@ -148,7 +171,7 @@ func _ControlService_RemoveNode_Handler(srv interface{}, ctx context.Context, de
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/ircontrol.ControlService/RemoveNode",
FullMethod: ControlService_RemoveNode_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ControlServiceServer).RemoveNode(ctx, req.(*RemoveNodeRequest))
@ -156,6 +179,24 @@ func _ControlService_RemoveNode_Handler(srv interface{}, ctx context.Context, de
return interceptor(ctx, in, info, handler)
}
func _ControlService_RemoveContainer_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(RemoveContainerRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ControlServiceServer).RemoveContainer(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: ControlService_RemoveContainer_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ControlServiceServer).RemoveContainer(ctx, req.(*RemoveContainerRequest))
}
return interceptor(ctx, in, info, handler)
}
// ControlService_ServiceDesc is the grpc.ServiceDesc for ControlService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
@ -175,6 +216,10 @@ var ControlService_ServiceDesc = grpc.ServiceDesc{
MethodName: "RemoveNode",
Handler: _ControlService_RemoveNode_Handler,
},
{
MethodName: "RemoveContainer",
Handler: _ControlService_RemoveContainer_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "pkg/services/control/ir/service.proto",

View File

@ -1,7 +1,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.26.0
// protoc v3.12.4
// protoc v4.24.4
// source: pkg/services/control/ir/types.proto
package control