proxy

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: May 26, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MetadataMap = &serviceMap{
	serviceMap:   make(map[string]map[string]*Service),
	interfaceMap: make(map[string][]*Service),
}

MetadataMap store metadata of service.

Functions

func NewProxyInvoker

func NewProxyInvoker(proto, sdid, alias string) protocol.Invoker

Types

type MethodType

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

MethodType is description of service method.

func (*MethodType) ArgsType

func (m *MethodType) ArgsType() []reflect.Type

ArgsType gets @m.argsType.

func (*MethodType) CtxType

func (m *MethodType) CtxType() reflect.Type

CtxType gets @m.ctxType.

func (*MethodType) Method

func (m *MethodType) Method() reflect.Method

Method gets @m.method.

func (*MethodType) ReplyType

func (m *MethodType) ReplyType() reflect.Type

ReplyType gets @m.replyType.

func (*MethodType) SuiteContext

func (m *MethodType) SuiteContext(ctx context.Context) reflect.Value

SuiteContext transfers @ctx to reflect.Value type or get it from @m.ctxType.

type ProxyInvoker

type ProxyInvoker struct {
	protocol.BaseInvoker
}

ProxyInvoker is a invoker struct

func (*ProxyInvoker) Invoke

func (pi *ProxyInvoker) Invoke(ctx context.Context, invocation protocol.Invocation) protocol.Result

Invoke is used to call service method by invocation

type Service

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

Service is description of service

func (*Service) Method

func (s *Service) Method() map[string]*MethodType

Method gets @s.methods.

func (*Service) Name

func (s *Service) Name() string

Name will return service name

func (*Service) Rcvr

func (s *Service) Rcvr() reflect.Value

Rcvr gets @s.rcvr.

func (*Service) RcvrType

func (s *Service) RcvrType() reflect.Type

RcvrType gets @s.rcvrType.

Jump to

Keyboard shortcuts

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