meta

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultTraceKey = options.DefaultTraceKey

Functions

func ConsoleMysqlExecLogFunc added in v0.1.2

func ConsoleMysqlExecLogFunc(ctx context.Context, ts time.Duration, args interface{}, err error)

ConsoleRedisExecLogFunc print the message to console

func ConsoleRedisExecLogFunc added in v0.1.1

func ConsoleRedisExecLogFunc(ctx context.Context, ts time.Duration, args interface{}, err error)

ConsoleRedisExecLogFunc print the message to console

Types

type ForEach

type ForEach interface {
	ForEach(Iterator) error
}

ForEach 对象遍历

type Iterator

type Iterator func(interface{}) error

Iterator 迭代函数

type KafkaLoggerFunc added in v0.1.1

type KafkaLoggerFunc func(msg string, args ...interface{})

msg: 消息 args: 参数

type Key

type Key interface {
	Key() string
}

Key 获取对象的KEY

type OptionStatus

type OptionStatus int8
const (
	OptionStatusContinue OptionStatus = 1 // 流程未完成,需要继续执行
	OptionStatusBreak    OptionStatus = 2 // 流程已完成,可以返回结果了
)

type RedisExecLogFunc added in v0.1.1

type RedisExecLogFunc func(ctx context.Context, ts time.Duration, args interface{}, err error)

RedisExecLogFunc is called each time when a redis command is executed. The "ts" parameter gives the time that the command takes to execute, args refer the exec params err refer to the result of the execution.

type RepoExecLogFunc added in v0.1.2

type RepoExecLogFunc func(ctx context.Context, ts time.Duration, args interface{}, err error)

RepoExecLogFunc is called each time when read or write from database

type Zero

type Zero interface {
	Zero() bool
}

Zero 判定对象是否为零值

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳