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
- type Config
- func (*Config) Descriptor() ([]byte, []int)deprecated
- func (x *Config) GetHeader() map[string]string
- func (x *Config) GetHost() string
- func (x *Config) GetMaxConcurrentUploads() int32
- func (x *Config) GetMaxUploadSize() int32
- func (c *Config) GetNormalizedMaxConcurrentUploads() int32
- func (c *Config) GetNormalizedMaxUploadSize() int32
- func (c *Config) GetNormalizedPath() string
- func (x *Config) GetPath() string
- func (c *Config) GetRequestHeader() http.Header
- func (*Config) ProtoMessage()
- func (x *Config) ProtoReflect() protoreflect.Message
- func (x *Config) Reset()
- func (x *Config) String() string
- type DefaultDialerClient
- type DialerClient
- type LazyReader
- type Listener
- type Packet
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 ¶ added in v1.8.17
type BrowserDialerClient struct{}
implements splithttp.DialerClient in terms of browser dialer has no fields because everything is global state :O)
func (*BrowserDialerClient) OpenDownload ¶ added in v1.8.17
func (*BrowserDialerClient) SendUploadRequest ¶ added in v1.8.17
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"` Header map[string]string `` /* 153-byte string literal not displayed */ MaxConcurrentUploads int32 `protobuf:"varint,4,opt,name=maxConcurrentUploads,proto3" json:"maxConcurrentUploads,omitempty"` MaxUploadSize int32 `protobuf:"varint,5,opt,name=maxUploadSize,proto3" json:"maxUploadSize,omitempty"` // contains filtered or unexported fields }
func (*Config) Descriptor
deprecated
func (*Config) GetMaxConcurrentUploads ¶
func (*Config) GetMaxUploadSize ¶
func (*Config) GetNormalizedMaxConcurrentUploads ¶
func (*Config) GetNormalizedMaxUploadSize ¶
func (*Config) GetNormalizedPath ¶
func (*Config) GetRequestHeader ¶
func (*Config) ProtoMessage ¶
func (*Config) ProtoMessage()
func (*Config) ProtoReflect ¶
func (x *Config) ProtoReflect() protoreflect.Message
type DefaultDialerClient ¶ added in v1.8.17
type DefaultDialerClient struct {
// contains filtered or unexported fields
}
implements splithttp.DialerClient in terms of direct network connections
func (*DefaultDialerClient) OpenDownload ¶ added in v1.8.17
func (*DefaultDialerClient) SendUploadRequest ¶ added in v1.8.17
func (c *DefaultDialerClient) SendUploadRequest(ctx context.Context, url string, payload io.ReadWriteCloser, contentLength int64) error
type DialerClient ¶ added in v1.8.17
type DialerClient interface { // (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) }
interface to abstract between use of browser dialer, vs net/http
type LazyReader ¶ added in v1.8.16
type LazyReader struct { CreateReader func() (io.ReadCloser, error) // contains filtered or unexported fields }
func (*LazyReader) Close ¶ added in v1.8.16
func (r *LazyReader) Close() error
Click to show internal directories.
Click to hide internal directories.