gf_events

package
v0.0.0-...-a1b0e2b Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: GPL-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EmitApp

func EmitApp(pEventAppTypeStr string,
	pMetaMap map[string]interface{},
	pRuntimeSys *gf_core.RuntimeSys)

func RegisterProducer

func RegisterProducer(pEventsIDstr string,
	pEventsCtx *EventsCtx,
	pRuntimeSys *gf_core.RuntimeSys)

func SendEvent

func SendEvent(pEventsIDstr string,
	pTypeStr string,
	pMsgStr string,
	pDataMap map[string]interface{},
	pEventsCtx *EventsCtx,
	pRuntimeSys *gf_core.RuntimeSys)

func User_event__create

func User_event__create(p_input *Gf_user_event_input,
	p_session_id_str string,
	p_gf_req_ctx *GF_user_event_req_ctx,
	pRuntimeSys *gf_core.RuntimeSys) *gf_core.GFerror

Types

type EventMsg

type EventMsg struct {
	EventsIDstr string                 `json:"events_id_str"`
	TypeStr     string                 `json:"type_str"`
	MsgStr      string                 `json:"msg_str"`
	DataMap     map[string]interface{} `json:"meta_map"`
}

type EventsCtx

type EventsCtx struct {
	RegisterProducerCh chan EventsRegisterProducerMsg
	RegisterConsumerCh chan EventsRegisterConsumerMsg
	EventsBrokerCh     chan EventMsg
}

func Init

func Init(pSSEurlStr string, pRuntimeSys *gf_core.RuntimeSys) *EventsCtx

type EventsRegisterConsumerMsg

type EventsRegisterConsumerMsg struct {
	EventsIDstr string

	// IMPORTANT!! - channel on which the events_consumer is expecting to receive new
	//               events produced by the events producer,once consumers registration
	//               (by processing the EventsRegisterConsumerMsg message) is complete.
	ResponseCh chan chan EventMsg
}

type EventsRegisterProducerMsg

type EventsRegisterProducerMsg struct {
	EventsIDstr string
}

type GF_user_event_req_ctx

type GF_user_event_req_ctx struct {
	User_ip_str      string `json:"user_ip_str"      bson:"user_ip_str"`
	User_agent_str   string `json:"user_agent_str"   bson:"user_agent_str"`
	Browser_name_str string `json:"browser_name_str" bson:"browser_name_str"`
	Browser_ver_str  string `json:"browser_ver_str"  bson:"browser_ver_str"`
	Os_name_str      string `json:"os_name_str"      bson:"os_name_str"`
	Os_ver_str       string `json:"os_ver_str"       bson:"os_ver_str"`
}

type Gf_user_event

type Gf_user_event struct {
	Id                   primitive.ObjectID     `json:"-"                    bson:"_id,omitempty"`
	Id_str               string                 `json:"id_str"               bson:"id_str"`
	T_str                string                 `json:"-"                    bson:"t"` //"usr_event"
	Creation_unix_time_f float64                `json:"creation_unix_time_f" bson:"creation_unix_time_f"`
	Event_data_map       map[string]interface{} `json:"event_data_map"       bson:"event_data_map"`
	Session_id_str       string                 `json:"session_id_str"       bson:"session_id_str"`
	Req_ctx              GF_user_event_req_ctx  `json:"req_ctx"              bson:"req_ctx"`
	// contains filtered or unexported fields
}

type Gf_user_event_input

type Gf_user_event_input struct {
	Type_str string                 `json:"type_str"`
	Data_map map[string]interface{} `json:"d"`
}

func User_event__parse_input

func User_event__parse_input(p_req *http.Request,
	p_resp http.ResponseWriter,
	pRuntimeSys *gf_core.RuntimeSys) (*Gf_user_event_input, string, *gf_core.GFerror)

Jump to

Keyboard shortcuts

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