rest

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2022 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClientHolder

func NewClientHolder(gData GeneralData, cData model.RestSetting) func(ctx context.Context, ctxCancel context.CancelFunc, r *registry.ClientReg) registry.ClientHolder

func Request

func Request(ctx context.Context, cancel context.CancelFunc, wg *sync.WaitGroup, args *model.RestCheck, concurrent int, reg *registry.ClientReg)

Types

type ClientHolder

type ClientHolder struct {
	Ctx         context.Context
	Client      *http.Client
	MsgChan     <-chan interface{}
	Reg         *registry.ClientReg
	CtxCancel   context.CancelFunc
	GeneralData GeneralData
}

func (*ClientHolder) DoRequest

func (c *ClientHolder) DoRequest(ctx context.Context, timeout time.Duration, urlV string, m model.RestCheck) error

func (*ClientHolder) Work

func (c *ClientHolder) Work()

type GeneralData

type GeneralData struct{}

type Msg

type Msg struct {
	URL     string
	Args    model.RestCheck
	Timeout time.Duration
}

Jump to

Keyboard shortcuts

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