ws

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ActionMap = map[string]Action{}

Functions

func Handler

func Handler(ctx context.Context, req *Req, reply func(ctx context.Context, ret any, err error))

func RegAction

func RegAction(name string, action Action)

Types

type Action

type Action func(ctx context.Context, req *Req, reply func(ctx context.Context, ret any, err error))

type Req

type Req struct {
	Id     string
	Action string
	Params *gjson.Json
	User   *User
}

type User

type User struct {
	Id            string
	ConnectAt     *gtime.Time
	User          string
	RedisId       int
	RedisClient   *redis.Client
	LocalListener net.Listener
}

Jump to

Keyboard shortcuts

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