net

package
v0.3.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 24, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NET_SECURE_HIDE       = 0x01
	NET_SECURE_CYPHER     = 0x02
	NET_ONE_WAY_NO_CYPHER = 0x04
	NET_RESERVED2         = 0x08
	NET_RESERVED3         = 0x10
	NET_RESERVED4         = 0x20
	NET_RESERVED5         = 0x40
	NET_RESERVED6         = 0x80

	NET_KEY_EXTENSION = 0xfd
	NET_TIME_SYNC     = 0xfe
	NET_KEY_RESET     = 0xff
)
View Source
const (
	NETSRC_AGENT_JAVA_EMBED   = 1
	NETSRC_AGENT_JAVA_WATCHER = 2
	NETSRC_SERVER_YARD        = 3
	NETSRC_SERVER_PROXY       = 4

	NETSRC_ZABBIX_PROXY = 37
	NETSRC_KUBE         = 5
	NETSRC_ONEWAY       = 10
)
View Source
const (
	TCP_NONE = 0x00
	TCP_OK   = 0x01
)
View Source
const (
	KEEPALIVE                     = 1
	AGENT_BOOT_ENV                = 2
	CONFIGURE_UPDATE              = 3
	CONFIGURE_GET                 = 4
	COMPO_VERSIONS                = 5
	THREAD_LIST                   = 7
	THREAD_DETAIL                 = 8
	GET_ACTIVE_STACK              = 9
	HEAP_HISTO                    = 10
	LOADED_CLASS_LIST             = 11
	GET_ENV                       = 12
	SYSTEM_GC                     = 13
	SET_CONFIG                    = 14
	OPEN_SOCKET_LIST              = 15
	LOADED_CLASS_DETAIL           = 16
	LOADED_CLASS_REDEFINE         = 17
	AGENT_JAR_LIST                = 18
	AGENT_JAR_SAVE                = 19
	AGENT_JAR_DELETE              = 20
	RESET_STRING_SENT_MARK        = 21
	AGENT_LOG_LIST                = 22
	AGENT_LOG_READ                = 23
	THREAD_CONTROL                = 24
	GET_ACTIVE_TRANSACTION_LIST   = 25
	GET_ACTIVE_TRANSACTION_DETAIL = 26
	GET_TOPOLOGY                  = 27
	INFRA_NET_STAT                = 28
	INFRA_PS_EF                   = 29
	INFRA_DOCKER_LIST             = 30
	INFRA_REMOTE_CMD              = 33
	INFRA_PEER_LIST               = 34
	INFRA_AGENT_UPDATE            = 36
	AGENT_DUMP_LIST               = 31
	AGENT_DUMP_READ               = 32
	AGENT_STAT                    = 35
	JVM_THREAD_DUMP               = 37
	JVM_HEAP_DUMP                 = 38
	KUBERNETES                    = 39
	GET_ACTIVE_STATS              = 40
	GET_DBCONN_POOL               = 41
	MODULE_DEPENDENCY             = 101
	DBX_INFO                      = 201
	DBX_SETTINGS                  = 202
	DBX_USER_SCRIPT               = 207
	DBX_SCRIPT_LIST               = 208
	DBX_SCRIPT_SQL                = 209
	DBX_KILL_SESSION              = 210
	DBX_GET_ALERT                 = 211
	DBX_SET_ALERT                 = 212
	DBX_PLAN                      = 213
	DBX_SESSION_LIST              = 214
	DBX_SET_CPUCORES              = 215
	DBX_SESSION_STAT              = 203
	DBX_SESSION_EVENT             = 204
	DBX_TOPSTAT                   = 205
	DBX_TOPEVENT                  = 206
	CONFIG_DBC                    = 301
	METHOD_PERF_STAT              = 302
	BLOCKING_DETECT               = 303
	CW_INFO                       = 401
	CW_EVENTS                     = 402
	CW_CREDENTIAL                 = 403
	CW_REGIONS                    = 404
	CW_METRIC_NAMES               = 405
	CW_AWS_RESOURCE_IDS           = 406
	CW_STATISTICS                 = 407
	CW_UNITS                      = 408
	CW_METRICS                    = 409
)
View Source
const (
	READ_MAX = 8 * 1024 * 1024
)

Variables

View Source
var RecvBuffer chan pack.Pack

Functions

func GetSecureMask

func GetSecureMask(code byte) byte

func InitReceiver

func InitReceiver()

func InitSender

func InitSender()

func NetSyncTest

func NetSyncTest(whatapip *string, license *string)

func PrintMemUsage

func PrintMemUsage()

func Send

func Send(f byte, p pack.Pack, flush bool)

func SendProfile

func SendProfile(f byte, p pack.Pack, flush bool)

func StartNet

func StartNet()

Types

type TcpManager

type TcpManager struct {
}

func GetInstanceTcpManager

func GetInstanceTcpManager() *TcpManager

func (*TcpManager) Run

func (this *TcpManager) Run()

config 로드후 실행, implemenets ConfObjserver.Runnable

type TcpReturn

type TcpReturn struct {
	Code        byte
	Data        []byte
	TransferKey int32
}

type TcpSend

type TcpSend struct {
	// contains filtered or unexported fields
}

type TcpSession

type TcpSession struct {
	LastConnectedTime int64

	RetryQueue *queue.RequestQueue
	// contains filtered or unexported fields
}

func GetTcpSession

func GetTcpSession() *TcpSession

func (*TcpSession) Close

func (this *TcpSession) Close()

func (*TcpSession) Flush

func (this *TcpSession) Flush() (n int, err error)

func (*TcpSession) Read

func (this *TcpSession) Read() (ret *TcpReturn)

func (*TcpSession) Send

func (this *TcpSession) Send(code byte, b []byte, flush bool) (ret bool)

func (*TcpSession) SendFailover

func (this *TcpSession) SendFailover() bool

func (*TcpSession) WaitForConnection

func (this *TcpSession) WaitForConnection()

func (*TcpSession) Write

func (this *TcpSession) Write(sendbuf []byte) (int, error)

func (*TcpSession) WriteLock

func (this *TcpSession) WriteLock(sendbuf []byte) (int, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL