Documentation ¶
Index ¶
- func ClientRequest(pURLstr string, pHeadersMap map[string]string, pCtx context.Context, ...) (map[string]interface{}, *gf_core.GFerror)
- func ClientRequestSSE(pURLstr string, pRespDataCh chan (map[string]interface{}), ...) *gf_core.GFerror
- func CreateHandlerHTTP(pPathStr string, pHandlerFun gf_core.HTTPhandler, ...)
- func CreateHandlerHTTPwithAuth(pAuthBool bool, pPathStr string, pHandlerFun gf_core.HTTPhandler, ...)
- func CreateHandlerHTTPwithMetrics(pPathStr string, pHandlerFun gf_core.HTTPhandler, pMetrics *GF_metrics, ...)
- func CreateHandlerHTTPwithMux(pPathStr string, pHandlerFun gf_core.HTTPhandler, pMux *http.ServeMux, ...)
- func CreateHandlerSSE(pPathStr string, pHandlerFun handler_http_sse, pStoreRunBool bool, ...)
- func CreateHandlersHTTP(pMetricsGroupNameStr string, pHandlersLst []gf_core.HTTPhandlerInfo, ...)
- func ErrorInHandler(p_handler_url_path_str string, p_user_msg_str string, ...)
- func GetResponseFormat(p_qs_map map[string][]string, pRuntimeSys *gf_core.RuntimeSys) string
- func HTTPcorsPreflightHandle(p_req *http.Request, p_resp http.ResponseWriter)
- func HTTPrespond(p_data interface{}, p_status_str string, p_resp http.ResponseWriter, ...)
- func MMSinitHandlers(pServerInfo GFmmsServerInfo, pHTTPmutex *http.ServeMux, ...)
- func MMSsessioJoin(pUserNameStr string, pMetaMap map[string]interface{}, pSession *GFmmsSession, ...) (int, map[string]interface{})
- func MMSsessionReset(pSessionNameStr string, pUserNameStr string, pSession *GFmmsSession, ...)
- func ServerInit(pServerNameStr string, pPortInt int)
- func ServerInitWithMux(pServerNameStr string, pPortInt int, pMux *http.ServeMux)
- func StoreRPChandlerRun(pHandlerURLstr string, pStartTimeUNIXf float64, pEndTimeUNIXf float64, ...) *gf_core.GFerror
- func UDPlistenForPackets(pExternalIPtoUseStr string, pPortStr string, pRuntimeSys *gf_core.RuntimeSys) (*net.UDPConn, *gf_core.GFerror)
- func UDPsendObjUpdateToAllClients(pPacketDataLst []byte, pUpdateOriginatorClientCompositeKeyStr string, ...)
- func UDPsendRegistrationConfirmation(pUDPaddressOfSender *net.UDPAddr, pConnExt *net.UDPConn, ...) *gf_core.GFerror
- func UDPstartListening(pServerDef GFudpServerDef, pRuntimeSys *gf_core.RuntimeSys)
- type GF_metrics
- type GFmmsOnSessionJoinFun
- type GFmmsOnSessionStatusFun
- type GFmmsServerInfo
- type GFmmsSession
- type GFmmsSessionStatus
- type GFrpcHandlerRun
- type GFrpcHandlerRuntime
- type GFudpClient
- type GFudpServerDef
- type PacketHeaderObjUpdate
- type SSE_data_complete_ch
- type SSE_data_err_ch
- type SSE_data_update_ch
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClientRequest ¶
func ClientRequestSSE ¶
func CreateHandlerHTTP ¶
func CreateHandlerHTTP(pPathStr string, pHandlerFun gf_core.HTTPhandler, pRuntimeSys *gf_core.RuntimeSys)
func CreateHandlerHTTPwithAuth ¶
func CreateHandlerHTTPwithAuth(pAuthBool bool, pPathStr string, pHandlerFun gf_core.HTTPhandler, pHandlerRuntime *GFrpcHandlerRuntime, pRuntimeSys *gf_core.RuntimeSys)
func CreateHandlerHTTPwithMetrics ¶
func CreateHandlerHTTPwithMetrics(pPathStr string, pHandlerFun gf_core.HTTPhandler, pMetrics *GF_metrics, pStoreRunBool bool, pRuntimeSys *gf_core.RuntimeSys)
func CreateHandlerHTTPwithMux ¶
func CreateHandlerHTTPwithMux(pPathStr string, pHandlerFun gf_core.HTTPhandler, pMux *http.ServeMux, pMetrics *GF_metrics, pStoreRunBool bool, pSentryHub *sentry.Hub, pRuntimeSys *gf_core.RuntimeSys)
func CreateHandlerSSE ¶
func CreateHandlerSSE(pPathStr string, pHandlerFun handler_http_sse, pStoreRunBool bool, pRuntimeSys *gf_core.RuntimeSys)
func CreateHandlersHTTP ¶
func CreateHandlersHTTP(pMetricsGroupNameStr string, pHandlersLst []gf_core.HTTPhandlerInfo, pHTTPmux *http.ServeMux, pAuthSubsystemTypeStr string, pAuthLoginURLstr string, pKeyServer *gf_identity_core.GFkeyServerInfo, pRuntimeSys *gf_core.RuntimeSys)
func ErrorInHandler ¶
func ErrorInHandler(p_handler_url_path_str string, p_user_msg_str string, p_gf_err *gf_core.GFerror, p_resp http.ResponseWriter, pRuntimeSys *gf_core.RuntimeSys)
func GetResponseFormat ¶
func GetResponseFormat(p_qs_map map[string][]string, pRuntimeSys *gf_core.RuntimeSys) string
func HTTPcorsPreflightHandle ¶
func HTTPcorsPreflightHandle(p_req *http.Request, p_resp http.ResponseWriter)
func HTTPrespond ¶
func HTTPrespond(p_data interface{}, p_status_str string, p_resp http.ResponseWriter, pRuntimeSys *gf_core.RuntimeSys)
func MMSinitHandlers ¶
func MMSinitHandlers(pServerInfo GFmmsServerInfo, pHTTPmutex *http.ServeMux, pRuntimeSys *gf_core.RuntimeSys)
func MMSsessioJoin ¶
func MMSsessioJoin(pUserNameStr string, pMetaMap map[string]interface{}, pSession *GFmmsSession, pServerInfo GFmmsServerInfo, pRuntimeSys *gf_core.RuntimeSys) (int, map[string]interface{})
func MMSsessionReset ¶
func MMSsessionReset(pSessionNameStr string, pUserNameStr string, pSession *GFmmsSession, pRuntimeSys *gf_core.RuntimeSys)
func ServerInit ¶
func ServerInitWithMux ¶
func StoreRPChandlerRun ¶
func UDPlistenForPackets ¶
func UDPsendObjUpdateToAllClients ¶
func UDPsendObjUpdateToAllClients(pPacketDataLst []byte, pUpdateOriginatorClientCompositeKeyStr string, pClientsTableMap map[string]GFudpClient, pConnExt *net.UDPConn, pServerDef GFudpServerDef, pRuntimeSys *gf_core.RuntimeSys)
func UDPsendRegistrationConfirmation ¶
func UDPsendRegistrationConfirmation(pUDPaddressOfSender *net.UDPAddr, pConnExt *net.UDPConn, pServerDef GFudpServerDef, pRuntimeSys *gf_core.RuntimeSys) *gf_core.GFerror
func UDPstartListening ¶
func UDPstartListening(pServerDef GFudpServerDef, pRuntimeSys *gf_core.RuntimeSys)
Types ¶
type GF_metrics ¶
type GF_metrics struct { HandlersCountersMap map[string]prometheus.Counter // AUTH_SESSION_INVALID - counter for when auth session validation fails when // request is received and validated HandlersAuthSessionInvalidCounter prometheus.Counter }
func MetricsCreateForHandlers ¶
func MetricsCreateForHandlers(pMetricsGroupNameStr string, pServiceNameStr string, pHandlersEndpointsLst []string) *GF_metrics
type GFmmsOnSessionJoinFun ¶
type GFmmsOnSessionJoinFun func(*GFmmsSession, map[string]interface{}) map[string]interface{}
type GFmmsOnSessionStatusFun ¶
type GFmmsOnSessionStatusFun func(*GFmmsSession, map[string]interface{}) map[string]interface{}
type GFmmsServerInfo ¶
type GFmmsServerInfo struct { ClientsJoinedThresholdInt int // number of clients that are expected to join the session at a minimum OnSessionJoinFun GFmmsOnSessionJoinFun OnSessionStatusFun GFmmsOnSessionStatusFun }
SERVER_INFO
type GFmmsSession ¶
type GFmmsSession struct { IDstr string ClientsJoinedThresholdInt int // number of clients that are expected to join the session at a minimum ClientsJoinedLst []int ClientNextAvailableIDint int ClientsCountInt int }
SESSION
func MMSsessionGetOrCreate ¶
func MMSsessionGetOrCreate(pNameStr string, pSessionMap map[string]*GFmmsSession, pServerInfo GFmmsServerInfo) *GFmmsSession
type GFmmsSessionStatus ¶
type GFmmsSessionStatus struct { StatusStr string // "waiting" | "started" ClientsJoinedThresholdInt int ClientsJoinedLst []int ClientsCountInt int // arbtirary metadata that this servrs callbacks can attach to sessions SessionMetaMap map[string]interface{} }
SESSION_STATUS
func MMSsessionStatus ¶
func MMSsessionStatus(pReqMetaMap map[string]interface{}, pSession *GFmmsSession, pServerInfo GFmmsServerInfo, pRuntimeSys *gf_core.RuntimeSys) *GFmmsSessionStatus
type GFrpcHandlerRun ¶
type GFrpcHandlerRuntime ¶
type GFrpcHandlerRuntime struct { Mux *http.ServeMux Metrics *GF_metrics StoreRunBool bool SentryHub *sentry.Hub AuthSubsystemTypeStr string AuthLoginURLstr string // url redirected too if user not logged in and tries to access auth handler AuthKeyServer *gf_identity_core.GFkeyServerInfo }
type GFudpClient ¶
type GFudpServerDef ¶
type GFudpServerDef struct { ExternalIPtoUseStr string PortStr string // unique package pattern for the defined server that allows clients // to register with this server RegistrationPacketLst []byte RegistrationConfirmationPacketLst []byte // object headers to sync across connected clients ObjectsToSyncLst []PacketHeaderObjUpdate }
type PacketHeaderObjUpdate ¶
type PacketHeaderObjUpdate []byte
type SSE_data_complete_ch ¶
type SSE_data_complete_ch chan bool
type SSE_data_err_ch ¶
type SSE_data_update_ch ¶
type SSE_data_update_ch chan interface{}
Click to show internal directories.
Click to hide internal directories.