fake

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2019 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RunFunction

type RunFunction func(context.Context) error

RunFunction describes a function used to provide pluggable runtime behavior to the fake implementation of the api.Server interface

type Server

type Server struct {
	RunBehavior RunFunction
}

Server is a fake implementation of api.Server used for testing

func NewServer

func NewServer() *Server

NewServer returns a new, fake implementation of api.Server used for testing

func (*Server) Run added in v1.1.0

func (s *Server) Run(ctx context.Context) error

Run causes the api server to start serving HTTP requests. It will block until an error occurs and will return that error.

Jump to

Keyboard shortcuts

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