storage

package
v0.4.8 Latest Latest
Warning

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

Go to latest
Published: May 11, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Message

type Message struct {
	Delay time.Duration

	Headers http.Header
	Body    string

	Request  *Request
	Response *Response
}

func (Message) IsRequest

func (m Message) IsRequest() bool

func (Message) IsResponse

func (m Message) IsResponse() bool

type Queues

type Queues struct {
	Responses Store
	Requests  Store
}

func NewQueues

func NewQueues() *Queues

type Request

type Request struct {
	Method string
	Url    string
}

type Response

type Response struct {
	Status int
}

type Store

type Store interface {
	PushLast(message Message) error
	PopFirst() *Message
	List() []Message
	Clear()
}

func NewStore

func NewStore(validator func(Message) error) Store

Jump to

Keyboard shortcuts

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