Alejandro Lopez
ff25521204
All checks were successful
ci/woodpecker/push/pre-commit Pipeline was successful
Signed-off-by: Alejandro Lopez <a.lopez@yadro.com>
143 lines
5.3 KiB
Go
Generated
143 lines
5.3 KiB
Go
Generated
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
|
// versions:
|
|
// - protoc-gen-go-grpc v1.2.0
|
|
// - protoc v3.12.4
|
|
// source: pkg/services/control/ir/service.proto
|
|
|
|
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
|
|
|
|
// 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)
|
|
// 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)
|
|
}
|
|
|
|
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)
|
|
err := c.cc.Invoke(ctx, "/ircontrol.ControlService/HealthCheck", in, out, opts...)
|
|
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)
|
|
err := c.cc.Invoke(ctx, "/ircontrol.ControlService/TickEpoch", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
// 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)
|
|
// Forces a new epoch to be signaled by the IR node with high probability.
|
|
TickEpoch(context.Context, *TickEpochRequest) (*TickEpochResponse, error)
|
|
}
|
|
|
|
// 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")
|
|
}
|
|
func (UnimplementedControlServiceServer) TickEpoch(context.Context, *TickEpochRequest) (*TickEpochResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method TickEpoch 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
|
|
// 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,
|
|
FullMethod: "/ircontrol.ControlService/HealthCheck",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ControlServiceServer).HealthCheck(ctx, req.(*HealthCheckRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
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,
|
|
FullMethod: "/ircontrol.ControlService/TickEpoch",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ControlServiceServer).TickEpoch(ctx, req.(*TickEpochRequest))
|
|
}
|
|
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)
|
|
var ControlService_ServiceDesc = grpc.ServiceDesc{
|
|
ServiceName: "ircontrol.ControlService",
|
|
HandlerType: (*ControlServiceServer)(nil),
|
|
Methods: []grpc.MethodDesc{
|
|
{
|
|
MethodName: "HealthCheck",
|
|
Handler: _ControlService_HealthCheck_Handler,
|
|
},
|
|
{
|
|
MethodName: "TickEpoch",
|
|
Handler: _ControlService_TickEpoch_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{},
|
|
Metadata: "pkg/services/control/ir/service.proto",
|
|
}
|