mirror of
https://github.com/lorsanstand/HomeOps-Hub.git
synced 2026-06-19 20:05:17 +03:00
feat: base grpc system and base use
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
package grpc
|
||||
|
||||
import (
|
||||
"context"
|
||||
"log"
|
||||
|
||||
"github.com/lorsanstand/HomeOps-Hub/api/gen/homeops"
|
||||
"google.golang.org/protobuf/types/known/emptypb"
|
||||
)
|
||||
|
||||
type Server struct {
|
||||
homeops.UnimplementedHubServer
|
||||
}
|
||||
|
||||
func (s *Server) Ping(ctx context.Context, _ *emptypb.Empty) (*homeops.PongResponse, error) {
|
||||
log.Println("Answer")
|
||||
return &homeops.PongResponse{Pong: "Huiiii"}, nil
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user