Documentation ¶
Index ¶
- func New(n *node.Node, conf *Config) (engine.Engine, error)
- func Plugin(n *node.Node, c config.Getter) (engine.Engine, error)
- type Config
- type MemoryEngine
- func (e *MemoryEngine) AddPresence(ch string, uid string, info proto.ClientInfo, expire int) error
- func (e *MemoryEngine) Channels() ([]string, error)
- func (e *MemoryEngine) History(ch string, limit int) ([]proto.Message, error)
- func (e *MemoryEngine) Name() string
- func (e *MemoryEngine) Presence(ch string) (map[string]proto.ClientInfo, error)
- func (e *MemoryEngine) PublishAdmin(message *proto.AdminMessage) <-chan error
- func (e *MemoryEngine) PublishControl(message *proto.ControlMessage) <-chan error
- func (e *MemoryEngine) PublishJoin(message *proto.JoinMessage, opts *proto.ChannelOptions) <-chan error
- func (e *MemoryEngine) PublishLeave(message *proto.LeaveMessage, opts *proto.ChannelOptions) <-chan error
- func (e *MemoryEngine) PublishMessage(message *proto.Message, opts *proto.ChannelOptions) <-chan error
- func (e *MemoryEngine) RemovePresence(ch string, uid string) error
- func (e *MemoryEngine) Run() error
- func (e *MemoryEngine) Shutdown() error
- func (e *MemoryEngine) Subscribe(ch string) error
- func (e *MemoryEngine) Unsubscribe(ch string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type MemoryEngine ¶
type MemoryEngine struct {
// contains filtered or unexported fields
}
MemoryEngine allows to run Centrifugo without using Redis at all. All data managed inside process memory. With this engine you can only run single Centrifugo node. If you need to scale you should use Redis engine instead.
func (*MemoryEngine) AddPresence ¶
func (e *MemoryEngine) AddPresence(ch string, uid string, info proto.ClientInfo, expire int) error
func (*MemoryEngine) Channels ¶
func (e *MemoryEngine) Channels() ([]string, error)
func (*MemoryEngine) Name ¶
func (e *MemoryEngine) Name() string
func (*MemoryEngine) Presence ¶
func (e *MemoryEngine) Presence(ch string) (map[string]proto.ClientInfo, error)
func (*MemoryEngine) PublishAdmin ¶
func (e *MemoryEngine) PublishAdmin(message *proto.AdminMessage) <-chan error
func (*MemoryEngine) PublishControl ¶
func (e *MemoryEngine) PublishControl(message *proto.ControlMessage) <-chan error
func (*MemoryEngine) PublishJoin ¶
func (e *MemoryEngine) PublishJoin(message *proto.JoinMessage, opts *proto.ChannelOptions) <-chan error
func (*MemoryEngine) PublishLeave ¶
func (e *MemoryEngine) PublishLeave(message *proto.LeaveMessage, opts *proto.ChannelOptions) <-chan error
func (*MemoryEngine) PublishMessage ¶
func (e *MemoryEngine) PublishMessage(message *proto.Message, opts *proto.ChannelOptions) <-chan error
func (*MemoryEngine) RemovePresence ¶
func (e *MemoryEngine) RemovePresence(ch string, uid string) error
func (*MemoryEngine) Run ¶
func (e *MemoryEngine) Run() error
func (*MemoryEngine) Shutdown ¶
func (e *MemoryEngine) Shutdown() error
func (*MemoryEngine) Subscribe ¶
func (e *MemoryEngine) Subscribe(ch string) error
func (*MemoryEngine) Unsubscribe ¶
func (e *MemoryEngine) Unsubscribe(ch string) error
Click to show internal directories.
Click to hide internal directories.