service

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2021 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Connect

func Connect(c *gin.Context)

func Healz

func Healz(c *gin.Context)

func SendMessage

func SendMessage(c *gin.Context)

Types

type Client

type Client struct {
	ClientID string
	// contains filtered or unexported fields
}

func (*Client) Close

func (m *Client) Close() error

func (*Client) HealthCheck

func (m *Client) HealthCheck() (isAlive bool)

func (*Client) Listen

func (m *Client) Listen()

Listen 监听客户端发来的消息, 这里用于收心跳

func (*Client) Send

func (m *Client) Send(data []byte, client string) error

func (*Client) SendMessage

func (m *Client) SendMessage(message interface{}) error

type Group

type Group struct {
	GroupID string
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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