grpc

package
v0.10.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 23, 2019 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Package grpc provides a simple gRPC server that acts as a probe target.

Index

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 New

func New(initCtx context.Context, c *configpb.ServerConf, l *logger.Logger) (*Server, error)

New returns a Server.

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.

func (*Server) Start

func (s *Server) Start(ctx context.Context, dataChan chan<- *metrics.EventMetrics) error

Start starts the gRPC server and serves requests until the context is canceled or the gRPC server panics.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL