Documentation ¶
Index ¶
- type Module
- func (m *Module) AddLiveQuery(id, _, dbAlias, group, clientID string, whereObj map[string]interface{}, ...)
- func (m *Module) CloseConfig() error
- func (m *Module) DoRealtimeSubscribe(ctx context.Context, clientID string, data *model.RealtimeRequest, ...) ([]*model.FeedData, error)
- func (m *Module) HandleRealtimeEvent(ctxRoot context.Context, eventDoc *model.CloudEventPayload) error
- func (m *Module) ProcessRealtimeRequests(ctx context.Context, eventDoc *model.CloudEventPayload) error
- func (m *Module) RemoveClient(clientID string)
- func (m *Module) RemoveLiveQuery(ctx context.Context, dbAlias, group, clientID, queryID string) error
- func (m *Module) SetConfig(dbConfigs config.DatabaseConfigs, dbRules config.DatabaseRules, ...) error
- func (m *Module) SetDatabaseConfig(dbConfigs config.DatabaseConfigs)
- func (m *Module) SetDatabaseRules(databaseRules config.DatabaseRules)
- func (m *Module) SetDatabaseSchemas(databaseSchemas config.DatabaseSchemas)
- func (m *Module) SetProjectAESKey(aesKey string) error
- func (m *Module) Subscribe(clientID string, data *model.RealtimeRequest, sendFeed model.SendFeed) ([]*model.FeedData, error)
- func (m *Module) Unsubscribe(ctx context.Context, data *model.RealtimeRequest, clientID string) error
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(projectID, nodeID string, eventing model.EventingRealtimeInterface, auth model.AuthRealtimeInterface, crud model.CrudRealtimeInterface, schema schemaInterface, 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, _, dbAlias, group, clientID string, whereObj map[string]interface{}, actions *model.PostProcess, sendFeed model.SendFeed)
AddLiveQuery tracks a client for a live query
func (*Module) CloseConfig ¶
CloseConfig close the rules and secret key required by the realtime block
func (*Module) DoRealtimeSubscribe ¶
func (m *Module) DoRealtimeSubscribe(ctx context.Context, clientID string, data *model.RealtimeRequest, actions *model.PostProcess, reqParams model.RequestParams, sendFeed model.SendFeed) ([]*model.FeedData, error)
DoRealtimeSubscribe makes the realtime query
func (*Module) HandleRealtimeEvent ¶
func (m *Module) HandleRealtimeEvent(ctxRoot context.Context, eventDoc *model.CloudEventPayload) error
HandleRealtimeEvent handles an incoming realtime event from the eventing module
func (*Module) ProcessRealtimeRequests ¶
func (m *Module) ProcessRealtimeRequests(ctx context.Context, eventDoc *model.CloudEventPayload) error
ProcessRealtimeRequests handles an incoming realtime process event
func (*Module) RemoveClient ¶
RemoveClient removes a client
func (*Module) RemoveLiveQuery ¶
func (m *Module) RemoveLiveQuery(ctx context.Context, dbAlias, group, clientID, queryID string) error
RemoveLiveQuery removes a particular live query
func (*Module) SetConfig ¶
func (m *Module) SetConfig(dbConfigs config.DatabaseConfigs, dbRules config.DatabaseRules, dbSchemas config.DatabaseSchemas) error
SetConfig set the rules and secret key required by the realtime block
func (*Module) SetDatabaseConfig ¶
func (m *Module) SetDatabaseConfig(dbConfigs config.DatabaseConfigs)
SetDatabaseConfig sets database config of realtime
func (*Module) SetDatabaseRules ¶
func (m *Module) SetDatabaseRules(databaseRules config.DatabaseRules)
SetDatabaseRules sets database rules config of realtime
func (*Module) SetDatabaseSchemas ¶
func (m *Module) SetDatabaseSchemas(databaseSchemas config.DatabaseSchemas)
SetDatabaseSchemas sets database schemas config of realtime
func (*Module) SetProjectAESKey ¶
SetProjectAESKey set aes key
func (*Module) Subscribe ¶
func (m *Module) Subscribe(clientID string, data *model.RealtimeRequest, sendFeed model.SendFeed) ([]*model.FeedData, error)
Subscribe performs the realtime subscribe operation.
func (*Module) Unsubscribe ¶
func (m *Module) Unsubscribe(ctx context.Context, data *model.RealtimeRequest, clientID string) error
Unsubscribe performs the realtime unsubscribe operation.