dubbo

package
v1.0.1-rc1 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2024 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

View Source
const (
	JavaStringClassName = "java.lang.String"
	JavaLangClassName   = "java.lang.Long"
)

TODO java class name elem

Variables

View Source
var DefaultMapOption = client.MapOption{
	// contains filtered or unexported fields
}

DefaultMapOption default map opt

Functions

func InitDefaultDubboClient

func InitDefaultDubboClient(dpc *DubboProxyConfig)

InitDefaultDubboClient init default dubbo client

Types

type Client

type Client struct {
	GenericServicePool map[string]*generic.GenericService
	// contains filtered or unexported fields
}

Client client to generic invoke dubbo

func NewDubboClient

func NewDubboClient() *Client

NewDubboClient create dubbo client

func SingletonDubboClient

func SingletonDubboClient() *Client

SingletonDubboClient singleton dubbo clent

func (*Client) Apply

func (dc *Client) Apply() error

Apply init dubbo, config mapping can do here

func (*Client) Call

func (dc *Client) Call(req *client.Request) (res interface{}, err error)

Call invoke service

func (*Client) Close

func (dc *Client) Close() error

Close clear GenericServicePool.

func (*Client) Get

Get find a dubbo GenericService

func (*Client) MapParams

func (dc *Client) MapParams(req *client.Request) (interface{}, error)

MapParams params mapping to api.

func (*Client) SetConfig

func (dc *Client) SetConfig(dpc *DubboProxyConfig)

SetConfig set config

type DubboProxyConfig

type DubboProxyConfig struct {
	// Registries such as zk,nacos or etcd
	Registries map[string]model.Registry `yaml:"registries" json:"registries"`
	// Timeout
	Timeout *model.TimeoutConfig `yaml:"timeout_config" json:"timeout_config"`
	// IsDefaultMap whether to use DefaultMap role
	IsDefaultMap bool
	// AutoResolve whether to resolve api config from request
	AutoResolve bool `yaml:"auto_resolve" json:"auto_resolve,omitempty"`
	// Protoset path to load protoset files
	Protoset []string `yaml:"protoset" json:"protoset,omitempty"`
	// Load balance
	LoadBalance string `yaml:"load_balance"  json:"load_balance,omitempty"`
	// Retries number of retries
	Retries string `yaml:"retries" json:"retries,omitempty"`
}

DubboProxyConfig the config for dubbo proxy

Jump to

Keyboard shortcuts

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