ping-pong #1
@ -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
|
||||||
|
}
|
||||||
|
Reference in New Issue
Block a user