dispatcher

package
v0.7.6 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2019 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dispatcher

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

func NewDispatcher

func NewDispatcher(p picture.Pictures) *Dispatcher

func (*Dispatcher) Dispatch

func (d *Dispatcher) Dispatch(host, path string) (<-chan *Response, error)

func (*Dispatcher) Start

func (d *Dispatcher) Start(ql, cl int) error

type Response

type Response struct {
	Err    error
	Buff   []byte
	Path   string
	Pict   *picture.Picture
	Timing Timer
}

func NewErrorResponse added in v0.3.0

func NewErrorResponse(path string, err error, timing Timer) *Response

func NewResponse added in v0.3.0

func NewResponse(path string, pict *picture.Picture) *Response

func (Response) IsSuccessful

func (r Response) IsSuccessful() bool

type Timer added in v0.7.1

type Timer interface {
	Stop()
	Start(name string)
	fmt.Stringer
}

func NewTimer added in v0.7.1

func NewTimer() Timer

Jump to

Keyboard shortcuts

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