Documentation
¶
Index ¶
- Constants
- func CreateBarebonesTLSConfig(proto string) (*tls.Config, error)
- func MakePipe() (pipe [2]net.Conn)
- func NewOnceCloser(c io.Closer) io.Closer
- func RunSimpleProtocolSwitch(red, blue net.Conn, redProtocol, blueProtocol Protocol)
- type EventRecorder
- type HTTPProtocol
- type JsonRPC
- type LVProtocol
- type OnceCloser
- type PackUnpackPassManagerBuilder
- type Pass
- type PassManager
- type Port
- type Protocol
- type ProtocolStack
- type ProtocolWithPass
- type ReadWriterWithTimeout
- type Repeater
- type SimpleProtocolSwitch
- type VariantProtocol
Constants ¶
View Source
const DEFAULT_BUFFER_SIZE = 32 << 10
View Source
const DEFAULT_TIMEOUT = 600
View Source
const UNUSUAL_BUFFER_LENGTH_THRESHOLD = DEFAULT_BUFFER_SIZE * 2
Variables ¶
This section is empty.
Functions ¶
func RunSimpleProtocolSwitch ¶
Types ¶
type EventRecorder ¶
type EventRecorder struct {
// contains filtered or unexported fields
}
func NewEventRecorder ¶ added in v1.4.3
func NewEventRecorder() *EventRecorder
func (*EventRecorder) AddRecord ¶
func (this *EventRecorder) AddRecord(e string) uint64
func (*EventRecorder) AssertHappenedBefore ¶
func (this *EventRecorder) AssertHappenedBefore(a, b string)
func (*EventRecorder) HappenedBefore ¶
func (this *EventRecorder) HappenedBefore(a, b string) bool
type HTTPProtocol ¶
type HTTPProtocol struct{}
type JsonRPC ¶
func NewJsonRPC ¶
func NewJsonRPC(p Protocol, c io.ReadWriter) *JsonRPC
func (*JsonRPC) ReadRequest ¶
func (*JsonRPC) SendResponse ¶
type LVProtocol ¶
type LVProtocol struct{}
type OnceCloser ¶
type OnceCloser struct {
// contains filtered or unexported fields
}
func (*OnceCloser) Close ¶
func (this *OnceCloser) Close() error
type PackUnpackPassManagerBuilder ¶
type PackUnpackPassManagerBuilder struct {
// contains filtered or unexported fields
}
func NewPackUnpackPassManagerBuilder ¶
func NewPackUnpackPassManagerBuilder() *PackUnpackPassManagerBuilder
func (*PackUnpackPassManagerBuilder) AddPairedPasses ¶
func (this *PackUnpackPassManagerBuilder) AddPairedPasses(pack Pass, unpack Pass)
func (*PackUnpackPassManagerBuilder) BuildPackPassManager ¶
func (this *PackUnpackPassManagerBuilder) BuildPackPassManager() *PassManager
func (*PackUnpackPassManagerBuilder) BuildUnpackPassManager ¶
func (this *PackUnpackPassManagerBuilder) BuildUnpackPassManager() *PassManager
type PassManager ¶
type PassManager struct {
// contains filtered or unexported fields
}
func NewPassManager ¶
func NewPassManager() *PassManager
func NewPassManagerWithPasses ¶
func NewPassManagerWithPasses(passes []Pass) *PassManager
func (*PassManager) AddPass ¶
func (this *PassManager) AddPass(p Pass) *PassManager
func (*PassManager) RunOnBytes ¶
func (this *PassManager) RunOnBytes(buf []byte) (result []byte, err error)
type ProtocolStack ¶
type ProtocolStack struct{}
type ProtocolWithPass ¶
type ReadWriterWithTimeout ¶
type SimpleProtocolSwitch ¶
type SimpleProtocolSwitch struct {
// contains filtered or unexported fields
}
SimpleProtocolSwitch is not responsible to close red and blue.
func NewSimpleProtocolSwitch ¶
func NewSimpleProtocolSwitch(red, blue net.Conn, redProtocol, blueProtocol Protocol) *SimpleProtocolSwitch
func (*SimpleProtocolSwitch) Run ¶
func (this *SimpleProtocolSwitch) Run()
type VariantProtocol ¶
type VariantProtocol struct {
// contains filtered or unexported fields
}
func NewVariantProtocol ¶
func NewVariantProtocol() *VariantProtocol
func (*VariantProtocol) Add ¶
func (this *VariantProtocol) Add(p Protocol) *VariantProtocol
func (*VariantProtocol) Len ¶
func (this *VariantProtocol) Len() int
Click to show internal directories.
Click to hide internal directories.