Documentation
¶
Index ¶
- Constants
- func NewCompressConn(conn net.Conn, compressType CompressType, isReader bool) (net.Conn, error)
- func NewCompressReader(conn net.Conn, compressType CompressType) (net.Conn, error)
- func NewCompressWriter(conn net.Conn, compressType CompressType) (net.Conn, error)
- type Client
- type CommaIntFlags
- type CommaStringFlags
- type CompressType
- type ConcurrentClient
- type ConcurrentServer
- type Config
- type DashIntFlags
- type Handler
- type Helper
- type OneTimeClient
- type OneTimeServer
- type ReadOnlyCompressConn
- type Server
- type ServerBase
- type WriteOnlyCompressConn
Constants ¶
const ( // CompressSnappy is the Snappy compression format CompressSnappy = iota CompressGzip )
const ( DirectionModeSend = "send" DirectionModeReceive = "receive" )
Variables ¶
This section is empty.
Functions ¶
func NewCompressConn ¶
NewCompressConn creates a unidirectional compressed connection for backward compatibility isReader=true: creates a read-only connection for receiving compressed data isReader=false: creates a write-only connection for sending compressed data
func NewCompressReader ¶
NewCompressReader creates a read-only compressed connection
func NewCompressWriter ¶
NewCompressWriter creates a write-only compressed connection
Types ¶
type Client ¶
type Client interface {
Run() error
}
Client is the common interface for all client-side operations.
func NewConcurrentClient ¶
func NewOneTimeClient ¶
type CommaIntFlags ¶
type CommaIntFlags []string
func (*CommaIntFlags) Set ¶
func (c *CommaIntFlags) Set(value string) error
func (*CommaIntFlags) String ¶
func (c *CommaIntFlags) String() string
func (*CommaIntFlags) Type ¶
func (c *CommaIntFlags) Type() string
type CommaStringFlags ¶
type CommaStringFlags []string
func (*CommaStringFlags) Set ¶
func (c *CommaStringFlags) Set(value string) error
func (*CommaStringFlags) String ¶
func (c *CommaStringFlags) String() string
func (*CommaStringFlags) Type ¶
func (c *CommaStringFlags) Type() string
type ConcurrentClient ¶
type ConcurrentClient struct {
// contains filtered or unexported fields
}
ConcurrentClient handles receiving data from multiple sources concurrently.
func (*ConcurrentClient) Run ¶
func (c *ConcurrentClient) Run() error
Run executes the concurrent receive operation.
type ConcurrentServer ¶
type ConcurrentServer struct {
ServerBase
// contains filtered or unexported fields
}
func (*ConcurrentServer) Stop ¶
func (c *ConcurrentServer) Stop()
type Config ¶
type Config struct {
Hosts CommaStringFlags
Ports CommaIntFlags
DataPortRange DashIntFlags
ListenMode bool
NoCompression bool
ToResolve string
CmdID string
SegID int
PrintVersion bool
MD5XORMode bool
TransCompType string
NumClients CommaIntFlags
Direction string
NumDests int
}
type DashIntFlags ¶
type DashIntFlags []int
func (*DashIntFlags) Set ¶
func (d *DashIntFlags) Set(value string) error
func (*DashIntFlags) String ¶
func (d *DashIntFlags) String() string
func (*DashIntFlags) Type ¶
func (d *DashIntFlags) Type() string
type Helper ¶
type Helper struct {
// contains filtered or unexported fields
}
func (*Helper) GetErrCode ¶
type OneTimeClient ¶
type OneTimeClient struct {
// contains filtered or unexported fields
}
OneTimeClient handles single connection scenarios for sending or receiving data.
type OneTimeServer ¶
type OneTimeServer struct {
ServerBase
}
func (*OneTimeServer) Serve ¶
func (o *OneTimeServer) Serve()
func (*OneTimeServer) Stop ¶
func (o *OneTimeServer) Stop()
func (*OneTimeServer) WaitForFinished ¶
func (o *OneTimeServer) WaitForFinished()
type ReadOnlyCompressConn ¶
type ReadOnlyCompressConn struct {
// contains filtered or unexported fields
}
func (*ReadOnlyCompressConn) Close ¶
func (conn *ReadOnlyCompressConn) Close() error
type ServerBase ¶
type ServerBase struct {
// contains filtered or unexported fields
}
func (*ServerBase) Err ¶
func (t *ServerBase) Err() error
func (*ServerBase) Serve ¶
func (t *ServerBase) Serve()
func (*ServerBase) Start ¶
func (t *ServerBase) Start() int
func (*ServerBase) WaitForFinished ¶
func (t *ServerBase) WaitForFinished()
type WriteOnlyCompressConn ¶
type WriteOnlyCompressConn struct {
// contains filtered or unexported fields
}
func (*WriteOnlyCompressConn) Close ¶
func (conn *WriteOnlyCompressConn) Close() error
Close properly closes both the compressor and underlying connection