Documentation ¶
Index ¶
- type OneWayTcpClient
- func (this *OneWayTcpClient) ApplyConfig(conf config.Config)
- func (this *OneWayTcpClient) Close() error
- func (this *OneWayTcpClient) Connect() error
- func (this *OneWayTcpClient) Destroy() error
- func (this *OneWayTcpClient) Flush() (n int, err error)
- func (this *OneWayTcpClient) Send(p pack.Pack, opts ...wnet.TcpClientOption) error
- func (this *OneWayTcpClient) SendAndClear() error
- func (this *OneWayTcpClient) SendFlush(p pack.Pack, flush bool, opts ...wnet.TcpClientOption) error
- type OneWayTcpClientOption
- func WithConfigObserver(obj *config.ConfigObserver) OneWayTcpClientOption
- func WithContext(ctx context.Context, cancel context.CancelFunc) OneWayTcpClientOption
- func WithLicense(license string) OneWayTcpClientOption
- func WithLogger(logger logger.Logger) OneWayTcpClientOption
- func WithOid(oid int32) OneWayTcpClientOption
- func WithPcode(pcode int64) OneWayTcpClientOption
- func WithQueueSize(size int32) OneWayTcpClientOption
- func WithServers(servers []string) OneWayTcpClientOption
- func WithUseQueue() OneWayTcpClientOption
- func WithWhatapTcpServer(info *wnet.WhatapTcpServerInfo) OneWayTcpClientOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OneWayTcpClient ¶
type OneWayTcpClient struct { License string `toml:"license"` Servers []string `toml:"servers"` Pcode int64 `toml:"project_code"` Timeout time.Duration `toml:"timeout"` Log logger.Logger Oname string Oid int32 Queue *queue.RequestQueue UseQueue bool ConfigObserver *config.ConfigObserver // contains filtered or unexported fields }
func GetOneWayTcpClient ¶
func GetOneWayTcpClient(opts ...OneWayTcpClientOption) *OneWayTcpClient
func (*OneWayTcpClient) ApplyConfig ¶
func (this *OneWayTcpClient) ApplyConfig(conf config.Config)
implements common.ConfigObserver
func (*OneWayTcpClient) Close ¶
func (this *OneWayTcpClient) Close() error
func (*OneWayTcpClient) Connect ¶
func (this *OneWayTcpClient) Connect() error
func (*OneWayTcpClient) Destroy ¶
func (this *OneWayTcpClient) Destroy() error
func (*OneWayTcpClient) Flush ¶
func (this *OneWayTcpClient) Flush() (n int, err error)
func (*OneWayTcpClient) Send ¶
func (this *OneWayTcpClient) Send(p pack.Pack, opts ...wnet.TcpClientOption) error
func (*OneWayTcpClient) SendAndClear ¶
func (this *OneWayTcpClient) SendAndClear() error
func (*OneWayTcpClient) SendFlush ¶
func (this *OneWayTcpClient) SendFlush(p pack.Pack, flush bool, opts ...wnet.TcpClientOption) error
type OneWayTcpClientOption ¶
type OneWayTcpClientOption interface {
// contains filtered or unexported methods
}
func WithConfigObserver ¶
func WithConfigObserver(obj *config.ConfigObserver) OneWayTcpClientOption
func WithContext ¶
func WithContext(ctx context.Context, cancel context.CancelFunc) OneWayTcpClientOption
func WithLicense ¶ added in v0.0.15
func WithLicense(license string) OneWayTcpClientOption
func WithLogger ¶
func WithLogger(logger logger.Logger) OneWayTcpClientOption
func WithOid ¶ added in v0.0.15
func WithOid(oid int32) OneWayTcpClientOption
func WithPcode ¶ added in v0.0.15
func WithPcode(pcode int64) OneWayTcpClientOption
func WithQueueSize ¶ added in v0.0.19
func WithQueueSize(size int32) OneWayTcpClientOption
func WithServers ¶ added in v0.0.15
func WithServers(servers []string) OneWayTcpClientOption
func WithUseQueue ¶
func WithUseQueue() OneWayTcpClientOption
func WithWhatapTcpServer ¶
func WithWhatapTcpServer(info *wnet.WhatapTcpServerInfo) OneWayTcpClientOption
Click to show internal directories.
Click to hide internal directories.