buffernet

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: May 10, 2024 License: MIT Imports: 4 Imported by: 1

Documentation

Overview

Package buffernet provides facilities to establish a connection via grpc via internal buffers, allowing for testing services and clients without worrying about real networks.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BufferTransport

type BufferTransport struct {
	Listener *bufconn.Listener
}

func New

func New() *BufferTransport

func (*BufferTransport) Connect

func (b *BufferTransport) Connect(ctx context.Context) (conn *grpc.ClientConn, problem error)

Connect establishes a connection to the listening service via the buffer. Will block until the connection is established.

func (*BufferTransport) Listen

func (b *BufferTransport) Listen(server *grpc.Server) error

func (*BufferTransport) ListenAsync

func (b *BufferTransport) ListenAsync(server *grpc.Server) (<-chan error, func())

Jump to

Keyboard shortcuts

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