commRedisRpc

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2026 License: GPL-3.0 Imports: 6 Imported by: 3

README

功能说明

Fox-Edge的各个微服务之间是基于Redis进行互相通信的,commRedisRpc对这种互相通信,进行了初级的包装。

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Channel *channel // 通道服务
	Device  *device  // 设备服务
	Persist *persist // 持久化服务
	Manager *manager // 管理服务
	Type    voType
)

Functions

This section is empty.

Types

type ChannelRequestVO

type ChannelRequestVO struct {
	Type    string      `json:"type"`
	Uuid    string      `json:"uuid"`
	Name    string      `json:"name"`
	Mode    string      `json:"mode"`
	Send    interface{} `json:"send"`
	Recv    interface{} `json:"recv"`
	Timeout int         `json:"timeout"`
}

type ChannelRespondVO

type ChannelRespondVO struct {
	Type    string      `json:"type"`
	Uuid    string      `json:"uuid"`
	Name    string      `json:"name"`
	Mode    string      `json:"mode"`
	Send    interface{} `json:"send"`
	Recv    interface{} `json:"recv"`
	Timeout int         `json:"timeout"`
	Msg     string      `json:"msg"`
	Code    int         `json:"code"`
}

func (*ChannelRespondVO) BindRequestVO

func (e *ChannelRespondVO) BindRequestVO(vo *ChannelRequestVO)

func (*ChannelRespondVO) Error

func (e *ChannelRespondVO) Error(requestVO *ChannelRequestVO, msg string) *ChannelRespondVO

func (*ChannelRespondVO) New

func (*ChannelRespondVO) Ok

type OperateRequestVO

type OperateRequestVO struct {
	Uuid         string                 `json:"uuid"`
	OperateMode  string                 `json:"operateMode"`
	OperateName  string                 `json:"operateName"`
	Manufacturer string                 `json:"manufacturer"`
	DeviceType   string                 `json:"deviceType"`
	DeviceName   string                 `json:"deviceName"`
	Param        map[string]interface{} `json:"param"`
	Timeout      int                    `json:"timeout"`
	Record       bool                   `json:"record"`
}

func (*OperateRequestVO) BindRequestMap

func (e *OperateRequestVO) BindRequestMap(data map[string]interface{})

func (*OperateRequestVO) New

type OperateRespondVO

type OperateRespondVO struct {
	Uuid         string                 `json:"uuid"`
	OperateMode  string                 `json:"operateMode"`
	OperateName  string                 `json:"operateName"`
	Manufacturer string                 `json:"manufacturer"`
	DeviceType   string                 `json:"deviceType"`
	DeviceName   string                 `json:"deviceName"`
	Param        map[string]interface{} `json:"param"`
	Timeout      int                    `json:"timeout"`
	Record       bool                   `json:"record"`
	Data         map[string]interface{} `json:"data"`
	Msg          string                 `json:"msg"`
	Code         int                    `json:"code"`
}

func (*OperateRespondVO) BindRequestVO

func (e *OperateRespondVO) BindRequestVO(vo *OperateRequestVO)

func (*OperateRespondVO) BindRespondMap

func (e *OperateRespondVO) BindRespondMap(data map[string]interface{})

func (*OperateRespondVO) BindRespondVO

func (e *OperateRespondVO) BindRespondVO(vo *OperateRespondVO)

type RestFulRequestVO

type RestFulRequestVO struct {
	Uuid   string            `json:"uuid"`
	Method string            `json:"method"`
	Uri    string            `json:"uri"`
	Header map[string]string `json:"header"`
	Data   interface{}       `json:"data"`
}

func (*RestFulRequestVO) New added in v1.0.1

type RestFulRespondVO

type RestFulRespondVO struct {
	Uuid   string            `json:"uuid"`
	Method string            `json:"method"`
	Uri    string            `json:"uri"`
	Header map[string]string `json:"header"`
	Data   interface{}       `json:"data"`
	Msg    string            `json:"msg"`
	Code   int               `json:"code"`
}

func (*RestFulRespondVO) BindRequestVO

func (e *RestFulRespondVO) BindRequestVO(vo *RestFulRequestVO)

func (*RestFulRespondVO) BindRespondVO

func (e *RestFulRespondVO) BindRespondVO(vo *RestFulRequestVO)

type TaskRequestVO

type TaskRequestVO struct {
	Uuid       string              `json:"uuid"`
	ClientName string              `json:"clientName"`
	Timeout    int                 `json:"timeout"`
	RequestVOS []*OperateRequestVO `json:"requestVOS"`
}

func (*TaskRequestVO) New added in v1.0.1

func (e *TaskRequestVO) New() *TaskRequestVO

type TaskRespondVO

type TaskRespondVO struct {
	Uuid       string              `json:"uuid"`
	ClientName string              `json:"clientName"`
	Timeout    int                 `json:"timeout"`
	RespondVOS []*OperateRespondVO `json:"respondVOS"`
	Msg        string              `json:"msg"`
	Code       int                 `json:"code"`
}

func (*TaskRespondVO) BuildRespondVO

func (e *TaskRespondVO) BuildRespondVO(operateRespondVO *OperateRespondVO, clientName string) *TaskRespondVO

func (*TaskRespondVO) New

func (e *TaskRespondVO) New() *TaskRespondVO

Jump to

Keyboard shortcuts

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