dispatcher

package
v0.5.3 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2019 License: MIT Imports: 6 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
	Times map[string]time.Duration
}

func NewErrorResponse added in v0.3.0

func NewErrorResponse(path string, err error) *Response

func NewResponse added in v0.3.0

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

func (Response) IsSuccessful

func (r Response) IsSuccessful() bool

Jump to

Keyboard shortcuts

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