redis

package
v0.0.0-...-43028c6 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigureRedisSync

func ConfigureRedisSync(app *feathers.App, config map[string]interface{}) error

Configures a new RedisSync provider which synchronizes events for having multiple instances of server

Types

type FeathersMessage

type FeathersMessage struct {
	Context FeathersMessageContext `json:"context"`
	Event   string                 `json:"event"`
	Data    interface{}            `json:"data"`
	Path    string                 `json:"path"`
}

type FeathersMessageContext

type FeathersMessageContext struct {
	Method feathers.RestMethod `json:"method"`
	ID     string              `json:"id"`
	Type   feathers.HookType   `json:"type"`
}

type RedisPublishMessage

type RedisPublishMessage struct {
	Room    string      `json:"room"`
	Path    string      `json:"path"`
	Message interface{} `json:"message"`
}

type RedisSync

type RedisSync struct {
	// contains filtered or unexported fields
}

RedisSync is a provider which syncs realtime events over multiple server instances

func (*RedisSync) Listen

func (rs *RedisSync) Listen(port int, mux *http.ServeMux)

func (*RedisSync) Publish

func (rs *RedisSync) Publish(room string, event string, data interface{}, path string, provider string)

Jump to

Keyboard shortcuts

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