message

package
v1.10.6 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Read

func Read(c net.Conn, sc ...int) (v any, err error)

func ReadL

func ReadL(c net.Conn, ls ...log.L) (v any, ne bool)

func ReadRaw

func ReadRaw(c net.Conn, sc ...int) (byte, []byte, error)

func Write

func Write(c net.Conn, msg any, sc ...int) error

func WriteL

func WriteL(c net.Conn, msg any, ls ...log.L) bool

Types

type Close

type Close struct {
	Reason string `json:"reason,omitempty"`
}

type CloseTaskReq

type CloseTaskReq struct {
	Tid string `json:"tid,omitempty"`
}

type CloseTaskResp

type CloseTaskResp struct {
}

type ConnectTaskReq

type ConnectTaskReq struct {
	Wid string `json:"wid,omitempty"`
	Tid string `json:"tid,omitempty"`

	Task
}

type ConnectTaskResp

type ConnectTaskResp struct {
	Sid string `json:"sid,omitempty"`

	Task
	Error
}

type CreateTaskReq

type CreateTaskReq struct {
	Tid string `json:"tid,omitempty"`
	Sid string `json:"sid,omitempty"`

	Task
}

type CreateTaskResp

type CreateTaskResp struct {
	Sid string `json:"sid,omitempty"`

	Error
}

type Data

type Data struct {
}

type Error

type Error struct {
	Error string `json:"error,omitempty"`
}

func NewError

func NewError(v string, a ...any) Error

func (Error) GetError

func (err Error) GetError() string

type LoginReq

type LoginReq struct {
	Ver string `json:"ver,omitempty"`
	Key string `json:"key,omitempty"`

	GO       string `json:"go,omitempty"`
	OS       string `json:"os,omitempty"`
	ARCH     string `json:"arch,omitempty"`
	Hostname string `json:"hostname,omitempty"`
}

type LoginResp

type LoginResp struct {
	Ver string `json:"ver,omitempty"`

	Error
}

type OK

type OK struct {
}

type StopService added in v1.3.0

type StopService struct {
	Cid uint
}

type StopServiceReq added in v1.3.0

type StopServiceReq struct {
}

type StopServiceResp added in v1.3.0

type StopServiceResp struct {
	Error
}

type Task

type Task struct {
	Id       uint   `json:"id,omitempty"`
	Name     string `json:"name,omitempty"`
	Addr     string `json:"addr,omitempty"`
	Secret   string `json:"secret,omitempty"`
	Compress bool   `json:"compress,omitempty"`
}

func NewTask

func NewTask(id uint, name, addr string, compress bool) Task

func NewTaskSecret

func NewTaskSecret(secret string) Task

type UninstallService added in v1.3.0

type UninstallService struct {
	Cid uint
}

type UninstallServiceReq added in v1.3.0

type UninstallServiceReq struct {
}

type UninstallServiceResp added in v1.3.0

type UninstallServiceResp struct {
	Error
}

type WorkReq

type WorkReq struct {
}

type WorkResp

type WorkResp struct {
	Wid string `json:"wid,omitempty"`

	Error
}

Jump to

Keyboard shortcuts

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