svc

package
v0.0.0-...-d80f745 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CounterSvc

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

func NewCounterSvc

func NewCounterSvc(ctx *ServiceContext, repo *repo.Repo, cache *redis.Redis) *CounterSvc

func (*CounterSvc) AddRecord

新增计数记录

func (*CounterSvc) BatchGetRecord

func (s *CounterSvc) BatchGetRecord(ctx context.Context, uidOids map[uint64][]uint64, biz int) (
	map[uint64][]*counterv1.Record, error)

func (*CounterSvc) BatchGetSummary

批量获取某个oid的计数

func (*CounterSvc) CancelRecord

取消计数记录

func (*CounterSvc) GetRecord

func (*CounterSvc) GetSummary

获取某个oid的计数

func (*CounterSvc) SyncCacheSummary

func (s *CounterSvc) SyncCacheSummary(ctx context.Context) error

同步增量数据到数据库

func (*CounterSvc) SyncSummaryFromRecords

func (s *CounterSvc) SyncSummaryFromRecords(ctx context.Context) error

全表扫描 从record表更新summary的数据

type ServiceContext

type ServiceContext struct {
	Config    *config.Config
	RecordSvc *CounterSvc
}

func NewServiceContext

func NewServiceContext(c *config.Config) *ServiceContext

初始化一个service

Jump to

Keyboard shortcuts

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