Documentation ¶
Index ¶
- Constants
- type API
- type Action
- type Config
- type CopierStatus
- type GameCopier
- func (g *GameCopier) CopyGameFrom() (err error)
- func (g *GameCopier) CopyHeaderImageFrom() error
- func (g *GameCopier) CopyManifestFrom() (err error)
- func (g *GameCopier) DiffDirectory(remoteURL *url.URL, item *SyncItem) (items []*SyncItem, err error)
- func (g *GameCopier) DownloadItem(remoteURL *url.URL, item *SyncItem) (err error)
- func (g *GameCopier) StartCopy()
- type Peer
- type SyncItem
- type TransferItem
Constants ¶
View Source
const ( // StatusQueued Copy is queued to run when possible StatusQueued CopierStatus = "Queued" // StatusRunning Copy is running StatusRunning = "Running" // StatusCalculating Copy is running but is still counting files which must be copied StatusCalculating = "Calculating" // StatusSuccessful Copy has finished and completed successfully StatusSuccessful = "Successful" // StatusFailed Copy has finished and failed StatusFailed = "Failed" )
View Source
const DefaultPort = 9771
View Source
const IOBufferSize int = 1e+6
Buffer size in bytes (1 MegaByte)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CopierStatus ¶
type CopierStatus string
CopierStatus Indicates the status of a GameCopier operation
type GameCopier ¶
type GameCopier struct { Status CopierStatus `json:"status"` AppID int `json:"appid"` BytesDone int64 `json:"bytes_done"` BytesTotal int64 `json:"bytes_total"` Files int `json:"files"` Peer Peer `json:"peer"` Dest string `json:"dest"` Steam *steam.API }
GameCopier operation. Copies games between a peer and the local host
func (*GameCopier) CopyGameFrom ¶
func (g *GameCopier) CopyGameFrom() (err error)
CopyGameFrom Start copying the game using the pre configured parameters
func (*GameCopier) CopyHeaderImageFrom ¶
func (g *GameCopier) CopyHeaderImageFrom() error
func (*GameCopier) CopyManifestFrom ¶
func (g *GameCopier) CopyManifestFrom() (err error)
func (*GameCopier) DiffDirectory ¶
func (g *GameCopier) DiffDirectory(remoteURL *url.URL, item *SyncItem) (items []*SyncItem, err error)
DiffDirectory Get the difference between a remote path and local directory
func (*GameCopier) DownloadItem ¶
func (g *GameCopier) DownloadItem(remoteURL *url.URL, item *SyncItem) (err error)
DownloadItem downloads a file from a HTTP endpoint
func (*GameCopier) StartCopy ¶
func (g *GameCopier) StartCopy()
StartCopy wait for locks and start copying the game
type Peer ¶
type Peer struct { Name string `json:"name"` Proxy *httputil.ReverseProxy `json:"-"` }
type SyncItem ¶
type SyncItem struct { TransferItem Action Action `json="action"` }
Click to show internal directories.
Click to hide internal directories.