Implement grpc server in the daemon to receive cluster requests

This commit is contained in:
Pavel Sviderski
2024-08-29 10:17:16 +10:00
parent e074b6855f
commit afe9c13283
8 changed files with 703 additions and 3 deletions
+20
View File
@@ -0,0 +1,20 @@
package api
import (
"context"
pb2 "uncloud/internal/machine/api/pb"
)
// Server is the gRPC server for the Cluster service.
type Server struct {
pb2.UnimplementedClusterServer
}
func NewServer() *Server {
return &Server{}
}
// AddMachine adds a machine to the cluster.
func (s *Server) AddMachine(ctx context.Context, req *pb2.AddMachineRequest) (*pb2.AddMachineResponse, error) {
return &pb2.AddMachineResponse{}, nil
}