message

package
v0.0.0-...-6df0fc1 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2020 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PublishJsonMsg

func PublishJsonMsg(redis *redis.Client, channel string, msg *Msg) error

func ReceivePubSubCmds

func ReceivePubSubCmds(ctx context.Context, addr, channel string) <-chan *Cmd

func ReceiveWsCmds

func ReceiveWsCmds(ctx context.Context, c *websocket.Conn) <-chan *Cmd

Types

type Cmd

type Cmd struct {
	Command  string
	Metadata map[string]string
}

type Executer

type Executer interface {
	Execute(*Cmd) error
}

type Msg

type Msg struct {
	Type     string
	Metadata map[string]string
	Payload  []byte
}

Jump to

Keyboard shortcuts

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