edge

package
v0.3.5 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Broker *engine.Engine

Functions

func AsyncPostProducerMessage added in v0.3.5

func AsyncPostProducerMessage(c *fastapi.Context) *fastapi.Response

AsyncPostProducerMessage 异步生产消息

func NewApp added in v0.3.5

func NewApp(conf *fastapi.Config, broker *engine.Engine) *fastapi.FastApi

func PostProducerMessage added in v0.3.5

func PostProducerMessage(c *fastapi.Context) *fastapi.Response

PostProducerMessage 同步发送消息

func Router

func Router() *fastapi.Router

Router edge路由组

Types

type ProducerForm added in v0.3.5

type ProducerForm struct {
	fastapi.BaseModel
	Token string `json:"token,omitempty" description:"认证密钥"`
	Topic string `json:"topic" description:"消息主题"`
	Key   string `json:"key" description:"消息键"`
	Value string `json:"value" description:"base64编码后的消息体"`
}

func (*ProducerForm) IsEncrypt added in v0.3.5

func (m *ProducerForm) IsEncrypt() bool

func (*ProducerForm) SchemaDesc added in v0.3.5

func (m *ProducerForm) SchemaDesc() string

func (*ProducerForm) String added in v0.3.5

func (m *ProducerForm) String() string

type ProductResponse added in v0.3.5

type ProductResponse struct {
	fastapi.BaseModel
	// 仅当 Accepted 时才认为服务器接受了请求并下方了有效的参数
	Status       string `` /* 126-byte string literal not displayed */
	Offset       uint64 `json:"offset" description:"消息偏移量"`
	ResponseTime int64  `json:"response_time" description:"服务端返回消息时的时间戳"`
	Message      string `json:"message" description:"额外的消息描述"`
}

func (*ProductResponse) SchemaDesc added in v0.3.5

func (m *ProductResponse) SchemaDesc() string

func (*ProductResponse) String added in v0.3.5

func (m *ProductResponse) String() string

Jump to

Keyboard shortcuts

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