chatmq

package module
v0.0.0-...-cfc2b71 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2020 License: MIT Imports: 9 Imported by: 0

README

chatmq

message queue, just for chat.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Cluster

func Cluster(host, secret string, nodes []string) error

Cluster cluster.

func Decode

func Decode(b []byte, e interface{}) error

Decode decode.

func DeleteNotice

func DeleteNotice(key string)

DeleteNotice delete notice.

func Get

func Get(key string, e interface{}) bool

Get get.

func Overdue

func Overdue(duration time.Duration)

Overdue set queue overdue duration.

func PingTimeout

func PingTimeout(duration time.Duration)

PingTimeout ping timeout.

func Put

func Put(key string, e interface{})

Put put.

func SendNotice

func SendNotice(key string, e interface{})

SendNotice send notice to other nodes.

func SetLogLevel

func SetLogLevel(level LogLevel)

SetLogLevel set log level.

func SetNotice

func SetNotice(key string, notice Notice)

SetNotice set notice.

Types

type LogLevel

type LogLevel int

LogLevel log level

const (
	//LogLevelDebug log level debug.
	LogLevelDebug LogLevel = 0
	//LogLevelInfo log level info.
	LogLevelInfo LogLevel = 1
	//LogLevelWarn log level warn.
	LogLevelWarn LogLevel = 2
	//LogLevelOff log level off.
	LogLevelOff LogLevel = 3
)

type Notice

type Notice func(data []byte)

Notice notice.

Jump to

Keyboard shortcuts

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