Documentation ¶
Overview ¶
Package grpc provides a simple gRPC server that acts as a probe target.
Index ¶
- type Server
- func (s *Server) BlobRead(ctx context.Context, req *pb.BlobReadRequest) (*pb.BlobReadResponse, error)
- func (s *Server) BlobWrite(ctx context.Context, req *pb.BlobWriteRequest) (*pb.BlobWriteResponse, error)
- func (s *Server) Echo(ctx context.Context, req *pb.EchoMessage) (*pb.EchoMessage, error)
- func (s *Server) ServerStatus(ctx context.Context, req *pb.StatusRequest) (*pb.StatusResponse, error)
- func (s *Server) Start(ctx context.Context, dataChan chan<- *metrics.EventMetrics) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Server ¶
type Server struct { // Required for all gRPC server implementations. spb.UnimplementedProberServer // contains filtered or unexported fields }
Server implements a gRPCServer.
func (*Server) BlobRead ¶
func (s *Server) BlobRead(ctx context.Context, req *pb.BlobReadRequest) (*pb.BlobReadResponse, error)
BlobRead returns a blob of data.
func (*Server) BlobWrite ¶
func (s *Server) BlobWrite(ctx context.Context, req *pb.BlobWriteRequest) (*pb.BlobWriteResponse, error)
BlobWrite returns the size of blob in the WriteRequest. It does not operate on the blob.
func (*Server) Echo ¶
func (s *Server) Echo(ctx context.Context, req *pb.EchoMessage) (*pb.EchoMessage, error)
Echo reflects back the incoming message. TODO: return error if EchoMessage is greater than maxMsgSize.
func (*Server) ServerStatus ¶
func (s *Server) ServerStatus(ctx context.Context, req *pb.StatusRequest) (*pb.StatusResponse, error)
ServerStatus returns the current server status.
Click to show internal directories.
Click to hide internal directories.