Documentation ¶
Overview ¶
Package core 包含SDKClient
Index ¶
- Constants
- type Otel
- type RateLimiter
- type SDKClient
- func (c *SDKClient) Copy() *SDKClient
- func (c *SDKClient) Get(ctx context.Context, gw string, req model.GetRequest, resp model.Response) error
- func (c *SDKClient) SetDebug(debug bool)
- func (c *SDKClient) SetHttpClient(client *http.Client)
- func (c *SDKClient) SetRateLimiter(limiter RateLimiter)
- func (c *SDKClient) WithSpan(ctx context.Context, req *http.Request, resp model.Response, payload []byte, ...) error
- func (c *SDKClient) WithTracer(namespace string)
Constants ¶
View Source
const (
// BASE_URL 默认APIgateway
BASE_URL = "https://openapi.meituan.com/api/"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RateLimiter ¶
type SDKClient ¶
type SDKClient struct {
// contains filtered or unexported fields
}
SDKClient sdk client
func NewSDKClient ¶
NewSDKClient 创建SDKClient
func (*SDKClient) Get ¶
func (c *SDKClient) Get(ctx context.Context, gw string, req model.GetRequest, resp model.Response) error
Get get api
func (*SDKClient) SetHttpClient ¶
SetHttpClient 设置http.Client
func (*SDKClient) SetRateLimiter ¶
func (c *SDKClient) SetRateLimiter(limiter RateLimiter)
SetRateLimiter 设置限流
func (*SDKClient) WithTracer ¶
Click to show internal directories.
Click to hide internal directories.