kafka_nervous

package
v0.0.0-...-5fda629 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2022 License: MulanPSL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const RequestTopicPrefix = "REQ"
View Source
const ResponseTopicPrefix = "RES"
View Source
const TryInterval = 500
View Source
const TryTime = 5

Variables

This section is empty.

Functions

func GenerateRequestTopic

func GenerateRequestTopic(guid string) string

func GenerateResponseTopic

func GenerateResponseTopic(guid string) string

func NewNervous

func NewNervous(ctx context.Context, configAddress string, guid string) (Ng.Controller, error)

初始化总线 @param 上下文,配置文件目录,全局id @return 总线指针,错误

func ReadJsonFile

func ReadJsonFile(address string) (map[string]interface{}, error)

Types

type BaseInfo

type BaseInfo struct {
	SourceGuid string `json:"source_guid"`
	TargetGuid string `json:"target_guid"`
}

type MethodInfo

type MethodInfo struct {
	BaseInfo
	RegisterName string        `json:"register_name"`
	ParamArray   []interface{} `json:"param_array"`
}

func (*MethodInfo) FromJson

func (m *MethodInfo) FromJson(jsonStr string) error

func (*MethodInfo) ToJson

func (m *MethodInfo) ToJson() (string, error)

type ReturnInfo

type ReturnInfo struct {
	BaseInfo
	Status      int         `json:"status"`
	ReturnValue interface{} `json:"return_value"`
}

func (*ReturnInfo) FromJson

func (r *ReturnInfo) FromJson(jsonStr string) error

func (*ReturnInfo) ToJson

func (r *ReturnInfo) ToJson() (string, error)

Jump to

Keyboard shortcuts

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