增加基于内存的事件发送
This commit is contained in:
25
define/memory.go
Normal file
25
define/memory.go
Normal file
@ -0,0 +1,25 @@
|
||||
// Package define ...
|
||||
//
|
||||
// Description : define ...
|
||||
//
|
||||
// Author : go_developer@163.com<白茶清欢>
|
||||
//
|
||||
// Date : 2024-07-17 11:25
|
||||
package define
|
||||
|
||||
const (
|
||||
DefaultMemoryPartitionNum = 1 // 默认的分区数量
|
||||
DefaultMemoryChannelSize = 1024 // 默认的消息channel大小
|
||||
DefaultMemoryCloseMaxWaitTime = 5000 // 默认最大等待 : 5s
|
||||
)
|
||||
|
||||
// MemoryEventConfig 内存事件的配置
|
||||
//
|
||||
// Author : go_developer@163.com<白茶清欢>
|
||||
//
|
||||
// Date : 11:26 2024/7/17
|
||||
type MemoryEventConfig struct {
|
||||
PartitionNum int `json:"partition_num"` // 多少个分区, 默认值 : 1
|
||||
MessageBufferSize int `json:"message_buffer_size"` // 消息缓冲区大小
|
||||
CloseMaxWaitTime int `json:"close_max_wait_time"` // 关闭消息实例, 最大等待时长, 单位 : ms
|
||||
}
|
Reference in New Issue
Block a user