Documentation ¶
Index ¶
- Constants
- func ContextLog(ctx context.Context, log *zap.SugaredLogger) *zap.SugaredLogger
- func GenerateNewID() int64
- func HandleTerminalSignal() chan struct{}
- func Mkdir(path string) error
- func NewApiContext(r *http.Request) context.Context
- func NewDateReader(reader io.Reader) io.ReadCloser
- func RandString(length int) (string, error)
- func RandStringRunes(n int) string
- func Recover() error
- func Shutdown()
- type LFUPool
- type MaximumParallel
Constants ¶
View Source
const (
PathSeparator = string(os.PathSeparator)
)
Variables ¶
This section is empty.
Functions ¶
func ContextLog ¶
func ContextLog(ctx context.Context, log *zap.SugaredLogger) *zap.SugaredLogger
func GenerateNewID ¶
func GenerateNewID() int64
func HandleTerminalSignal ¶
func HandleTerminalSignal() chan struct{}
func NewDateReader ¶
func NewDateReader(reader io.Reader) io.ReadCloser
func RandString ¶
func RandStringRunes ¶
Types ¶
type LFUPool ¶
type LFUPool struct { HandlerRemove func(k string, v interface{}) // contains filtered or unexported fields }
func NewLFUPool ¶
type MaximumParallel ¶
type MaximumParallel struct {
// contains filtered or unexported fields
}
func NewMaximumParallel ¶
func NewMaximumParallel(num int) *MaximumParallel
func (*MaximumParallel) BlockedGo ¶
func (p *MaximumParallel) BlockedGo(f func())
func (*MaximumParallel) Go ¶
func (p *MaximumParallel) Go(f func())
Source Files ¶
Click to show internal directories.
Click to hide internal directories.