inproc

package
v1.7.1 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package inproc implements a simple gRPC server & client that communicate in process This is useful for testing, or for services that don't need to cross process bounds.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	// Server points to the gRPC server instances. Services should be registered on this
	Server *grpc.Server
	// ClientConn is a handle to a connection to the server. This can be used to
	// get clients.
	ClientConn *grpc.ClientConn
	// contains filtered or unexported fields
}

Server is an in-process gRPC server.

func New

func New() *Server

New returns a new Server.

func (*Server) Close

func (s *Server) Close() error

Close closes the client connection, and stops the server from listening.

func (*Server) Start

func (s *Server) Start() error

Start runs the server. This call starts the server in a routine, and returns immediately.

Jump to

Keyboard shortcuts

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