common

package
v0.0.0-...-3a05b22 Latest Latest
Warning

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

Go to latest
Published: May 31, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const IOCGolangAOPConfigPrefix = "ioc-golang.aop"
View Source
const (
	ProxyMethodPrefix = "github.com/cc-cheunggg/ioc-golang/aop."
)

Variables

This section is empty.

Functions

func CurrentCallingMethodName

func CurrentCallingMethodName(skip int) string

func GetMethodUniqueKey

func GetMethodUniqueKey(interfaceImplId, methodName string) string

func GetTCPListener

func GetTCPListener(port string) (net.Listener, error)

func IsInvocationFailed

func IsInvocationFailed(returnValues []reflect.Value) (bool, error)

func IsTraceEntrance

func IsTraceEntrance(entranceMethodFullName string) bool

func ParseSDIDAndMethodFromUniqueKey

func ParseSDIDAndMethodFromUniqueKey(uniqueKey string) (string, string)

func ReflectValues2String

func ReflectValues2String(values []reflect.Value, maxDepth, maxLength int) string

func ReflectValues2Strings

func ReflectValues2Strings(values []reflect.Value, maxDepth, maxLength int) []string

Types

type AllInterfaceMetadata

type AllInterfaceMetadata map[string]*StructMetadata

type Config

type Config struct {
	AppName     string            `yaml:"app-name"`
	Disable     bool              `yaml:"disable"`
	DebugServer DebugServerConfig `yaml:"debug-server"`
}

type ConfigLoader

type ConfigLoader func(config *Config)

type DebugServerConfig

type DebugServerConfig struct {
	Port    string `yaml:"port"`
	Disable bool   `yaml:"disable"`
}

type FieldMatcher

type FieldMatcher struct {
	FieldIndex int
	MatchRule  string // A.B.C=xxx
}

func (*FieldMatcher) Match

func (f *FieldMatcher) Match(values []reflect.Value) bool

type MethodMetadata

type MethodMetadata struct {
	Lock sync.Mutex
}

type RequestParam

type RequestParam struct {
	User *User
}

type Response

type Response struct {
	Name string
}

type ServiceFoo

type ServiceFoo struct {
}

func (*ServiceFoo) Invoke

func (s *ServiceFoo) Invoke(ctx context.Context, param *RequestParam) (*Response, error)

type StructMetadata

type StructMetadata struct {
	MethodMetadata map[string]*MethodMetadata
}

type User

type User struct {
	Name string
}

Jump to

Keyboard shortcuts

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