fake

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2018 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) Start

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

Start 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