http

package
v0.15.4 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Name = "http-counter"
)

Variables

This section is empty.

Functions

func Create

func Create(id, name string, conf *Config, workers map[eosc.RequireId]eosc.IWorker) (eosc.IWorker, error)

func NewFactory

func NewFactory() eosc.IExtenderDriverFactory

func Register

func Register(register eosc.IExtenderDriverRegister)

Types

type Config

type Config struct {
	Scopes           []string          `json:"scopes" label:"作用域"`
	URI              string            `json:"uri" label:"地址"`
	Method           string            `json:"method" label:"请求方式" enum:"GET,POST,PUT,PATCH"`
	ContentType      string            `json:"content_type" label:"请求体类型" enum:"json,form-data"`
	Headers          map[string]string `json:"headers" label:"请求头"`
	QueryParam       map[string]string `json:"query_param" label:"请求参数"`
	BodyParam        map[string]string `json:"body_param" label:"请求体参数"`
	ResponseJsonPath string            `json:"response_json_path" label:"响应体JsonPath路径"`
}

func (*Config) Validate

func (c *Config) Validate() error

type Executor

type Executor struct {
	drivers.WorkerBase
	// contains filtered or unexported fields
}

func (*Executor) CheckSkill

func (b *Executor) CheckSkill(skill string) bool

func (*Executor) Get

func (b *Executor) Get(variables map[string]string) (int64, error)

func (*Executor) Reset

func (b *Executor) Reset(conf interface{}, workers map[eosc.RequireId]eosc.IWorker) error

func (*Executor) Start

func (b *Executor) Start() error

func (*Executor) Stop

func (b *Executor) Stop() error

Jump to

Keyboard shortcuts

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