Documentation ¶
Index ¶
- Variables
- func Dial(ctx context.Context, dest net.Destination, ...) (stat.Connection, error)
- func ListenSH(ctx context.Context, address net.Address, port net.Port, ...) (internet.Listener, error)
- func NewUploadQueue(maxPackets int) *uploadQueue
- type BrowserDialerClient
- func (c *BrowserDialerClient) IsClosed() bool
- func (c *BrowserDialerClient) Open(ctx context.Context, pureURL string) (io.WriteCloser, io.ReadCloser)
- func (c *BrowserDialerClient) OpenDownload(ctx context.Context, baseURL string) (io.ReadCloser, gonet.Addr, gonet.Addr, error)
- func (c *BrowserDialerClient) OpenUpload(ctx context.Context, baseURL string) io.WriteCloser
- func (c *BrowserDialerClient) SendUploadRequest(ctx context.Context, url string, payload io.ReadWriteCloser, ...) error
- type Config
- func (*Config) Descriptor() ([]byte, []int)deprecated
- func (x *Config) GetDownloadSettings() *internet.StreamConfig
- func (x *Config) GetHeaders() map[string]string
- func (x *Config) GetHost() string
- func (x *Config) GetMode() string
- func (x *Config) GetNoGRPCHeader() bool
- func (x *Config) GetNoSSEHeader() bool
- func (c *Config) GetNormalizedPath() string
- func (c *Config) GetNormalizedQuery() string
- func (c *Config) GetNormalizedScMaxBufferedPosts() int
- func (c *Config) GetNormalizedScMaxEachPostBytes() RangeConfig
- func (c *Config) GetNormalizedScMinPostsIntervalMs() RangeConfig
- func (c *Config) GetNormalizedXPaddingBytes() RangeConfig
- func (x *Config) GetPath() string
- func (c *Config) GetRequestHeader() http.Header
- func (x *Config) GetScMaxBufferedPosts() int64
- func (x *Config) GetScMaxEachPostBytes() *RangeConfig
- func (x *Config) GetScMinPostsIntervalMs() *RangeConfig
- func (x *Config) GetXPaddingBytes() *RangeConfig
- func (x *Config) GetXmux() *XmuxConfig
- func (*Config) ProtoMessage()
- func (x *Config) ProtoReflect() protoreflect.Message
- func (x *Config) Reset()
- func (x *Config) String() string
- func (c *Config) WriteResponseHeader(writer http.ResponseWriter)
- type DefaultDialerClient
- func (c *DefaultDialerClient) IsClosed() bool
- func (c *DefaultDialerClient) Open(ctx context.Context, pureURL string) (io.WriteCloser, io.ReadCloser)
- func (c *DefaultDialerClient) OpenDownload(ctx context.Context, baseURL string) (io.ReadCloser, gonet.Addr, gonet.Addr, error)
- func (c *DefaultDialerClient) OpenUpload(ctx context.Context, baseURL string) io.WriteCloser
- func (c *DefaultDialerClient) SendUploadRequest(ctx context.Context, url string, payload io.ReadWriteCloser, ...) error
- type DialerClient
- type H1Conn
- type LazyReader
- type Listener
- type Packet
- type RangeConfig
- type WaitReadCloser
- type XmuxClient
- type XmuxConfig
- func (*XmuxConfig) Descriptor() ([]byte, []int)deprecated
- func (x *XmuxConfig) GetCMaxLifetimeMs() *RangeConfig
- func (x *XmuxConfig) GetCMaxReuseTimes() *RangeConfig
- func (x *XmuxConfig) GetHKeepAlivePeriod() int64
- func (x *XmuxConfig) GetHMaxRequestTimes() *RangeConfig
- func (x *XmuxConfig) GetMaxConcurrency() *RangeConfig
- func (x *XmuxConfig) GetMaxConnections() *RangeConfig
- func (m *XmuxConfig) GetNormalizedCMaxLifetimeMs() RangeConfig
- func (m *XmuxConfig) GetNormalizedCMaxRequestTimes() RangeConfig
- func (m *XmuxConfig) GetNormalizedCMaxReuseTimes() RangeConfig
- func (m *XmuxConfig) GetNormalizedMaxConcurrency() RangeConfig
- func (m *XmuxConfig) GetNormalizedMaxConnections() RangeConfig
- func (*XmuxConfig) ProtoMessage()
- func (x *XmuxConfig) ProtoReflect() protoreflect.Message
- func (x *XmuxConfig) Reset()
- func (x *XmuxConfig) String() string
- type XmuxConn
- type XmuxManager
Constants ¶
This section is empty.
Variables ¶
View Source
var File_transport_internet_splithttp_config_proto protoreflect.FileDescriptor
Functions ¶
func Dial ¶
func Dial(ctx context.Context, dest net.Destination, streamSettings *internet.MemoryStreamConfig) (stat.Connection, error)
func NewUploadQueue ¶
func NewUploadQueue(maxPackets int) *uploadQueue
Types ¶
type BrowserDialerClient ¶
type BrowserDialerClient struct{}
implements splithttp.DialerClient in terms of browser dialer has no fields because everything is global state :O)
func (*BrowserDialerClient) IsClosed ¶ added in v24.12.15
func (c *BrowserDialerClient) IsClosed() bool
func (*BrowserDialerClient) Open ¶ added in v24.11.30
func (c *BrowserDialerClient) Open(ctx context.Context, pureURL string) (io.WriteCloser, io.ReadCloser)
func (*BrowserDialerClient) OpenDownload ¶
func (*BrowserDialerClient) OpenUpload ¶ added in v24.11.11
func (c *BrowserDialerClient) OpenUpload(ctx context.Context, baseURL string) io.WriteCloser
func (*BrowserDialerClient) SendUploadRequest ¶
func (c *BrowserDialerClient) SendUploadRequest(ctx context.Context, url string, payload io.ReadWriteCloser, contentLength int64) error
type Config ¶
type Config struct { Host string `protobuf:"bytes,1,opt,name=host,proto3" json:"host,omitempty"` Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"` Mode string `protobuf:"bytes,3,opt,name=mode,proto3" json:"mode,omitempty"` Headers map[string]string `` /* 155-byte string literal not displayed */ XPaddingBytes *RangeConfig `protobuf:"bytes,5,opt,name=xPaddingBytes,proto3" json:"xPaddingBytes,omitempty"` NoGRPCHeader bool `protobuf:"varint,6,opt,name=noGRPCHeader,proto3" json:"noGRPCHeader,omitempty"` NoSSEHeader bool `protobuf:"varint,7,opt,name=noSSEHeader,proto3" json:"noSSEHeader,omitempty"` ScMaxEachPostBytes *RangeConfig `protobuf:"bytes,8,opt,name=scMaxEachPostBytes,proto3" json:"scMaxEachPostBytes,omitempty"` ScMinPostsIntervalMs *RangeConfig `protobuf:"bytes,9,opt,name=scMinPostsIntervalMs,proto3" json:"scMinPostsIntervalMs,omitempty"` ScMaxBufferedPosts int64 `protobuf:"varint,10,opt,name=scMaxBufferedPosts,proto3" json:"scMaxBufferedPosts,omitempty"` Xmux *XmuxConfig `protobuf:"bytes,11,opt,name=xmux,proto3" json:"xmux,omitempty"` DownloadSettings *internet.StreamConfig `protobuf:"bytes,12,opt,name=downloadSettings,proto3" json:"downloadSettings,omitempty"` // contains filtered or unexported fields }
func (*Config) Descriptor
deprecated
func (*Config) GetDownloadSettings ¶
func (x *Config) GetDownloadSettings() *internet.StreamConfig
func (*Config) GetHeaders ¶ added in v24.12.15
func (*Config) GetNoGRPCHeader ¶ added in v24.11.21
func (*Config) GetNoSSEHeader ¶
func (*Config) GetNormalizedPath ¶
func (*Config) GetNormalizedQuery ¶
func (*Config) GetNormalizedScMaxBufferedPosts ¶ added in v24.12.15
func (*Config) GetNormalizedScMaxEachPostBytes ¶
func (c *Config) GetNormalizedScMaxEachPostBytes() RangeConfig
func (*Config) GetNormalizedScMinPostsIntervalMs ¶
func (c *Config) GetNormalizedScMinPostsIntervalMs() RangeConfig
func (*Config) GetNormalizedXPaddingBytes ¶
func (c *Config) GetNormalizedXPaddingBytes() RangeConfig
func (*Config) GetRequestHeader ¶
func (*Config) GetScMaxBufferedPosts ¶ added in v24.12.15
func (*Config) GetScMaxEachPostBytes ¶
func (x *Config) GetScMaxEachPostBytes() *RangeConfig
func (*Config) GetScMinPostsIntervalMs ¶
func (x *Config) GetScMinPostsIntervalMs() *RangeConfig
func (*Config) GetXPaddingBytes ¶
func (x *Config) GetXPaddingBytes() *RangeConfig
func (*Config) GetXmux ¶
func (x *Config) GetXmux() *XmuxConfig
func (*Config) ProtoMessage ¶
func (*Config) ProtoMessage()
func (*Config) ProtoReflect ¶
func (x *Config) ProtoReflect() protoreflect.Message
func (*Config) WriteResponseHeader ¶
func (c *Config) WriteResponseHeader(writer http.ResponseWriter)
type DefaultDialerClient ¶
type DefaultDialerClient struct {
// contains filtered or unexported fields
}
implements splithttp.DialerClient in terms of direct network connections
func (*DefaultDialerClient) IsClosed ¶ added in v24.12.15
func (c *DefaultDialerClient) IsClosed() bool
func (*DefaultDialerClient) Open ¶ added in v24.11.30
func (c *DefaultDialerClient) Open(ctx context.Context, pureURL string) (io.WriteCloser, io.ReadCloser)
func (*DefaultDialerClient) OpenDownload ¶
func (*DefaultDialerClient) OpenUpload ¶ added in v24.11.11
func (c *DefaultDialerClient) OpenUpload(ctx context.Context, baseURL string) io.WriteCloser
func (*DefaultDialerClient) SendUploadRequest ¶
func (c *DefaultDialerClient) SendUploadRequest(ctx context.Context, url string, payload io.ReadWriteCloser, contentLength int64) error
type DialerClient ¶
type DialerClient interface { IsClosed() bool // (ctx, baseURL, payload) -> err // baseURL already contains sessionId and seq SendUploadRequest(context.Context, string, io.ReadWriteCloser, int64) error // (ctx, baseURL) -> (downloadReader, remoteAddr, localAddr) // baseURL already contains sessionId OpenDownload(context.Context, string) (io.ReadCloser, net.Addr, net.Addr, error) // (ctx, baseURL) -> uploadWriter // baseURL already contains sessionId OpenUpload(context.Context, string) io.WriteCloser // (ctx, pureURL) -> (uploadWriter, downloadReader) // pureURL can not contain sessionId Open(context.Context, string) (io.WriteCloser, io.ReadCloser) }
interface to abstract between use of browser dialer, vs net/http
type LazyReader ¶
type LazyReader struct { CreateReader func() (io.Reader, error) // contains filtered or unexported fields }
Close is intentionally not supported by LazyReader because it's not clear how CreateReader should be aborted in case of Close. It's best to wrap LazyReader in another struct that handles Close correctly, or better, stop using LazyReader entirely.
type RangeConfig ¶ added in v24.12.15
type RangeConfig struct { From int32 `protobuf:"varint,1,opt,name=from,proto3" json:"from,omitempty"` To int32 `protobuf:"varint,2,opt,name=to,proto3" json:"to,omitempty"` // contains filtered or unexported fields }
func (*RangeConfig) Descriptor
deprecated
added in
v24.12.15
func (*RangeConfig) Descriptor() ([]byte, []int)
Deprecated: Use RangeConfig.ProtoReflect.Descriptor instead.
func (*RangeConfig) GetFrom ¶ added in v24.12.15
func (x *RangeConfig) GetFrom() int32
func (*RangeConfig) GetTo ¶ added in v24.12.15
func (x *RangeConfig) GetTo() int32
func (*RangeConfig) ProtoMessage ¶ added in v24.12.15
func (*RangeConfig) ProtoMessage()
func (*RangeConfig) ProtoReflect ¶ added in v24.12.15
func (x *RangeConfig) ProtoReflect() protoreflect.Message
func (*RangeConfig) Reset ¶ added in v24.12.15
func (x *RangeConfig) Reset()
func (*RangeConfig) String ¶ added in v24.12.15
func (x *RangeConfig) String() string
type WaitReadCloser ¶ added in v24.11.30
type WaitReadCloser struct { Wait chan struct{} io.ReadCloser }
func (*WaitReadCloser) Close ¶ added in v24.11.30
func (w *WaitReadCloser) Close() error
func (*WaitReadCloser) Read ¶ added in v24.11.30
func (w *WaitReadCloser) Read(b []byte) (int, error)
func (*WaitReadCloser) Set ¶ added in v24.11.30
func (w *WaitReadCloser) Set(rc io.ReadCloser)
type XmuxClient ¶ added in v24.12.15
type XmuxConfig ¶ added in v24.12.15
type XmuxConfig struct { MaxConcurrency *RangeConfig `protobuf:"bytes,1,opt,name=maxConcurrency,proto3" json:"maxConcurrency,omitempty"` MaxConnections *RangeConfig `protobuf:"bytes,2,opt,name=maxConnections,proto3" json:"maxConnections,omitempty"` CMaxReuseTimes *RangeConfig `protobuf:"bytes,3,opt,name=cMaxReuseTimes,proto3" json:"cMaxReuseTimes,omitempty"` CMaxLifetimeMs *RangeConfig `protobuf:"bytes,4,opt,name=cMaxLifetimeMs,proto3" json:"cMaxLifetimeMs,omitempty"` HMaxRequestTimes *RangeConfig `protobuf:"bytes,5,opt,name=hMaxRequestTimes,proto3" json:"hMaxRequestTimes,omitempty"` HKeepAlivePeriod int64 `protobuf:"varint,6,opt,name=hKeepAlivePeriod,proto3" json:"hKeepAlivePeriod,omitempty"` // contains filtered or unexported fields }
func (*XmuxConfig) Descriptor
deprecated
added in
v24.12.15
func (*XmuxConfig) Descriptor() ([]byte, []int)
Deprecated: Use XmuxConfig.ProtoReflect.Descriptor instead.
func (*XmuxConfig) GetCMaxLifetimeMs ¶ added in v24.12.15
func (x *XmuxConfig) GetCMaxLifetimeMs() *RangeConfig
func (*XmuxConfig) GetCMaxReuseTimes ¶ added in v24.12.15
func (x *XmuxConfig) GetCMaxReuseTimes() *RangeConfig
func (*XmuxConfig) GetHKeepAlivePeriod ¶ added in v24.12.15
func (x *XmuxConfig) GetHKeepAlivePeriod() int64
func (*XmuxConfig) GetHMaxRequestTimes ¶ added in v24.12.15
func (x *XmuxConfig) GetHMaxRequestTimes() *RangeConfig
func (*XmuxConfig) GetMaxConcurrency ¶ added in v24.12.15
func (x *XmuxConfig) GetMaxConcurrency() *RangeConfig
func (*XmuxConfig) GetMaxConnections ¶ added in v24.12.15
func (x *XmuxConfig) GetMaxConnections() *RangeConfig
func (*XmuxConfig) GetNormalizedCMaxLifetimeMs ¶ added in v24.12.15
func (m *XmuxConfig) GetNormalizedCMaxLifetimeMs() RangeConfig
func (*XmuxConfig) GetNormalizedCMaxRequestTimes ¶ added in v24.12.15
func (m *XmuxConfig) GetNormalizedCMaxRequestTimes() RangeConfig
func (*XmuxConfig) GetNormalizedCMaxReuseTimes ¶ added in v24.12.15
func (m *XmuxConfig) GetNormalizedCMaxReuseTimes() RangeConfig
func (*XmuxConfig) GetNormalizedMaxConcurrency ¶ added in v24.12.15
func (m *XmuxConfig) GetNormalizedMaxConcurrency() RangeConfig
func (*XmuxConfig) GetNormalizedMaxConnections ¶ added in v24.12.15
func (m *XmuxConfig) GetNormalizedMaxConnections() RangeConfig
func (*XmuxConfig) ProtoMessage ¶ added in v24.12.15
func (*XmuxConfig) ProtoMessage()
func (*XmuxConfig) ProtoReflect ¶ added in v24.12.15
func (x *XmuxConfig) ProtoReflect() protoreflect.Message
func (*XmuxConfig) Reset ¶ added in v24.12.15
func (x *XmuxConfig) Reset()
func (*XmuxConfig) String ¶ added in v24.12.15
func (x *XmuxConfig) String() string
type XmuxManager ¶ added in v24.12.15
type XmuxManager struct {
// contains filtered or unexported fields
}
func NewXmuxManager ¶ added in v24.12.15
func NewXmuxManager(xmuxConfig XmuxConfig, newConnFunc func() XmuxConn) *XmuxManager
func (*XmuxManager) GetXmuxClient ¶ added in v24.12.15
func (m *XmuxManager) GetXmuxClient(ctx context.Context) *XmuxClient
Click to show internal directories.
Click to hide internal directories.