lang

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package lang Create on 2023/6/25 @author xuzhuoxi

Package lang Created by xuzhuoxi on 2019-03-21. @author xuzhuoxi

Package lang Created by xuzhuoxi on 2019-03-23. @author xuzhuoxi

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Equal

func Equal(a, b interface{}) bool

func TypeEqual

func TypeEqual(a, b interface{}) (bool, reflect.Type)

Types

type Callback added in v1.0.4

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

func NewCallback added in v1.0.4

func NewCallback(call FuncCallback, args ...interface{}) *Callback

func (*Callback) Apply added in v1.0.4

func (c *Callback) Apply(args ...interface{})

func (*Callback) Clear added in v1.0.4

func (c *Callback) Clear()

func (*Callback) Invoke added in v1.0.4

func (c *Callback) Invoke()

func (*Callback) SetArgs added in v1.0.4

func (c *Callback) SetArgs(args ...interface{})

func (*Callback) SetCall added in v1.0.4

func (c *Callback) SetCall(call FuncCallback)

type ChannelLimit

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

func (*ChannelLimit) Add

func (l *ChannelLimit) Add()

func (*ChannelLimit) Done

func (l *ChannelLimit) Done()

func (*ChannelLimit) SetMax

func (l *ChannelLimit) SetMax(max int)

func (*ChannelLimit) StartLimit

func (l *ChannelLimit) StartLimit() bool

func (*ChannelLimit) StopLimit

func (l *ChannelLimit) StopLimit() bool

type ChannelLimitNone

type ChannelLimitNone struct{}

func (*ChannelLimitNone) Add

func (l *ChannelLimitNone) Add()

func (*ChannelLimitNone) Done

func (l *ChannelLimitNone) Done()

func (*ChannelLimitNone) SetMax

func (l *ChannelLimitNone) SetMax(max int)

func (*ChannelLimitNone) StartLimit

func (l *ChannelLimitNone) StartLimit() bool

func (*ChannelLimitNone) StopLimit

func (l *ChannelLimitNone) StopLimit() bool

type FuncCallback added in v1.0.4

type FuncCallback = func(...interface{})

type IChannelLimitHandler

type IChannelLimitHandler interface {
	Add()
	Done()
}

type IChannelLimitSwitch

type IChannelLimitSwitch interface {
	StartLimit() bool
	StopLimit() bool
}

type IObjectPool

type IObjectPool interface {
	Register(newFunc func() interface{}, check PoolCheckFunc)
	GetInstance() interface{}
	Recycle(instance interface{}) bool
}

func NewObjectPool

func NewObjectPool(sync bool) IObjectPool

func NewObjectPoolAsync

func NewObjectPoolAsync() IObjectPool

func NewObjectPoolSync

func NewObjectPoolSync() IObjectPool

func NewSizeObjectPool

func NewSizeObjectPool(size int, sync bool) IObjectPool

type IPoolInstanceChecker

type IPoolInstanceChecker interface {
	SetCheckFunc(check PoolCheckFunc)
}

type ISizeObjectPool

type ISizeObjectPool interface {
	SetMaxSize(size int)
	IObjectPool
}

func NewSizeObjectPoolAsync

func NewSizeObjectPoolAsync(size int) ISizeObjectPool

func NewSizeObjectPoolSync

func NewSizeObjectPoolSync(size int) ISizeObjectPool

type LChannelLimitMaxSetter

type LChannelLimitMaxSetter interface {
	SetMax(max int)
}

type PoolCheckFunc

type PoolCheckFunc func(instance interface{}) bool

Directories

Path Synopsis
Package listx Created by xuzhuoxi on 2019-04-03.
Package listx Created by xuzhuoxi on 2019-04-03.

Jump to

Keyboard shortcuts

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