mailbox

package
v0.0.0-...-8fbec55 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2023 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Mailbox

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

Mailbox holds a directory of reply channels so that test Responses can return to the goroutine that spowned the test

func New

func New() *Mailbox

func (*Mailbox) Deregister

func (mb *Mailbox) Deregister(id string)

func (*Mailbox) GetChannel

func (mb *Mailbox) GetChannel(id string) (chan Response, error)

func (*Mailbox) Register

func (mb *Mailbox) Register(id string) (chan Response, error)

type Response

type Response struct {
	StatusCode int
	Body       []byte
	Err        error
}

Response carries the equivalent of an http response

Jump to

Keyboard shortcuts

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