grpc: google.golang.org/grpc/internal/testutils Index | Files

package testutils

import "google.golang.org/grpc/internal/testutils"

Package testutils contains testing helpers.

Index

Package Files

pipe_listener.go status_equal.go

func StatusErrEqual Uses

func StatusErrEqual(err1, err2 error) bool

StatusErrEqual returns true iff both err1 and err2 wrap status.Status errors and their underlying status protos are equal.

type PipeListener Uses

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

PipeListener is a listener with an unbuffered pipe. Each write will complete only once the other side reads. It should only be created using NewPipeListener.

func NewPipeListener Uses

func NewPipeListener() *PipeListener

NewPipeListener creates a new pipe listener.

func (*PipeListener) Accept Uses

func (p *PipeListener) Accept() (net.Conn, error)

Accept accepts a connection.

func (*PipeListener) Addr Uses

func (p *PipeListener) Addr() net.Addr

Addr returns a pipe addr.

func (*PipeListener) Close Uses

func (p *PipeListener) Close() error

Close closes the listener.

func (*PipeListener) Dialer Uses

func (p *PipeListener) Dialer() func(string, time.Duration) (net.Conn, error)

Dialer dials a connection.

Package testutils imports 5 packages (graph). Updated 2019-06-12. Refresh now. Tools for package owners.