transport

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	NotFoundTransport = errors.New("not found transport")
)

Functions

func NewManager

func NewManager() *manager

Types

type Manager

type Manager interface {
	GetTransporter(net common.Net) (Transporter, error)
	Close(ctx context.Context) error
}

type Transporter

type Transporter interface {
	// GetType returns the type of the net transport
	GetType() common.Net
	Request(ctx context.Context, url string, req *common.Req) (*common.Resp, error)
	Close(ctx context.Context) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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