Documentation ¶
Index ¶
- Variables
- func GenBizDatabaseName(teamID uint32) string
- type Data
- func (d *Data) CreateBizAlarmDatabase(teamID uint32) error
- func (d *Data) CreateBizDatabase(teamID uint32) error
- func (d *Data) GetAlarmGormDB(teamID uint32) (*gorm.DB, error)
- func (d *Data) GetAlertConsumerStorage() watch.Storage
- func (d *Data) GetAlertPersistenceDBQueue() watch.Queue
- func (d *Data) GetAlertQueue() watch.Queue
- func (d *Data) GetBizDB(_ context.Context) *sql.DB
- func (d *Data) GetBizGormDB(teamID uint32) (*gorm.DB, error)
- func (d *Data) GetBizGormDBByName(databaseName string) (*gorm.DB, error)
- func (d *Data) GetCacher() cache.ICacher
- func (d *Data) GetCasBin(teamID uint32, tx ...*gorm.DB) *casbin.SyncedEnforcer
- func (d *Data) GetCasbinByTx(tx *gorm.DB) *casbin.SyncedEnforcer
- func (d *Data) GetEmail() email.Interface
- func (d *Data) GetFileLimitSize() map[string]*conf.FileLimit
- func (d *Data) GetMainDB(ctx context.Context) *gorm.DB
- func (d *Data) GetOssCli() oss.Client
- func (d *Data) GetStrategyQueue() watch.Queue
- func (d *Data) OssIsOpen() bool
- type HouYiConn
- func (l *HouYiConn) GetServerList() (*api.GetServerListReply, error)
- func (l *HouYiConn) Health(ctx context.Context, req *api.CheckRequest) (*api.CheckReply, error)
- func (l *HouYiConn) Heartbeat(_ context.Context, req *api.HeartbeatRequest) error
- func (l *HouYiConn) PushStrategy(ctx context.Context, in *strategyapi.PushStrategyRequest, ...) (*strategyapi.PushStrategyReply, error)
- func (l *HouYiConn) Query(ctx context.Context, in *metadataapi.QueryRequest, opts ...microserver.Option) (*metadataapi.QueryReply, error)
- func (l *HouYiConn) Sync(ctx context.Context, in *metadataapi.SyncMetadataRequest, ...) (*metadataapi.SyncMetadataReply, error)
- func (l *HouYiConn) SyncV2(ctx context.Context, in *metadataapi.SyncMetadataV2Request, ...) (*metadataapi.SyncMetadataV2Reply, error)
- type RabbitConn
- func (l *RabbitConn) GetServerList() (*api.GetServerListReply, error)
- func (l *RabbitConn) Heartbeat(_ context.Context, req *api.HeartbeatRequest) error
- func (l *RabbitConn) NotifyObject(ctx context.Context, in *pushapi.NotifyObjectRequest, ...) error
- func (l *RabbitConn) SendMsg(ctx context.Context, in *hookapi.SendMsgRequest, opts ...microserver.Option) error
- func (l *RabbitConn) SyncTeam(ctx context.Context, teamID uint32, srvs ...*Srv) error
- type Srv
- type SrvList
Constants ¶
This section is empty.
Variables ¶
View Source
var ProviderSetData = wire.NewSet(NewData)
ProviderSetData is data providers.
View Source
var ProviderSetRPCConn = wire.NewSet( NewHouYiConn, NewRabbitRPCConn, )
ProviderSetRPCConn wire set
Functions ¶
Types ¶
type Data ¶
type Data struct {
// contains filtered or unexported fields
}
Data .
func (*Data) CreateBizAlarmDatabase ¶ added in v1.1.0
CreateBizAlarmDatabase 创建告警历史业务库
func (*Data) CreateBizDatabase ¶ added in v1.1.0
CreateBizDatabase 创建业务库
func (*Data) GetAlarmGormDB ¶
GetAlarmGormDB 获取告警库连接
func (*Data) GetAlertConsumerStorage ¶ added in v1.1.0
GetAlertConsumerStorage 获取告警持久化存储
func (*Data) GetAlertPersistenceDBQueue ¶ added in v1.1.0
GetAlertPersistenceDBQueue 获取持久化队列
func (*Data) GetBizGormDB ¶
GetBizGormDB 获取业务库连接
func (*Data) GetBizGormDBByName ¶ added in v1.1.0
GetBizGormDBByName 获取业务库连接
func (*Data) GetCasbinByTx ¶ added in v1.1.0
GetCasbinByTx 获取casbin
func (*Data) GetFileLimitSize ¶ added in v1.1.0
GetFileLimitSize 获取文件大小限制配置
func (*Data) GetStrategyQueue ¶
GetStrategyQueue 获取策略队列
type HouYiConn ¶ added in v1.1.0
type HouYiConn struct {
// contains filtered or unexported fields
}
HouYiConn HouYi服务连接
func NewHouYiConn ¶ added in v1.1.0
func NewHouYiConn(c *palaceconf.Bootstrap, data *Data) (*HouYiConn, func(), error)
NewHouYiConn 创建一个HouYi rpc连接
func (*HouYiConn) GetServerList ¶ added in v1.1.29
func (l *HouYiConn) GetServerList() (*api.GetServerListReply, error)
GetServerList 获取houyi服务列表
func (*HouYiConn) Health ¶ added in v1.1.0
func (l *HouYiConn) Health(ctx context.Context, req *api.CheckRequest) (*api.CheckReply, error)
Health 健康检查
func (*HouYiConn) PushStrategy ¶ added in v1.1.0
func (l *HouYiConn) PushStrategy(ctx context.Context, in *strategyapi.PushStrategyRequest, opts ...microserver.Option) (*strategyapi.PushStrategyReply, error)
PushStrategy 推送策略
func (*HouYiConn) Query ¶ added in v1.1.0
func (l *HouYiConn) Query(ctx context.Context, in *metadataapi.QueryRequest, opts ...microserver.Option) (*metadataapi.QueryReply, error)
Query 查询数据
func (*HouYiConn) Sync ¶ added in v1.1.0
func (l *HouYiConn) Sync(ctx context.Context, in *metadataapi.SyncMetadataRequest, opts ...microserver.Option) (*metadataapi.SyncMetadataReply, error)
Sync 同步数据
func (*HouYiConn) SyncV2 ¶ added in v1.1.0
func (l *HouYiConn) SyncV2(ctx context.Context, in *metadataapi.SyncMetadataV2Request, opts ...microserver.Option) (*metadataapi.SyncMetadataV2Reply, error)
SyncV2 同步数据
type RabbitConn ¶ added in v1.1.0
type RabbitConn struct {
// contains filtered or unexported fields
}
RabbitConn rabbit服务连接
func NewRabbitRPCConn ¶ added in v1.1.0
func NewRabbitRPCConn(c *palaceconf.Bootstrap, data *Data) (*RabbitConn, error)
NewRabbitRPCConn 创建一个rabbit rpc连接
func (*RabbitConn) GetServerList ¶ added in v1.1.29
func (l *RabbitConn) GetServerList() (*api.GetServerListReply, error)
GetServerList 获取rabbit服务列表
func (*RabbitConn) Heartbeat ¶ added in v1.1.0
func (l *RabbitConn) Heartbeat(_ context.Context, req *api.HeartbeatRequest) error
Heartbeat 心跳
func (*RabbitConn) NotifyObject ¶ added in v1.1.0
func (l *RabbitConn) NotifyObject(ctx context.Context, in *pushapi.NotifyObjectRequest, opts ...microserver.Option) error
NotifyObject 发送通道配置
func (*RabbitConn) SendMsg ¶ added in v1.1.0
func (l *RabbitConn) SendMsg(ctx context.Context, in *hookapi.SendMsgRequest, opts ...microserver.Option) error
SendMsg 发送消息
Click to show internal directories.
Click to hide internal directories.