2021-09-28 15:23:22 +00:00
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
2022-06-20 10:24:30 +00:00
// versions:
2024-01-29 08:16:59 +00:00
// - protoc-gen-go-grpc v1.3.0
2023-11-08 12:45:03 +00:00
// - protoc v4.25.0
2022-06-20 10:24:30 +00:00
// source: pkg/services/control/ir/service.proto
2021-09-28 15:23:22 +00:00
package control
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc . SupportPackageIsVersion7
2024-01-29 08:16:59 +00:00
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"
)
2021-09-28 15:23:22 +00:00
// 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.
type ControlServiceClient interface {
// Performs health check of the IR node.
HealthCheck ( ctx context . Context , in * HealthCheckRequest , opts ... grpc . CallOption ) ( * HealthCheckResponse , error )
2023-04-25 12:09:20 +00:00
// Forces a new epoch to be signaled by the IR node with high probability.
TickEpoch ( ctx context . Context , in * TickEpochRequest , opts ... grpc . CallOption ) ( * TickEpochResponse , error )
2023-05-03 13:19:46 +00:00
// 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 )
2023-10-16 15:15:04 +00:00
// 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 )
2021-09-28 15:23:22 +00:00
}
type controlServiceClient struct {
cc grpc . ClientConnInterface
}
func NewControlServiceClient ( cc grpc . ClientConnInterface ) ControlServiceClient {
return & controlServiceClient { cc }
}
func ( c * controlServiceClient ) HealthCheck ( ctx context . Context , in * HealthCheckRequest , opts ... grpc . CallOption ) ( * HealthCheckResponse , error ) {
out := new ( HealthCheckResponse )
2024-01-29 08:16:59 +00:00
err := c . cc . Invoke ( ctx , ControlService_HealthCheck_FullMethodName , in , out , opts ... )
2023-04-25 12:09:20 +00:00
if err != nil {
return nil , err
}
return out , nil
}
func ( c * controlServiceClient ) TickEpoch ( ctx context . Context , in * TickEpochRequest , opts ... grpc . CallOption ) ( * TickEpochResponse , error ) {
out := new ( TickEpochResponse )
2024-01-29 08:16:59 +00:00
err := c . cc . Invoke ( ctx , ControlService_TickEpoch_FullMethodName , in , out , opts ... )
2021-09-28 15:23:22 +00:00
if err != nil {
return nil , err
}
return out , nil
}
2023-05-03 13:19:46 +00:00
func ( c * controlServiceClient ) RemoveNode ( ctx context . Context , in * RemoveNodeRequest , opts ... grpc . CallOption ) ( * RemoveNodeResponse , error ) {
out := new ( RemoveNodeResponse )
2024-01-29 08:16:59 +00:00
err := c . cc . Invoke ( ctx , ControlService_RemoveNode_FullMethodName , in , out , opts ... )
2023-10-16 15:15:04 +00:00
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 )
2024-01-29 08:16:59 +00:00
err := c . cc . Invoke ( ctx , ControlService_RemoveContainer_FullMethodName , in , out , opts ... )
2023-05-03 13:19:46 +00:00
if err != nil {
return nil , err
}
return out , nil
}
2021-09-28 15:23:22 +00:00
// ControlServiceServer is the server API for ControlService service.
// All implementations should embed UnimplementedControlServiceServer
// for forward compatibility
type ControlServiceServer interface {
// Performs health check of the IR node.
HealthCheck ( context . Context , * HealthCheckRequest ) ( * HealthCheckResponse , error )
2023-04-25 12:09:20 +00:00
// Forces a new epoch to be signaled by the IR node with high probability.
TickEpoch ( context . Context , * TickEpochRequest ) ( * TickEpochResponse , error )
2023-05-03 13:19:46 +00:00
// Forces a node removal to be signaled by the IR node with high probability.
RemoveNode ( context . Context , * RemoveNodeRequest ) ( * RemoveNodeResponse , error )
2023-10-16 15:15:04 +00:00
// Forces a container removal to be signaled by the IR node with high probability.
RemoveContainer ( context . Context , * RemoveContainerRequest ) ( * RemoveContainerResponse , error )
2021-09-28 15:23:22 +00:00
}
// UnimplementedControlServiceServer should be embedded to have forward compatible implementations.
type UnimplementedControlServiceServer struct {
}
func ( UnimplementedControlServiceServer ) HealthCheck ( context . Context , * HealthCheckRequest ) ( * HealthCheckResponse , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method HealthCheck not implemented" )
}
2023-04-25 12:09:20 +00:00
func ( UnimplementedControlServiceServer ) TickEpoch ( context . Context , * TickEpochRequest ) ( * TickEpochResponse , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method TickEpoch not implemented" )
}
2023-05-03 13:19:46 +00:00
func ( UnimplementedControlServiceServer ) RemoveNode ( context . Context , * RemoveNodeRequest ) ( * RemoveNodeResponse , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method RemoveNode not implemented" )
}
2023-10-16 15:15:04 +00:00
func ( UnimplementedControlServiceServer ) RemoveContainer ( context . Context , * RemoveContainerRequest ) ( * RemoveContainerResponse , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method RemoveContainer not implemented" )
}
2021-09-28 15:23:22 +00:00
// 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
// result in compilation errors.
type UnsafeControlServiceServer interface {
mustEmbedUnimplementedControlServiceServer ( )
}
func RegisterControlServiceServer ( s grpc . ServiceRegistrar , srv ControlServiceServer ) {
s . RegisterService ( & ControlService_ServiceDesc , srv )
}
func _ControlService_HealthCheck_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( HealthCheckRequest )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( ControlServiceServer ) . HealthCheck ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
2024-01-29 08:16:59 +00:00
FullMethod : ControlService_HealthCheck_FullMethodName ,
2021-09-28 15:23:22 +00:00
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( ControlServiceServer ) . HealthCheck ( ctx , req . ( * HealthCheckRequest ) )
}
return interceptor ( ctx , in , info , handler )
}
2023-04-25 12:09:20 +00:00
func _ControlService_TickEpoch_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( TickEpochRequest )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( ControlServiceServer ) . TickEpoch ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
2024-01-29 08:16:59 +00:00
FullMethod : ControlService_TickEpoch_FullMethodName ,
2023-04-25 12:09:20 +00:00
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( ControlServiceServer ) . TickEpoch ( ctx , req . ( * TickEpochRequest ) )
}
return interceptor ( ctx , in , info , handler )
}
2023-05-03 13:19:46 +00:00
func _ControlService_RemoveNode_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( RemoveNodeRequest )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( ControlServiceServer ) . RemoveNode ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
2024-01-29 08:16:59 +00:00
FullMethod : ControlService_RemoveNode_FullMethodName ,
2023-05-03 13:19:46 +00:00
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( ControlServiceServer ) . RemoveNode ( ctx , req . ( * RemoveNodeRequest ) )
}
return interceptor ( ctx , in , info , handler )
}
2023-10-16 15:15:04 +00:00
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 ,
2024-01-29 08:16:59 +00:00
FullMethod : ControlService_RemoveContainer_FullMethodName ,
2023-10-16 15:15:04 +00:00
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( ControlServiceServer ) . RemoveContainer ( ctx , req . ( * RemoveContainerRequest ) )
}
return interceptor ( ctx , in , info , handler )
}
2021-09-28 15:23:22 +00:00
// 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)
var ControlService_ServiceDesc = grpc . ServiceDesc {
ServiceName : "ircontrol.ControlService" ,
HandlerType : ( * ControlServiceServer ) ( nil ) ,
Methods : [ ] grpc . MethodDesc {
{
MethodName : "HealthCheck" ,
Handler : _ControlService_HealthCheck_Handler ,
} ,
2023-04-25 12:09:20 +00:00
{
MethodName : "TickEpoch" ,
Handler : _ControlService_TickEpoch_Handler ,
} ,
2023-05-03 13:19:46 +00:00
{
MethodName : "RemoveNode" ,
Handler : _ControlService_RemoveNode_Handler ,
} ,
2023-10-16 15:15:04 +00:00
{
MethodName : "RemoveContainer" ,
Handler : _ControlService_RemoveContainer_Handler ,
} ,
2021-09-28 15:23:22 +00:00
} ,
Streams : [ ] grpc . StreamDesc { } ,
Metadata : "pkg/services/control/ir/service.proto" ,
}