http

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2025 License: AGPL-3.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_transport_protocols_http_config_proto protoreflect.FileDescriptor

Functions

func Dial

func Dial(ctx context.Context, dest net.Destination, c *HttpConfig, se security.Engine, sc i.Dialer) (net.Conn, error)

Dial dials a new TCP connection to the given destination.

Types

type Dialer

type Dialer struct {
	Config   *HttpConfig
	Security security.Engine
	Socket   i.Dialer
}

func NewDialer

func NewDialer(config *HttpConfig, securityEngine security.Engine, socket i.Dialer) *Dialer

func (*Dialer) Dial

func (d *Dialer) Dial(ctx context.Context, dest net.Destination) (net.Conn, error)

type HttpConfig

type HttpConfig struct {
	Host   []string       `protobuf:"bytes,1,rep,name=host,proto3" json:"host,omitempty"`
	Path   string         `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"`
	Method string         `protobuf:"bytes,3,opt,name=method,proto3" json:"method,omitempty"`
	Header []*http.Header `protobuf:"bytes,4,rep,name=header,proto3" json:"header,omitempty"`
	// contains filtered or unexported fields
}

func (*HttpConfig) Descriptor deprecated

func (*HttpConfig) Descriptor() ([]byte, []int)

Deprecated: Use HttpConfig.ProtoReflect.Descriptor instead.

func (*HttpConfig) GetHeader

func (x *HttpConfig) GetHeader() []*http.Header

func (*HttpConfig) GetHost

func (x *HttpConfig) GetHost() []string

func (*HttpConfig) GetMethod

func (x *HttpConfig) GetMethod() string

func (*HttpConfig) GetPath

func (x *HttpConfig) GetPath() string

func (*HttpConfig) ProtoMessage

func (*HttpConfig) ProtoMessage()

func (*HttpConfig) ProtoReflect

func (x *HttpConfig) ProtoReflect() protoreflect.Message

func (*HttpConfig) Reset

func (x *HttpConfig) Reset()

func (*HttpConfig) String

func (x *HttpConfig) String() string

type Listener

type Listener struct {
	// contains filtered or unexported fields
}

func Listen

func Listen(ctx context.Context, addr net.Destination, c *HttpConfig,
	li i.Listener, h func(net.Conn)) (*Listener, error)

func (*Listener) Addr

func (l *Listener) Addr() net.Addr

func (*Listener) Close

func (l *Listener) Close() error

func (*Listener) ServeHTTP

func (l *Listener) ServeHTTP(writer http.ResponseWriter, request *http.Request)

Jump to

Keyboard shortcuts

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