Documentation
¶
Index ¶
- Variables
- func DoWithInterruptor(job func(), interrupt_ch chan struct{}) error
- func InterruptableReader(reader io.Reader, interrupt_ch chan struct{}) io.Reader
- func InterruptableWriter(writer io.WriteCloser, interrupt_ch chan struct{}) io.WriteCloser
- func SetLogWriter(out io.Writer)
- type Context
- func (c *Context) AddCloseHandler(cb func())
- func (c *Context) Close() error
- func (c *Context) LocalAddr() net.Addr
- func (c *Context) ReadObj(obj msgp.Unmarshaler) error
- func (c *Context) Reader() io.Reader
- func (c *Context) RemoteAddr() net.Addr
- func (c *Context) SetInterruptor(ich chan struct{})
- func (c *Context) WriteObj(obj msgp.MarshalSizer) error
- func (c *Context) Writer() io.Writer
- type Handler
- type NullWriter
- type Server
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrDuplicateMethod error = errors.New("duplicate method")
View Source
var ErrInterrupted error = errors.New("interrupted")
View Source
var ErrMethodTooLong error = errors.New("method too long")
Functions ¶
func DoWithInterruptor ¶ added in v1.0.4
func DoWithInterruptor(job func(), interrupt_ch chan struct{}) error
func InterruptableReader ¶ added in v1.0.4
func InterruptableWriter ¶ added in v1.0.4
func InterruptableWriter(writer io.WriteCloser, interrupt_ch chan struct{}) io.WriteCloser
func SetLogWriter ¶
Types ¶
type Context ¶
type Context struct {
Method string
// contains filtered or unexported fields
}
func CallWithInterruptor ¶ added in v1.0.4
func NewContext ¶ added in v1.0.5
func (*Context) AddCloseHandler ¶ added in v1.0.2
func (c *Context) AddCloseHandler(cb func())
func (*Context) RemoteAddr ¶
func (*Context) SetInterruptor ¶ added in v1.0.4
func (c *Context) SetInterruptor(ich chan struct{})
type NullWriter ¶
type NullWriter struct{}
Click to show internal directories.
Click to hide internal directories.