xorm

package
v0.0.0-...-2ebd195 Latest Latest
Warning

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

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

README

xorm-tracing

增加 xorm 的链路追踪实现(使用 jaeger)

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	XormSqlMap = make(map[string]*XormClient)
)

Functions

This section is empty.

Types

type XormClient

type XormClient struct {
	*xorm.Engine
	// contains filtered or unexported fields
}

func GetXormClient

func GetXormClient(name string) *XormClient

func NewXormClient

func NewXormClient(option *XormOption) (*XormClient, error)

type XormHook

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

func NewXormHook

func NewXormHook(name string) *XormHook

func (*XormHook) AfterProcess

func (h *XormHook) AfterProcess(c *contexts.ContextHook) error

func (*XormHook) BeforeProcess

func (h *XormHook) BeforeProcess(ctx *contexts.ContextHook) (context.Context, error)

前置钩子实现

type XormOption

type XormOption struct {
	Name   string
	Driver string
	Dsn    string
}

Jump to

Keyboard shortcuts

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