mirror of
https://github.com/edgelesssys/constellation.git
synced 2024-12-27 00:19:36 -05:00
e6b1156849
* Implement Control Plane activation flow * Rename Activation RPCs Signed-off-by: Daniel Weiße <dw@edgeless.systems>
142 lines
5.2 KiB
Go
142 lines
5.2 KiB
Go
// 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 {
|
|
ActivateWorkerNode(ctx context.Context, in *ActivateWorkerNodeRequest, opts ...grpc.CallOption) (*ActivateWorkerNodeResponse, error)
|
|
ActivateControlPlaneNode(ctx context.Context, in *ActivateControlPlaneNodeRequest, opts ...grpc.CallOption) (*ActivateControlPlaneNodeResponse, error)
|
|
}
|
|
|
|
type aPIClient struct {
|
|
cc grpc.ClientConnInterface
|
|
}
|
|
|
|
func NewAPIClient(cc grpc.ClientConnInterface) APIClient {
|
|
return &aPIClient{cc}
|
|
}
|
|
|
|
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...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
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...)
|
|
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 {
|
|
ActivateWorkerNode(context.Context, *ActivateWorkerNodeRequest) (*ActivateWorkerNodeResponse, error)
|
|
ActivateControlPlaneNode(context.Context, *ActivateControlPlaneNodeRequest) (*ActivateControlPlaneNodeResponse, error)
|
|
mustEmbedUnimplementedAPIServer()
|
|
}
|
|
|
|
// UnimplementedAPIServer must be embedded to have forward compatible implementations.
|
|
type UnimplementedAPIServer struct {
|
|
}
|
|
|
|
func (UnimplementedAPIServer) ActivateWorkerNode(context.Context, *ActivateWorkerNodeRequest) (*ActivateWorkerNodeResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method ActivateWorkerNode not implemented")
|
|
}
|
|
func (UnimplementedAPIServer) ActivateControlPlaneNode(context.Context, *ActivateControlPlaneNodeRequest) (*ActivateControlPlaneNodeResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method ActivateControlPlaneNode not implemented")
|
|
}
|
|
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_ActivateWorkerNode_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(ActivateWorkerNodeRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(APIServer).ActivateWorkerNode(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/activation.API/ActivateWorkerNode",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(APIServer).ActivateWorkerNode(ctx, req.(*ActivateWorkerNodeRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _API_ActivateControlPlaneNode_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(ActivateControlPlaneNodeRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(APIServer).ActivateControlPlaneNode(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/activation.API/ActivateControlPlaneNode",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(APIServer).ActivateControlPlaneNode(ctx, req.(*ActivateControlPlaneNodeRequest))
|
|
}
|
|
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{
|
|
ServiceName: "activation.API",
|
|
HandlerType: (*APIServer)(nil),
|
|
Methods: []grpc.MethodDesc{
|
|
{
|
|
MethodName: "ActivateWorkerNode",
|
|
Handler: _API_ActivateWorkerNode_Handler,
|
|
},
|
|
{
|
|
MethodName: "ActivateControlPlaneNode",
|
|
Handler: _API_ActivateControlPlaneNode_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{},
|
|
Metadata: "activation.proto",
|
|
}
|