2022-07-05 05:41:31 -04:00
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.2.0
2022-10-21 07:15:24 -04:00
// - protoc v3.21.8
2022-07-05 05:41:31 -04:00
// source: join.proto
package joinproto
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 {
2023-01-23 04:20:37 -05:00
// IssueJoinTicket issues a join ticket for a new node.
2022-07-05 05:41:31 -04:00
IssueJoinTicket ( ctx context . Context , in * IssueJoinTicketRequest , opts ... grpc . CallOption ) ( * IssueJoinTicketResponse , error )
2023-01-23 04:20:37 -05:00
// IssueRejoinTicket issues a join ticket for a node that has previously joined the cluster.
2022-07-26 04:58:39 -04:00
IssueRejoinTicket ( ctx context . Context , in * IssueRejoinTicketRequest , opts ... grpc . CallOption ) ( * IssueRejoinTicketResponse , error )
2022-07-05 05:41:31 -04:00
}
type aPIClient struct {
cc grpc . ClientConnInterface
}
func NewAPIClient ( cc grpc . ClientConnInterface ) APIClient {
return & aPIClient { cc }
}
func ( c * aPIClient ) IssueJoinTicket ( ctx context . Context , in * IssueJoinTicketRequest , opts ... grpc . CallOption ) ( * IssueJoinTicketResponse , error ) {
out := new ( IssueJoinTicketResponse )
err := c . cc . Invoke ( ctx , "/join.API/IssueJoinTicket" , in , out , opts ... )
if err != nil {
return nil , err
}
return out , nil
}
2022-07-26 04:58:39 -04:00
func ( c * aPIClient ) IssueRejoinTicket ( ctx context . Context , in * IssueRejoinTicketRequest , opts ... grpc . CallOption ) ( * IssueRejoinTicketResponse , error ) {
out := new ( IssueRejoinTicketResponse )
err := c . cc . Invoke ( ctx , "/join.API/IssueRejoinTicket" , in , out , opts ... )
if err != nil {
return nil , err
}
return out , nil
}
2022-07-05 05:41:31 -04:00
// APIServer is the server API for API service.
// All implementations must embed UnimplementedAPIServer
// for forward compatibility
type APIServer interface {
2023-01-23 04:20:37 -05:00
// IssueJoinTicket issues a join ticket for a new node.
2022-07-05 05:41:31 -04:00
IssueJoinTicket ( context . Context , * IssueJoinTicketRequest ) ( * IssueJoinTicketResponse , error )
2023-01-23 04:20:37 -05:00
// IssueRejoinTicket issues a join ticket for a node that has previously joined the cluster.
2022-07-26 04:58:39 -04:00
IssueRejoinTicket ( context . Context , * IssueRejoinTicketRequest ) ( * IssueRejoinTicketResponse , error )
2022-07-05 05:41:31 -04:00
mustEmbedUnimplementedAPIServer ( )
}
// UnimplementedAPIServer must be embedded to have forward compatible implementations.
type UnimplementedAPIServer struct {
}
func ( UnimplementedAPIServer ) IssueJoinTicket ( context . Context , * IssueJoinTicketRequest ) ( * IssueJoinTicketResponse , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method IssueJoinTicket not implemented" )
}
2022-07-26 04:58:39 -04:00
func ( UnimplementedAPIServer ) IssueRejoinTicket ( context . Context , * IssueRejoinTicketRequest ) ( * IssueRejoinTicketResponse , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method IssueRejoinTicket not implemented" )
}
2022-07-05 05:41:31 -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 )
}
func _API_IssueJoinTicket_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( IssueJoinTicketRequest )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( APIServer ) . IssueJoinTicket ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : "/join.API/IssueJoinTicket" ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( APIServer ) . IssueJoinTicket ( ctx , req . ( * IssueJoinTicketRequest ) )
}
return interceptor ( ctx , in , info , handler )
}
2022-07-26 04:58:39 -04:00
func _API_IssueRejoinTicket_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( IssueRejoinTicketRequest )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( APIServer ) . IssueRejoinTicket ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : "/join.API/IssueRejoinTicket" ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( APIServer ) . IssueRejoinTicket ( ctx , req . ( * IssueRejoinTicketRequest ) )
}
return interceptor ( ctx , in , info , handler )
}
2022-07-05 05:41:31 -04:00
// 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 {
ServiceName : "join.API" ,
HandlerType : ( * APIServer ) ( nil ) ,
Methods : [ ] grpc . MethodDesc {
{
MethodName : "IssueJoinTicket" ,
Handler : _API_IssueJoinTicket_Handler ,
} ,
2022-07-26 04:58:39 -04:00
{
MethodName : "IssueRejoinTicket" ,
Handler : _API_IssueRejoinTicket_Handler ,
} ,
2022-07-05 05:41:31 -04:00
} ,
Streams : [ ] grpc . StreamDesc { } ,
Metadata : "join.proto" ,
}