val

package
v0.0.0-...-9aa6477 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

*

  • @Author: kwens *
  • @Date: 2023-06-05 15:58:45
  • @Description:

Index

Constants

View Source
const DefalutSubName = "defaultSubscriber"
View Source
const (
	DefaultMaxQueue = 1000
)

Variables

View Source
var (
	EventCtxKey = struct{}{}
	TraceIDKey  = struct{}{}
)

Functions

This section is empty.

Types

type EventCallBack

type EventCallBack func(context.Context, interface{}) error

type PubInfo

type PubInfo struct {
	EventID   string      `json:"EventId"`   // 事件id
	EventName string      `json:"EventName"` // 事件名称
	Data      interface{} `json:"Data"`      // 数据
}

type SendMode

type SendMode int
const (
	DefaultSend SendMode = iota // 默认发送模式,本地&远程
	OnlyLocal
	OnlyRemote
)

type SubInfo

type SubInfo struct {
	EventName string
	SubName   string
	Exec      EventCallBack
}

Jump to

Keyboard shortcuts

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