counter

package
v0.14.4 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	FilterSkillName = config.TypeName(reflect.TypeOf((*IClient)(nil)).Elem())
)

Functions

func GetRemainCount

func GetRemainCount(client IClient, key string, count int64, variables map[string]string) (int64, error)

Types

type IClient

type IClient interface {
	Get(variables map[string]string) (int64, error)
}

type ICountPusher added in v0.14.4

type ICountPusher interface {
	Push(key string, count int64, variables map[string]string) error
}

type ICounter

type ICounter interface {
	// Lock 锁定次数
	Lock(count int64) error
	// Complete 完成扣次操作
	Complete(count int64) error
	// RollBack 回滚
	RollBack(count int64) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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