// Package define ... // // Description : define ... // // Author : go_developer@163.com<白茶清欢> // // Date : 2024-05-24 17:09 package define // Request 请求配置 // // Author : go_developer@163.com<白茶清欢> // // Date : 17:10 2024/5/24 type Request struct { Body map[string]any `json:"body"` // 请求Body Header map[string]string `json:"header"` // 请求Header Cookie map[string]string `json:"cookie"` // 请求Cookie Query map[string]string `json:"query"` // 请求query FullUrl string `json:"full_url"` // 完整的请求URL ContentType string `json:"content_type"` // 请求类型 Method string `json:"method"` // 请求方法 DataField string `json:"data_field"` // 数据字段 CodeField string `json:"code_field"` // 业务状态码字段 MessageField string `json:"message_field"` // code描述字段 RetryRule *RequestRetryRule `json:"retry_rule"` // 重试规则 } // RequestRetryRule 重试规则 // // Author : go_developer@163.com<白茶清欢> // // Date : 12:26 2024/5/31 type RequestRetryRule struct { RetryCount int64 `json:"retry_count"` // 重试次数 RetryTimeInterval int64 `json:"retry_time_interval"` // 重试的时间间隔 1 - 10 之间, 单位毫秒 RetryHttpCodeList []int64 `json:"retry_http_code_list"` // 哪些http状态码需要重试 RetryBusinessCodeList []string `json:"retry_business_code_list"` // 哪些业务状态码需要重试 }