Versions in this module Expand all Collapse all v2 v2.0.0 Jul 9, 2021 Changes in this version + const BYTE + const EINVAL + const EPIPE + const ErrIOTimeout + const ErrNetClosing + const GIGABYTE + const GSE_FLAG_REDUNDENCY + const GSE_TYPE_COMMON + const GSE_TYPE_DYNAMIC + const GSE_TYPE_DYNAMIC_DEFAULT_META_MAX_LEN + const GSE_TYPE_DYNAMIC_EXT_HEAD_LEN + const GSE_TYPE_DYNAMIC_META_LEN + const GSE_TYPE_GET_CONF + const GSE_TYPE_OP + const GSE_TYPE_TLOGC + const KILOBYTE + const MEGABYTE + const MockAddress — darwin/amd64, linux/amd64, windows/amd64 + const MockNetwork — darwin/amd64, linux/amd64, windows/amd64 + func StartMockAgent() + type AgentInfo struct + Bizid int32 + Cloudid int32 + Hostname string + IP string + func (info *AgentInfo) String() string + type Config struct + Endpoint string + MsgQueueSize uint + Nonblock bool + ReconnectTimes uint + RetryInterval time.Duration + RetryTimes uint + WriteTimeout time.Duration + type GseClient struct + func NewGseClient(cfg *common.Config) (*GseClient, error) + func NewGseClientFromConfig(c Config) (*GseClient, error) + func (c *GseClient) Close() + func (c *GseClient) GetAgentInfo() (AgentInfo, error) + func (c *GseClient) Send(msg GseMsg) error + func (c *GseClient) SendWithNewConnection(msg GseMsg) error + func (c *GseClient) Start() error + type GseCommonMsg struct + func NewGseCommonMsg(data []byte, dataid int32, resv1, resv2, flag uint32) *GseCommonMsg + func (msg *GseCommonMsg) ToBytes() []byte + type GseCommonMsgHead struct + type GseConnection interface + Close func() error + Dial func() error + Read func(b []byte) (int, error) + SetHost func(host string) + SetWriteTimeout func(t time.Duration) + Write func(b []byte) (int, error) + type GseDynamicMetaInfo struct + type GseDynamicMsg struct + func NewGseDynamicMsg(data []byte, dataid int32, resv1, resv2 uint32) *GseDynamicMsg + func (msg *GseDynamicMsg) AddMeta(key, value string) error + func (msg *GseDynamicMsg) ToBytes() []byte + type GseDynamicMsgHead struct + type GseLinuxConnection struct — darwin/amd64, linux/amd64 + func NewGseConnection() *GseLinuxConnection + func (c *GseLinuxConnection) Close() error + func (c *GseLinuxConnection) Dial() error + func (c *GseLinuxConnection) Read(b []byte) (int, error) + func (c *GseLinuxConnection) SetHost(host string) + func (c *GseLinuxConnection) SetWriteTimeout(t time.Duration) + func (c *GseLinuxConnection) Write(b []byte) (int, error) + type GseLocalCommandMsg struct + BodyLen uint32 + MsgType uint32 + type GseMsg interface + ToBytes func() []byte + type GseOpMsg struct + func NewGseOpMsg(data []byte, dataid int32, resv1, resv2, flag uint32) *GseOpMsg + type GseRequestConfMsg struct + func NewGseRequestConfMsg() *GseRequestConfMsg + type GseSimpleClient struct + func NewGseSimpleClient() *GseSimpleClient + func (c *GseSimpleClient) Close() + func (c *GseSimpleClient) GetAgentInfo() (AgentInfo, error) + func (c *GseSimpleClient) Send(msg GseMsg) error + func (c *GseSimpleClient) SetAgentHost(host string) + func (c *GseSimpleClient) Start() error + func (c *GseSimpleClient) SyncGetAgentInfo() (AgentInfo, error) + type GseWindowsConnection struct — windows/amd64 + func NewGseConnection() *GseWindowsConnection + func (c *GseWindowsConnection) Close() error + func (c *GseWindowsConnection) Dial() error + func (c *GseWindowsConnection) Read(b []byte) (int, error) + func (c *GseWindowsConnection) SetHost(host string) + func (c *GseWindowsConnection) SetWriteTimeout(t time.Duration) + func (c *GseWindowsConnection) Write(b []byte) (int, error)