util

package
v0.12.0-rc8 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2019 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AtomicLock

type AtomicLock int32

func (*AtomicLock) AcquireLock

func (l *AtomicLock) AcquireLock() bool

func (*AtomicLock) IsLocked

func (l *AtomicLock) IsLocked() bool

func (*AtomicLock) Unlock

func (l *AtomicLock) Unlock()

type Snowflake

type Snowflake = snowflake.Snowflake

func GetSnowflake

func GetSnowflake(v interface{}) (Snowflake, error)

GetSnowflake see snowflake.GetSnowflake

func NewSnowflake

func NewSnowflake(id uint64) Snowflake

NewSnowflake see snowflake.NewSnowflake

func ParseSnowflakeString

func ParseSnowflakeString(v string) Snowflake

ParseSnowflakeString see snowflake.ParseSnowflakeString

type Ticket

type Ticket int
const (
	NoTicket Ticket = -1
)

type TicketQueue

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

func (*TicketQueue) Delete

func (q *TicketQueue) Delete(ticket Ticket)

func (*TicketQueue) NewTicket

func (q *TicketQueue) NewTicket() (ticket Ticket)

func (*TicketQueue) Next

func (q *TicketQueue) Next(ticket Ticket, cb func() bool) bool

Jump to

Keyboard shortcuts

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