http

package
v0.4.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2021 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDubboResponse

func NewDubboResponse(data interface{}) *client.Response

NewDubboResponse creates dubbo response

Types

type Client

type Client struct{}

Client client to generic invoke dubbo

func NewHTTPClient

func NewHTTPClient() *Client

NewHTTPClient create dubbo client

func SingletonHTTPClient

func SingletonHTTPClient() *Client

SingletonHTTPClient singleton HTTP Client

func (*Client) Apply

func (dc *Client) Apply() error

Apply only init dubbo, config mapping can do here

func (*Client) Call

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

Call invoke service

func (*Client) Close

func (dc *Client) Close() error

Close close

func (*Client) MapParams

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

MapParams param mapping to api.

type RestMetadata

type RestMetadata struct {
	ApplicationName      string   `yaml:"application_name" json:"application_name" mapstructure:"application_name"`
	Group                string   `yaml:"group" json:"group" mapstructure:"group"`
	Version              string   `yaml:"version" json:"version" mapstructure:"version"`
	Interface            string   `yaml:"interface" json:"interface" mapstructure:"interface"`
	Method               string   `yaml:"method" json:"method" mapstructure:"method"`
	Types                []string `yaml:"type" json:"types" mapstructure:"types"`
	Retries              string   `yaml:"retries"  json:"retries,omitempty" property:"retries"`
	ClusterName          string   `yaml:"cluster_name"  json:"cluster_name,omitempty" property:"cluster_name"`
	ProtocolTypeStr      string   `yaml:"protocol_type"  json:"protocol_type,omitempty" property:"protocol_type"`
	SerializationTypeStr string   `yaml:"serialization_type"  json:"serialization_type,omitempty" property:"serialization_type"`
}

RestMetadata http metadata, api config

Jump to

Keyboard shortcuts

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