2022-05-23 05:36:54 -04:00
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.2.0
// - protoc v3.20.1
// source: activation.proto
package activationproto
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
// APIClient is the client API for API 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 APIClient interface {
2022-06-21 05:10:32 -04:00
ActivateWorkerNode ( ctx context . Context , in * ActivateWorkerNodeRequest , opts ... grpc . CallOption ) ( * ActivateWorkerNodeResponse , error )
ActivateControlPlaneNode ( ctx context . Context , in * ActivateControlPlaneNodeRequest , opts ... grpc . CallOption ) ( * ActivateControlPlaneNodeResponse , error )
2022-05-23 05:36:54 -04:00
}
type aPIClient struct {
cc grpc . ClientConnInterface
}
func NewAPIClient ( cc grpc . ClientConnInterface ) APIClient {
return & aPIClient { cc }
}
2022-06-21 05:10:32 -04:00
func ( c * aPIClient ) ActivateWorkerNode ( ctx context . Context , in * ActivateWorkerNodeRequest , opts ... grpc . CallOption ) ( * ActivateWorkerNodeResponse , error ) {
out := new ( ActivateWorkerNodeResponse )
err := c . cc . Invoke ( ctx , "/activation.API/ActivateWorkerNode" , in , out , opts ... )
2022-05-23 05:36:54 -04:00
if err != nil {
return nil , err
}
return out , nil
}
2022-06-21 05:10:32 -04:00
func ( c * aPIClient ) ActivateControlPlaneNode ( ctx context . Context , in * ActivateControlPlaneNodeRequest , opts ... grpc . CallOption ) ( * ActivateControlPlaneNodeResponse , error ) {
out := new ( ActivateControlPlaneNodeResponse )
err := c . cc . Invoke ( ctx , "/activation.API/ActivateControlPlaneNode" , in , out , opts ... )
2022-05-23 05:36:54 -04:00
if err != nil {
return nil , err
}
return out , nil
}
// APIServer is the server API for API service.
// All implementations must embed UnimplementedAPIServer
// for forward compatibility
type APIServer interface {
2022-06-21 05:10:32 -04:00
ActivateWorkerNode ( context . Context , * ActivateWorkerNodeRequest ) ( * ActivateWorkerNodeResponse , error )
ActivateControlPlaneNode ( context . Context , * ActivateControlPlaneNodeRequest ) ( * ActivateControlPlaneNodeResponse , error )
2022-05-23 05:36:54 -04:00
mustEmbedUnimplementedAPIServer ( )
}
// UnimplementedAPIServer must be embedded to have forward compatible implementations.
type UnimplementedAPIServer struct {
}
2022-06-21 05:10:32 -04:00
func ( UnimplementedAPIServer ) ActivateWorkerNode ( context . Context , * ActivateWorkerNodeRequest ) ( * ActivateWorkerNodeResponse , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method ActivateWorkerNode not implemented" )
2022-05-23 05:36:54 -04:00
}
2022-06-21 05:10:32 -04:00
func ( UnimplementedAPIServer ) ActivateControlPlaneNode ( context . Context , * ActivateControlPlaneNodeRequest ) ( * ActivateControlPlaneNodeResponse , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method ActivateControlPlaneNode not implemented" )
2022-05-23 05:36:54 -04:00
}
func ( UnimplementedAPIServer ) mustEmbedUnimplementedAPIServer ( ) { }
// UnsafeAPIServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to APIServer will
// result in compilation errors.
type UnsafeAPIServer interface {
mustEmbedUnimplementedAPIServer ( )
}
func RegisterAPIServer ( s grpc . ServiceRegistrar , srv APIServer ) {
s . RegisterService ( & API_ServiceDesc , srv )
}
2022-06-21 05:10:32 -04:00
func _API_ActivateWorkerNode_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( ActivateWorkerNodeRequest )
2022-05-23 05:36:54 -04:00
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
2022-06-21 05:10:32 -04:00
return srv . ( APIServer ) . ActivateWorkerNode ( ctx , in )
2022-05-23 05:36:54 -04:00
}
info := & grpc . UnaryServerInfo {
Server : srv ,
2022-06-21 05:10:32 -04:00
FullMethod : "/activation.API/ActivateWorkerNode" ,
2022-05-23 05:36:54 -04:00
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
2022-06-21 05:10:32 -04:00
return srv . ( APIServer ) . ActivateWorkerNode ( ctx , req . ( * ActivateWorkerNodeRequest ) )
2022-05-23 05:36:54 -04:00
}
return interceptor ( ctx , in , info , handler )
}
2022-06-21 05:10:32 -04:00
func _API_ActivateControlPlaneNode_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( ActivateControlPlaneNodeRequest )
2022-05-23 05:36:54 -04:00
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
2022-06-21 05:10:32 -04:00
return srv . ( APIServer ) . ActivateControlPlaneNode ( ctx , in )
2022-05-23 05:36:54 -04:00
}
info := & grpc . UnaryServerInfo {
Server : srv ,
2022-06-21 05:10:32 -04:00
FullMethod : "/activation.API/ActivateControlPlaneNode" ,
2022-05-23 05:36:54 -04:00
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
2022-06-21 05:10:32 -04:00
return srv . ( APIServer ) . ActivateControlPlaneNode ( ctx , req . ( * ActivateControlPlaneNodeRequest ) )
2022-05-23 05:36:54 -04:00
}
return interceptor ( ctx , in , info , handler )
}
// API_ServiceDesc is the grpc.ServiceDesc for API service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var API_ServiceDesc = grpc . ServiceDesc {
2022-06-21 05:10:32 -04:00
ServiceName : "activation.API" ,
2022-05-23 05:36:54 -04:00
HandlerType : ( * APIServer ) ( nil ) ,
Methods : [ ] grpc . MethodDesc {
{
2022-06-21 05:10:32 -04:00
MethodName : "ActivateWorkerNode" ,
Handler : _API_ActivateWorkerNode_Handler ,
2022-05-23 05:36:54 -04:00
} ,
{
2022-06-21 05:10:32 -04:00
MethodName : "ActivateControlPlaneNode" ,
Handler : _API_ActivateControlPlaneNode_Handler ,
2022-05-23 05:36:54 -04:00
} ,
} ,
Streams : [ ] grpc . StreamDesc { } ,
Metadata : "activation.proto" ,
}