ping-pong #1

Merged
fenpaws merged 3 commits from ping-pong into main 2024-03-05 20:45:12 +00:00
Showing only changes of commit 7fac1ffb50 - Show all commits

View File

@ -2,6 +2,7 @@ package plug
import ( import (
"context" "context"
"google.golang.org/protobuf/types/known/timestamppb"
"log" "log"
"git.dragse.it/anthrove/otter-space-sdk/pkg/graph" "git.dragse.it/anthrove/otter-space-sdk/pkg/graph"
@ -92,3 +93,11 @@ func (s *server) removeTask(taskID string) {
fn() fn()
delete(s.ctx, taskID) 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
}