realtime

package
v0.0.0-...-260b785 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Module

type Module struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

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

func (m *Module) CloseConfig() error

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

func (m *Module) RemoveClient(clientID string)

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

func (m *Module) SetProjectAESKey(aesKey string) error

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.

Jump to

Keyboard shortcuts

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