Documentation ¶
Index ¶
- Constants
- Variables
- func NetlocFromString(s string) (*netloc.Netloc, error)
- type MergeFunc
- type NetlocRequestConfig
- type RequestConfig
- type RequestWrapper
- func (wrapper *RequestWrapper) Add(nlc *netloc.Netloc, reqConfig *RequestConfig) (*netloc.Netloc, *RequestConfig, error)
- func (wrapper *RequestWrapper) Cleanup() error
- func (wrapper *RequestWrapper) Delete(nlc *netloc.Netloc) (*RequestConfig, error)
- func (wrapper *RequestWrapper) Get(nlc *netloc.Netloc) (*netloc.Netloc, *RequestConfig)
- func (wrapper *RequestWrapper) GetAll() []*NetlocRequestConfig
- func (wrapper *RequestWrapper) Load() error
- func (wrapper *RequestWrapper) MatchURI(uri string) (*netloc.Netloc, *RequestConfig)
- func (wrapper *RequestWrapper) Merge(req *request.Request, reqConfig *RequestConfig, force bool)
- func (wrapper *RequestWrapper) OnStart(context.Context) error
- func (wrapper *RequestWrapper) OnStop(context.Context) error
- func (wrapper *RequestWrapper) Wrap(req *request.Request) (*netloc.Netloc, *RequestConfig)
Constants ¶
View Source
const RootURI = "_ROOT_"
RootURI TODO
View Source
const SpcKeyReplace = "_replace_"
SpcKeyReplace TODO
Variables ¶
View Source
var DefaultRequestConfig = &RequestConfig{ Meta: map[string]interface{}{ "batch_id": "__UNKNOW__", }, }
DefaultRequestConfig TODO
View Source
var RootNetloc = netloc.New(RootURI, "", "")
RootNetloc TODO
Functions ¶
Types ¶
type NetlocRequestConfig ¶
type NetlocRequestConfig struct { Netloc *netloc.Netloc `json:"netloc"` Rule *RequestConfig `json:"rule"` }
NetlocRequestConfig TODO
type RequestConfig ¶
type RequestConfig struct { Method string `json:"method,omitempty"` Meta map[string]interface{} `json:"meta,omitempty"` Headers map[string]string `json:"headers,omitempty"` Cookies map[string]string `json:"cookies,omitempty"` Body string `json:"body,omitempty"` }
RequestConfig TODO
type RequestWrapper ¶
RequestWrapper TODO
func (*RequestWrapper) Add ¶
func (wrapper *RequestWrapper) Add(nlc *netloc.Netloc, reqConfig *RequestConfig) (*netloc.Netloc, *RequestConfig, error)
Add TODO
func (*RequestWrapper) Delete ¶
func (wrapper *RequestWrapper) Delete(nlc *netloc.Netloc) (*RequestConfig, error)
Delete TODO
func (*RequestWrapper) Get ¶
func (wrapper *RequestWrapper) Get(nlc *netloc.Netloc) (*netloc.Netloc, *RequestConfig)
Get TODO
func (*RequestWrapper) GetAll ¶
func (wrapper *RequestWrapper) GetAll() []*NetlocRequestConfig
GetAll TODO
func (*RequestWrapper) MatchURI ¶
func (wrapper *RequestWrapper) MatchURI(uri string) (*netloc.Netloc, *RequestConfig)
MatchURI TODO
func (*RequestWrapper) Merge ¶
func (wrapper *RequestWrapper) Merge(req *request.Request, reqConfig *RequestConfig, force bool)
Merge TODO
func (*RequestWrapper) OnStart ¶
func (wrapper *RequestWrapper) OnStart(context.Context) error
OnStart TODO
func (*RequestWrapper) OnStop ¶
func (wrapper *RequestWrapper) OnStop(context.Context) error
OnStop TODO
func (*RequestWrapper) Wrap ¶
func (wrapper *RequestWrapper) Wrap(req *request.Request) (*netloc.Netloc, *RequestConfig)
Wrap TODO
Click to show internal directories.
Click to hide internal directories.