executor

package
v0.0.0-...-1a2a7be Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2017 License: GPL-3.0 Imports: 1 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Constructor

type Constructor struct {
	ContextMaker  NewContextFn
	RequestMaker  NewRequestFn
	ExecutorMaker NewExecutorFn
}

func NewConstructor

func NewConstructor(fn NewExecutorFn) *Constructor

type Context

type Context interface {
	Metadata() Metadata
	Data() Data
}

func NewContext

func NewContext() Context

type Data

type Data interface {
	Set(val string)
	Get() string
}

func NewData

func NewData() Data

type Executor

type Executor interface {
	Metadata() Metadata
	Data() Data
	Execute(Request) (Response, error)
}

type Metadata

type Metadata interface {
	Set(key, val string)
	Get(key string) string
}

func NewMetadata

func NewMetadata() Metadata

type NewContextFn

type NewContextFn func() Context

type NewExecutorFn

type NewExecutorFn func() Executor

type NewRequestFn

type NewRequestFn func(ctx Context) Request

type NewResponseFn

type NewResponseFn func(req Request) Response

type Request

type Request interface {
	Context() Context
	Data() Data
}

func NewRequest

func NewRequest(ctx Context) Request

type Response

type Response interface {
	Data() Data
	Request() Request
}

func NewResponse

func NewResponse(req Request) Response

Jump to

Keyboard shortcuts

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