Documentation
¶
Index ¶
- Constants
- func NewNetworkManager() *netManager
- func NewProxyConn(upstreamServer *ServerNet, downstream Stream) *proxyConn
- func ReadTask(j job.Job) (job.Init, job.Run, job.Finalize)
- func WriteTask(j job.Job) (job.Init, job.Run, job.Finalize)
- type ConnManager
- type ConnManagerOptions
- type ConnType
- type DataKind
- type NetManager
- type ProxyConn
- type Server
- type ServerNet
- type Stream
- type StreamOptions
- type StreamState
Constants ¶
View Source
const ( FieldFd = "fd" FieldPfd = "pfd" FieldSysfd = "Sysfd" )
View Source
const (
DefaultReadBufLen = 4096
)
Variables ¶
This section is empty.
Functions ¶
func NewNetworkManager ¶
func NewNetworkManager() *netManager
func NewProxyConn ¶
Types ¶
type ConnManager ¶
type ConnManagerOptions ¶
type NetManager ¶
type NetManager interface {
}
type ProxyConn ¶
type ProxyConn interface {
Upstream() *stream
Downstream() *stream
ProxyReadUpstreamTask(j job.Job) (job.Init, job.Run, job.Finalize)
ProxyReadDownstreamTask(j job.Job) (job.Init, job.Run, job.Finalize)
ProxyWriteUpstreamTask(j job.Job) (job.Init, job.Run, job.Finalize)
ProxyWriteDownstreamTask(j job.Job) (job.Init, job.Run, job.Finalize)
}
type Stream ¶
type Stream interface {
//Read() <-chan interface{}
Write() chan<- interface{}
WriteSync() int
RecvDataFrame() <-chan netdataframe.DataFrame
RecvDataFrameSync()
RecvRaw() <-chan []byte
RecvRawSync()
NewConn() <-chan struct{}
GetConnManager() ConnManager
Key() string
String() string
GetState() StreamState
CanBeReused() bool
IsConnected() bool
Refresh()
CloseWithReuse()
Close()
}
type StreamOptions ¶
type StreamOptions struct {
DataKind DataKind
}
func DefaultStreamOptions ¶
func DefaultStreamOptions() *StreamOptions
type StreamState ¶
type StreamState int
const ( InUseConn StreamState = iota IdleConn )
func (StreamState) String ¶
func (s StreamState) String() string
Click to show internal directories.
Click to hide internal directories.