Documentation
¶
Overview ¶
Req: go 1.16 or later (embed.FS is N/A on Go 1.15 or lower)
Index ¶
- Constants
- func MsgPakClientRun(clientID string, serverPool []string, tlsMode string, certifPath string, ...) bool
- func MsgPakGenerateUUID() string
- func MsgPakServerRun(serverID string, useTLS bool, certifPath string, httpAddr string, ...) bool
- func MsgPakSetClientTaskCmd(cmd string, data string) string
- func MsgPakSetServerTaskCmd(cmd string, data string, timeoutSec uint32, tlsMode string, certifPath string, ...) string
- type CronMsgTask
- type HandleMessagesFunc
Constants ¶
View Source
const ( VERSION string = "r.20221018.1832" DEBUG bool = false DEBUG_CACHE bool = false HANDSHAKE_TIMEOUT_SECONDS uint32 = 45 // default is 45 WAIT_DHKX_LIMIT_SECONDS uint32 = 60 // default is 60 WAIT_CLOSE_LIMIT_SECONDS uint32 = 2 // default is 2 MAX_NUM_ERR_MSG_RECV uint8 = 8 // default is 8 ; after this number of reecive errors, reset connection and force re-connect ; Implemented just for Client ; TODO: implement also for Server MAX_META_MSG_SIZE uint32 = 1 * 1000 * 1000 // 1 MB MAX_MSG_SIZE uint32 = 16 * 1000 * 1000 // 16 MB MAX_QUEUE_MESSAGES uint8 = 100 // must be between: 1..255 LIMIT_INTERVAL_SECONDS_MIN uint32 = 10 // {{{SYNC-MSGPAK-INTERVAL-LIMITS}}} LIMIT_INTERVAL_SECONDS_MAX uint32 = 3600 // {{{SYNC-MSGPAK-INTERVAL-LIMITS}}} CERTIFICATES_DEFAULT_PATH string = "./ssl" CERTIFICATE_PEM_CRT string = "cert.crt" CERTIFICATE_PEM_KEY string = "cert.key" HTTP_AUTH_REALM string = "Smart.MsgPak Server" )
Variables ¶
This section is empty.
Functions ¶
func MsgPakClientRun ¶
func MsgPakGenerateUUID ¶
func MsgPakGenerateUUID() string
func MsgPakServerRun ¶
func MsgPakServerRun(serverID string, useTLS bool, certifPath string, httpAddr string, httpPort uint16, allowedIPs string, authUsername string, authPassword string, sharedEncPrivKey string, intervalMsgSeconds uint32, handleMessagesFunc HandleMessagesFunc, allowedHttpCustomCmds map[string]bool, cronMsgTasks []CronMsgTask) bool
func MsgPakSetClientTaskCmd ¶
Types ¶
type CronMsgTask ¶
Click to show internal directories.
Click to hide internal directories.