Documentation
¶
Index ¶
- Variables
- func NewBusRepo(logger log.Logger, db *ent.Client, rc redis.Cmdable) biz.BusRepo
- func NewConfig(ai *conf.AppInfo) (config.Config, func(), error)
- func NewConfigBootstrap(c config.Config) (*conf.Bootstrap, error)
- func NewEntClient(conf *conf.Bootstrap, m *Metric, l log.Logger) (*ent.Client, func(), error)
- func NewEventRepo(logger log.Logger, db *ent.Client, sender Sender, m *Metric, rc redis.Cmdable, ...) biz.EventRepo
- func NewLogger(ai *conf.AppInfo, cfg *conf.Bootstrap) (log.Logger, func(), error)
- func NewRedisCmd(conf *conf.Bootstrap, m *Metric, l log.Logger) (redis.Cmdable, func(), error)
- func NewReflector(logger log.Logger, db *ent.Client) (informer.Reflector, error)
- func NewRegistrar(_ *conf.Bootstrap) (registry.Registrar, error)
- func NewRuleRepo(logger log.Logger, db *ent.Client) biz.RuleRepo
- func NewSchemaLocalCache() *cache.Cache
- func NewTracerProvider(ai *conf.AppInfo, conf *conf.Bootstrap, l log.Logger) (trace.TracerProvider, func(), error)
- func SetCacheSchema(ctx context.Context, rc redis.Cmdable, source string, sType string, ...) error
- type MQProducer
- type Metric
- type RedisMetricHook
- type RedisMetricsOption
- type Sender
Constants ¶
This section is empty.
Variables ¶
View Source
var ProviderSet = wire.NewSet( NewLogger, NewConfig, NewConfigBootstrap, NewRegistrar, NewMetric, NewTracerProvider, NewEntClient, NewRedisCmd, NewSchemaLocalCache, NewReflector, NewSender, NewBusRepo, NewEventRepo, NewRuleRepo, )
ProviderSet is data providers.
Functions ¶
func NewEntClient ¶
func NewEventRepo ¶
func NewRedisCmd ¶
func NewReflector ¶
func NewSchemaLocalCache ¶
func NewTracerProvider ¶
Types ¶
type MQProducer ¶
type MQProducer interface {
Send(
ctx context.Context, topic string, mode v1.BusWorkMode, eventExt *rule.EventExt, pubTime *timestamppb.Timestamp,
) (string, error)
io.Closer
}
func NewRocketMQProducer ¶
func NewRocketMQProducer(endpoints, topic string) (MQProducer, error)
type Metric ¶
type Metric struct {
CacheHits metric.Int64Counter
CacheMisses metric.Int64Counter
CacheDurationSec metric.Float64Histogram
CodeTotal metric.Int64Counter
DurationSec metric.Float64Histogram
DbDurationSec metric.Float64Histogram
PostEventCount metric.Int64Counter
PostEventDurationSec metric.Float64Histogram
}
type RedisMetricHook ¶
type RedisMetricHook struct {
// contains filtered or unexported fields
}
func NewRedisMetricHook ¶
func NewRedisMetricHook(opts ...RedisMetricsOption) *RedisMetricHook
func (*RedisMetricHook) DialHook ¶
func (rmh *RedisMetricHook) DialHook(next redis.DialHook) redis.DialHook
func (*RedisMetricHook) ProcessHook ¶
func (rmh *RedisMetricHook) ProcessHook(next redis.ProcessHook) redis.ProcessHook
func (*RedisMetricHook) ProcessPipelineHook ¶
func (rmh *RedisMetricHook) ProcessPipelineHook(next redis.ProcessPipelineHook) redis.ProcessPipelineHook
type RedisMetricsOption ¶
type RedisMetricsOption func(*redisMetricsOptions)
RedisMetricsOption is a metrics option.
func WithRedisEndpointAddr ¶
func WithRedisEndpointAddr(addrs ...string) RedisMetricsOption
WithRedisEndpointAddr with db Addr.
func WithRedisRequestsDuration ¶
func WithRedisRequestsDuration(c metric.Float64Histogram) RedisMetricsOption
WithRedisRequestsDuration with requests duration(s).
Source Files
¶
Click to show internal directories.
Click to hide internal directories.