Documentation ¶
Index ¶
- type Module
- func (m *Module) AddLiveQuery(id, project, dbType, group, clientID string, whereObj map[string]interface{}, ...)
- func (m *Module) HandleRealtimeEvent(ctxRoot context.Context, eventDoc *model.CloudEventPayload) error
- func (m *Module) ProcessRealtimeRequests(eventDoc *model.CloudEventPayload) error
- func (m *Module) RemoveClient(clientID string)
- func (m *Module) RemoveLiveQuery(dbType, group, clientID, queryID string)
- func (m *Module) SetConfig(project string, crudConfig config.Crud) error
- func (m *Module) Subscribe(ctx context.Context, clientID string, data *model.RealtimeRequest, ...) ([]*model.FeedData, error)
- func (m *Module) Unsubscribe(clientID string, data *model.RealtimeRequest)
- type SendFeed
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Module ¶
Module is responsible for managing the realtime module
func Init ¶
func Init(nodeID string, eventing *eventing.Module, auth *auth.Module, crud *crud.Module, schema *schema.Schema, metrics *metrics.Module, syncMan *syncman.Manager) (*Module, error)
Init creates a new instance of the realtime module
func (*Module) AddLiveQuery ¶
func (m *Module) AddLiveQuery(id, project, dbType, group, clientID string, whereObj map[string]interface{}, actions *auth.PostProcess, sendFeed SendFeed)
AddLiveQuery tracks a client for a live query
func (*Module) HandleRealtimeEvent ¶ added in v0.13.0
func (m *Module) HandleRealtimeEvent(ctxRoot context.Context, eventDoc *model.CloudEventPayload) error
HandleRealtimeEvent handles an incoming realtime event from the eventing module
func (*Module) ProcessRealtimeRequests ¶ added in v0.13.0
func (m *Module) ProcessRealtimeRequests(eventDoc *model.CloudEventPayload) error
ProcessRealtimeRequests handles an incoming realtime process event
func (*Module) RemoveClient ¶
RemoveClient removes a client
func (*Module) RemoveLiveQuery ¶
RemoveLiveQuery removes a particular live query
func (*Module) Subscribe ¶
func (m *Module) Subscribe(ctx context.Context, clientID string, data *model.RealtimeRequest, sendFeed SendFeed) ([]*model.FeedData, error)
Subscribe performs the realtime subscribe operation.
func (*Module) Unsubscribe ¶
func (m *Module) Unsubscribe(clientID string, data *model.RealtimeRequest)
Unsubscribe performs the realtime unsubscribe operation.
Click to show internal directories.
Click to hide internal directories.