context2

package
v0.0.0-...-d011049 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Server

func Server(store Store) http.HandlerFunc

Server returns a handler for calling Store.

Types

type SpyStore

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

SpyStore allows you to simulate a store and see how its used.

func (*SpyStore) Cancel

func (s *SpyStore) Cancel()

Cancel will record the call.

func (*SpyStore) Fetch

func (s *SpyStore) Fetch() string

Fetch returns response after a short delay.

type Store

type Store interface {
	Fetch() string
	Cancel()
}

Store fetches data.

Jump to

Keyboard shortcuts

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