feat: added ping functionality

This commit is contained in:
SoXX 2024-03-05 21:40:42 +01:00
parent 6993c776bb
commit 7fac1ffb50
1 changed files with 9 additions and 0 deletions

View File

@ -2,6 +2,7 @@ package plug
import (
"context"
"google.golang.org/protobuf/types/known/timestamppb"
"log"
"git.dragse.it/anthrove/otter-space-sdk/pkg/graph"
@ -92,3 +93,11 @@ func (s *server) removeTask(taskID string) {
fn()
delete(s.ctx, taskID)
}
func (s *server) Ping(_ context.Context, request *gRPC.PingRequest) (*gRPC.PongResponse, error) {
response := gRPC.PongResponse{
Message: request.Message,
Timestamp: timestamppb.Now(),
}
return &response, nil
}