ext

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CALL_ID = "call_id"
	CALL    = "call"
	LLAC    = "llac"
)

请求

View Source
const (
	PARAMS    = "params"
	CODE      = "code"
	ERROR     = "error"
	DATA      = "data"
	DATA_SIZE = "data_size"
)

请求相关

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseToken

type BaseToken struct {
	// contains filtered or unexported fields
}

func (*BaseToken) Error

func (b *BaseToken) Error() error

func (*BaseToken) Wait

func (b *BaseToken) Wait() bool

func (*BaseToken) WaitTimeout

func (b *BaseToken) WaitTimeout(d time.Duration) bool

type CallToken

type CallToken struct {
	// contains filtered or unexported fields
}

func (*CallToken) Error

func (b *CallToken) Error() error

func (*CallToken) Message

func (c *CallToken) Message() nson.Message

func (*CallToken) Wait

func (b *CallToken) Wait() bool

func (*CallToken) WaitTimeout

func (b *CallToken) WaitTimeout(d time.Duration) bool

type MqttCall

type MqttCall struct {
	// contains filtered or unexported fields
}

func NewMqttCall

func NewMqttCall(zaplog *zap.Logger) *MqttCall

func (*MqttCall) Call

func (m *MqttCall) Call(clientID, ch string, data nson.Message, timeout time.Duration) (nson.Message, error)

func (*MqttCall) Hooks

func (m *MqttCall) Hooks() mqtt.Hooks

func (*MqttCall) Llac

func (m *MqttCall) Llac(ch string, callback func(nson.Message) nson.Message) error

func (*MqttCall) Load

func (m *MqttCall) Load(server mqtt.Server) error

func (*MqttCall) Name

func (m *MqttCall) Name() string

func (*MqttCall) Unload

func (m *MqttCall) Unload() error

type MqttLlac

type MqttLlac struct {
	// contains filtered or unexported fields
}

func NewMqttLlac

func NewMqttLlac(client mqtt.Client, zaplog *zap.Logger) *MqttLlac

func (*MqttLlac) Call

func (m *MqttLlac) Call(ch string, data nson.Message, timeout time.Duration) (nson.Message, error)

func (*MqttLlac) Llac

func (m *MqttLlac) Llac(ch string, callback func(nson.Message) nson.Message) error

Jump to

Keyboard shortcuts

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