Documentation
¶
Index ¶
- type BundleDownloadRequest
- type BundleDownloadResponse
- type BundleSuggestRequest
- type BundleSuggestResponse
- type BundleUploadRequest
- type BundleUploadResponse
- type ChunkUploadResult
- type DiscoveryInfo
- type FinalizeUploadRequest
- type FinalizeUploadResponse
- type Hash
- type ListTeamsRequest
- type ListTeamsResponse
- type MissingUploadRequest
- type MissingUploadResponse
- type Node
- type ParallelDownloader
- type ParallelUploader
- func (p *ParallelUploader) EncMode() cbor.EncMode
- func (p *ParallelUploader) Finalize(key, domain string, id Hash) (*FinalizeUploadResponse, error)
- func (p *ParallelUploader) SuggestBundle(key, domain string, id Hash) (*BundleSuggestResponse, error)
- func (p *ParallelUploader) UploadBundle(key, domain string, bundle []byte) (*BundleUploadResponse, error)
- func (p *ParallelUploader) UploadChunksParallel(key, domain string, chunks [][][]byte) []ChunkUploadResult
- type PartsDownloadRequest
- type PartsDownloadResponse
- type Request
- type RequestKeyRequest
- type RequestKeyResponse
- type Response
- type Team
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BundleDownloadRequest ¶ added in v0.3.2
type BundleDownloadResponse ¶ added in v0.3.2
type BundleSuggestRequest ¶
type BundleSuggestResponse ¶
type BundleUploadRequest ¶
type BundleUploadResponse ¶
type ChunkUploadResult ¶ added in v0.5.0
type ChunkUploadResult struct {
Index int
Response *MissingUploadResponse
Err error
}
ChunkUploadResult holds the result of a single chunk upload
type DiscoveryInfo ¶ added in v0.5.0
type DiscoveryInfo struct {
Protocols []string `json:"protocols"`
URL string `json:"url"`
APIKeyManagementURL string `json:"apiKeyManagementUrl"`
}
DiscoveryInfo holds the response from /.well-known/web-publication-protocol
func Discover ¶ added in v0.5.0
func Discover() (*DiscoveryInfo, error)
Discover fetches the xmit discovery info from XMIT_URL (default: https://xmit.co)
type FinalizeUploadRequest ¶
type FinalizeUploadResponse ¶
type FinalizeUploadResponse struct {
Response
}
type ListTeamsRequest ¶ added in v0.3.6
type ListTeamsRequest struct {
Request
}
type ListTeamsResponse ¶ added in v0.3.6
type MissingUploadRequest ¶
type MissingUploadResponse ¶
type MissingUploadResponse struct {
Response
}
type ParallelDownloader ¶ added in v0.5.0
type ParallelDownloader struct {
// contains filtered or unexported fields
}
ParallelDownloader manages parallel downloads across multiple IPs
func NewParallelDownloader ¶ added in v0.5.0
func NewParallelDownloader(baseURL string, concurrency int) (*ParallelDownloader, error)
NewParallelDownloader creates a downloader that spreads requests across IPs
func (*ParallelDownloader) DownloadBundle ¶ added in v0.5.0
func (p *ParallelDownloader) DownloadBundle(key, domain, id string) (*BundleDownloadResponse, error)
DownloadBundle downloads a bundle using a round-robin client
func (*ParallelDownloader) DownloadParts ¶ added in v0.5.0
func (p *ParallelDownloader) DownloadParts(key, domain string, hashes []Hash) (*PartsDownloadResponse, error)
DownloadParts downloads parts using a round-robin client selection
type ParallelUploader ¶ added in v0.5.0
type ParallelUploader struct {
// contains filtered or unexported fields
}
ParallelUploader manages parallel chunk uploads across multiple IPs
func NewParallelUploader ¶ added in v0.5.0
func NewParallelUploader(baseURL string, concurrency int) (*ParallelUploader, error)
NewParallelUploader creates an uploader that spreads requests across IPs
func (*ParallelUploader) EncMode ¶ added in v0.5.0
func (p *ParallelUploader) EncMode() cbor.EncMode
EncMode returns the CBOR encoding mode
func (*ParallelUploader) Finalize ¶ added in v0.5.0
func (p *ParallelUploader) Finalize(key, domain string, id Hash) (*FinalizeUploadResponse, error)
Finalize finalizes the upload using a round-robin client
func (*ParallelUploader) SuggestBundle ¶ added in v0.5.0
func (p *ParallelUploader) SuggestBundle(key, domain string, id Hash) (*BundleSuggestResponse, error)
SuggestBundle suggests a bundle using a round-robin client
func (*ParallelUploader) UploadBundle ¶ added in v0.5.0
func (p *ParallelUploader) UploadBundle(key, domain string, bundle []byte) (*BundleUploadResponse, error)
UploadBundle uploads the bundle using a round-robin client
func (*ParallelUploader) UploadChunksParallel ¶ added in v0.5.0
func (p *ParallelUploader) UploadChunksParallel(key, domain string, chunks [][][]byte) []ChunkUploadResult
UploadChunksParallel uploads all chunks in parallel (max concurrency), starting in order
type PartsDownloadRequest ¶ added in v0.3.2
type PartsDownloadResponse ¶ added in v0.3.2
type RequestKeyRequest ¶ added in v0.3.8
type RequestKeyRequest struct {
Name string `cbor:"1,keyasint,omitempty"`
}