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 *spb.BlobReadRequest) (*spb.BlobReadResponse, error)
- func (s *Server) BlobWrite(ctx context.Context, req *spb.BlobWriteRequest) (*spb.BlobWriteResponse, error)
- func (s *Server) Echo(ctx context.Context, req *spb.EchoMessage) (*spb.EchoMessage, error)
- func (s *Server) ServerStatus(ctx context.Context, req *spb.StatusRequest) (*spb.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 {
// contains filtered or unexported fields
}
Server implements a gRPCServer.
func (*Server) BlobRead ¶ added in v0.10.2
func (s *Server) BlobRead(ctx context.Context, req *spb.BlobReadRequest) (*spb.BlobReadResponse, error)
BlobRead returns a blob of data.
func (*Server) BlobWrite ¶ added in v0.10.2
func (s *Server) BlobWrite(ctx context.Context, req *spb.BlobWriteRequest) (*spb.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 *spb.EchoMessage) (*spb.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 *spb.StatusRequest) (*spb.StatusResponse, error)
ServerStatus returns the current server status.
Click to show internal directories.
Click to hide internal directories.