valve

package
v0.0.0-...-fd2add7 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2016 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const MessageCap = 32e3 // 32K

Sender-receiver pipe capacity (once matched)

Variables

This section is empty.

Functions

This section is empty.

Types

type Stat

type Stat struct {
	Cap     int  `json:"cap"`
	Opened  bool `json:"opened"`
	Closed  bool `json:"closed"`
	Aborted bool `json:"aborted"`
	NumSend int  `json:"numsend"`
	NumRecv int  `json:"numrecv"`
}

func (*Stat) String

func (s *Stat) String() string

type Valve

type Valve interface {
	Send() (io.WriteCloser, error)
	IsDone() bool
	Scrub()
	Close() error
	Recv() (io.ReadCloser, error)
	Cap() int
	Stat() Stat
	X() circuit.X
}

func MakeValve

func MakeValve(n int) Valve

type XValve

type XValve struct {
	Valve Valve
}

func (XValve) Cap

func (x XValve) Cap() int

func (XValve) Close

func (x XValve) Close() error

func (XValve) IsDone

func (x XValve) IsDone() bool

func (XValve) Recv

func (x XValve) Recv() (circuit.X, error)

func (XValve) Scrub

func (x XValve) Scrub()

func (XValve) Send

func (x XValve) Send() (circuit.X, error)

func (XValve) Stat

func (x XValve) Stat() Stat

type YValve

type YValve struct {
	X circuit.X
}

func (YValve) Cap

func (y YValve) Cap() int

func (YValve) Close

func (y YValve) Close() error

func (YValve) IsDone

func (y YValve) IsDone() bool

func (YValve) Recv

func (y YValve) Recv() (_ io.ReadCloser, err error)

func (YValve) Scrub

func (y YValve) Scrub()

func (YValve) Send

func (y YValve) Send() (_ io.WriteCloser, err error)

func (YValve) Stat

func (y YValve) Stat() Stat

Jump to

Keyboard shortcuts

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