grpcsrv

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2017 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type T

type T struct {
	// contains filtered or unexported fields
}

func New

func New(addr string, proxySet *proxy.Set) (*T, error)

New creates a gRPC server instance.

func (*T) Consume

func (s *T) Consume(ctx context.Context, req *pb.ConsReq) (*pb.ConsRes, error)

Consume implements pb.KafkaPixyServer

func (*T) ErrorCh

func (s *T) ErrorCh() <-chan error

ErrorCh returns an output channel that HTTP server running in another goroutine will use if it stops with error if one occurs. The channel will be closed when the server is fully stopped due to an error or otherwise..

func (*T) Produce

func (s *T) Produce(ctx context.Context, req *pb.ProdReq) (*pb.ProdRes, error)

Produce implements pb.KafkaPixyServer

func (*T) Start

func (s *T) Start()

Starts triggers asynchronous gRPC server start. If it fails then the error will be sent down to `ErrorCh()`.

func (*T) Stop

func (s *T) Stop()

Stop gracefully stops the gRPC server. It stops listening on the socket for incoming requests first, and then blocks waiting for pending requests to complete.

Jump to

Keyboard shortcuts

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