Documentation ¶
Index ¶
- Constants
- Variables
- func SetDefaultPregen(pregen uint64)
- type Carrage
- type CarrageConfig
- type Carrages
- func (cgs *Carrages) DropCarrage(serl uint64) (*CarrageConfig, error)
- func (cgs *Carrages) Fork(serl uint64) (*CarrageConfig, error)
- func (cgs *Carrages) Generate(serl uint64) (uint64, error)
- func (cgs *Carrages) GenerateByTimeNowUnix(serl uint64, tnu uint64) (uint64, error)
- func (cgs *Carrages) GetCarrageStatus(serl uint64) (*CarrageConfig, error)
- func (cgs *Carrages) GetSerialNumbers() []uint64
- func (cgs *Carrages) IsMaster() bool
- func (cgs *Carrages) Merge(serl uint64, cfg *CarrageConfig) error
- func (cgs *Carrages) NewCarrage(incr *util.Incrementer, name, profile string, tr uint, pg uint64) (uint64, error)
- func (cgs *Carrages) ReverseCarrage(serl uint64, cfg *CarrageConfig) error
- func (cgs *Carrages) SetMaster() error
- func (cgs *Carrages) Stop()
- func (cgs *Carrages) Wait()
- type Identity
- type IncrConfig
- type IncrsSortByCeiling
Constants ¶
View Source
const ( NOTHING uint64 = 0 //"无中生有" BUCKET_OF_CARRAGE string = "carrage" DEFAULT_PREGEN_FOR_NOTHING uint64 = 1 )
View Source
const ( GT_NORMAL = iota GT_TIMED GT_LOOP )
Variables ¶
Functions ¶
func SetDefaultPregen ¶
func SetDefaultPregen(pregen uint64)
Types ¶
type Carrage ¶
func (*Carrage) Fork ¶
func (crg *Carrage) Fork() (*CarrageConfig, error)
func (*Carrage) GenerateByTimeNowUnix ¶
func (*Carrage) Merge ¶
func (crg *Carrage) Merge(cfg *CarrageConfig) error
type CarrageConfig ¶
type CarrageConfig struct { Name string Profile string Tr uint Pregen uint64 Incrs []*IncrConfig }
type Carrages ¶
func NewCarrages ¶
func (*Carrages) DropCarrage ¶
func (cgs *Carrages) DropCarrage(serl uint64) (*CarrageConfig, error)
func (*Carrages) GenerateByTimeNowUnix ¶
func (*Carrages) GetCarrageStatus ¶
func (cgs *Carrages) GetCarrageStatus(serl uint64) (*CarrageConfig, error)
func (*Carrages) GetSerialNumbers ¶
func (*Carrages) NewCarrage ¶
func (*Carrages) ReverseCarrage ¶
func (cgs *Carrages) ReverseCarrage(serl uint64, cfg *CarrageConfig) error
type IncrConfig ¶
type IncrsSortByCeiling ¶
type IncrsSortByCeiling []*util.Incrementer
func (IncrsSortByCeiling) Len ¶
func (incrs IncrsSortByCeiling) Len() int
func (IncrsSortByCeiling) Less ¶
func (incrs IncrsSortByCeiling) Less(i, j int) bool
func (IncrsSortByCeiling) Swap ¶
func (incrs IncrsSortByCeiling) Swap(i, j int)
Click to show internal directories.
Click to hide internal directories.