Documentation
¶
Index ¶
Constants ¶
View Source
const ( StatusPending = "pending" // waiting for permission to sync StatusPendingEmail = "pendingemail" // permission granted but missing email StatusQueued = "queued" // in sync queue. will be synced soon StatusPendingUpgrade = "pendingupgrade" // in sync queue. will be synced soon StatusSyncing = "syncing" // syncing now StatusSynced = "synced" // done StatusFailed = "failed" StatusFinalized = "finalized" // no more changes allowed StatusAbandoned = "abandoned" // deleted on youtube or banned )
View Source
const ( VideoStatusPublished = "published" VideoStatusFailed = "failed" VideoStatusUpgradeFailed = "upgradefailed" VideoStatusUnpublished = "unpublished" VideoStatusTranferFailed = "transferfailed" )
View Source
const ( TransferStateNotTouched = iota TransferStatePending TransferStateComplete TransferStateManual )
View Source
const LatestMetadataVersion = 2
Variables ¶
View Source
var SyncStatuses = []string{StatusPending, StatusPendingEmail, StatusPendingUpgrade, StatusQueued, StatusSyncing, StatusSynced, StatusFailed, StatusFinalized, StatusAbandoned}
Functions ¶
func GetUsedSpace ¶
GetUsedSpace returns a value between 0 and 1, with 0 being completely empty and 1 being full, for the disk that holds the provided path
Types ¶
type Sync ¶
type Sync struct {
APIConfig *sdk.APIConfig
YoutubeChannelID string
LbryChannelName string
MaxTries int
ConcurrentVideos int
Refill int
Manager *SyncManager
LbrycrdString string
AwsS3ID string
AwsS3Secret string
AwsS3Region string
AwsS3Bucket string
Fee *sdk.Fee
// contains filtered or unexported fields
}
Sync stores the options that control how syncing happens
func (*Sync) AppendSyncedVideo ¶
func (*Sync) CountVideos ¶
func (*Sync) GenerateRegtestBlock ¶
func (*Sync) IsInterrupted ¶
IsInterrupted can be queried to discover if the sync process was interrupted manually
type SyncManager ¶
func NewSyncManager ¶
func NewSyncManager(syncFlags sdk.SyncFlags, maxTries int, refill int, limit int, concurrentJobs int, concurrentVideos int, blobsDir string, videosLimit int, maxVideoSize int, lbrycrdString string, awsS3ID string, awsS3Secret string, awsS3Region string, awsS3Bucket string, syncStatus string, syncProperties *sdk.SyncProperties, apiConfig *sdk.APIConfig, maxVideoLength float64) *SyncManager
func (*SyncManager) GetS3AWSConfig ¶
func (s *SyncManager) GetS3AWSConfig() aws.Config
func (*SyncManager) Start ¶
func (s *SyncManager) Start() error
Click to show internal directories.
Click to hide internal directories.