Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var GetShortCodeScript string
Functions ¶
This section is empty.
Types ¶
type CInter ¶
type CInter interface { // Count 短码池中的预生成短码数量 Count(ctx context.Context) (int64, error) // GetShortCode 从短码池中获取一个预生成短码 GetShortCode(ctx context.Context) (string, error) // InsertShortCode 向短码池中新增一条预生成短码 InsertShortCode(ctx context.Context, code string) error // BatchInsertShortCodes 批量向短码池中增加多条预生成短码 BatchInsertShortCodes(ctx context.Context, codes []string) error }
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
func (*Cache) BatchInsertShortCodes ¶
func (*Cache) GetShortCode ¶
GetShortCode 查询短码数量、获取一条可用的预生成短码、更新短码数量
Click to show internal directories.
Click to hide internal directories.