biz

package
v1.1.44 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2024 License: MIT Imports: 17 Imported by: 0

README

Biz

Documentation

Index

Constants

This section is empty.

Variables

ProviderSetBiz is biz providers.

Functions

This section is empty.

Types

type Config

type Config struct {
	Receivers *sync.Map `json:"receivers"`
	Templates *sync.Map `json:"templates"`
}

Config 配置数据

func GetConfigData

func GetConfigData() *Config

GetConfigData 获取配置数据

func (*Config) GetReceivers

func (l *Config) GetReceivers(route string) (*conf.Receiver, bool)

GetReceivers 获取接收人

func (*Config) GetTemplates

func (l *Config) GetTemplates(temp string) string

GetTemplates 获取模板

func (*Config) Set

func (l *Config) Set(_ context.Context, params *bo.CacheConfigParams)

Set 设置接收人

type ConfigBiz

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

ConfigBiz 配置业务

func NewConfigBiz

func NewConfigBiz(c *rabbitconf.Bootstrap) *ConfigBiz

NewConfigBiz 创建配置业务

func (*ConfigBiz) CacheConfig

func (b *ConfigBiz) CacheConfig(ctx context.Context, params *bo.CacheConfigParams)

CacheConfig 缓存配置

func (*ConfigBiz) LoadConfig

func (b *ConfigBiz) LoadConfig(ctx context.Context)

LoadConfig 加载配置

type HeartbeatBiz added in v1.1.0

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

HeartbeatBiz 心跳包业务对象

func NewHeartbeatBiz added in v1.1.0

func NewHeartbeatBiz(heartbeatRepository repository.Heartbeat) *HeartbeatBiz

NewHeartbeatBiz 创建心跳包业务对象

func (*HeartbeatBiz) Heartbeat added in v1.1.0

func (b *HeartbeatBiz) Heartbeat(ctx context.Context, in *api.HeartbeatRequest) error

Heartbeat 心跳包

type MsgBiz

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

MsgBiz 消息业务

func NewMsgBiz

func NewMsgBiz(c *rabbitconf.Bootstrap, data *data.Data) *MsgBiz

NewMsgBiz 创建消息业务

func (*MsgBiz) SendMsg

func (b *MsgBiz) SendMsg(ctx context.Context, msg *bo.SendMsgParams) error

SendMsg 发送消息 TODO 标记后续改造发送通知

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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