...

Source file src/code.rocketnine.space/tslocum/gophast/pkg/manager/config.go

Documentation: code.rocketnine.space/tslocum/gophast/pkg/manager

     1  package manager
     2  
     3  import (
     4  	"time"
     5  
     6  	"gitlab.com/tslocum/gophast/pkg/config"
     7  )
     8  
     9  func GetGoPhastVersion() string {
    10  	return config.Version
    11  }
    12  
    13  func SetForce(force bool) {
    14  	config.C.Force = force
    15  }
    16  
    17  func SetPreallocate(preallocate bool) {
    18  	config.C.Preallocate = preallocate
    19  }
    20  
    21  func SetResume(resume bool) {
    22  	config.C.Resume = resume
    23  }
    24  
    25  func SetAutoSave(seconds int64) {
    26  	config.C.AutoSaveControl = time.Duration(seconds) * time.Second
    27  }
    28  
    29  func SetRetryDelay(seconds int64) {
    30  	config.C.RetryDelay = time.Duration(seconds) * time.Second
    31  }
    32  
    33  func SetMaxRetries(maxretries int) {
    34  	config.C.MaxRetries = maxretries
    35  }
    36  
    37  func SetDownloadDir(path string) {
    38  	config.C.DownloadDir = path
    39  }
    40  
    41  func SetUserAgentExtra(extra string) {
    42  	config.C.UserAgentExtra = extra
    43  }
    44  
    45  func SetMinSplitSize(minsplitsize int64) {
    46  	config.C.MinSplitSize = minsplitsize
    47  }
    48  
    49  func SetMaxConnections(maxconns int64) {
    50  	config.C.MaxConnections = maxconns
    51  }
    52  

View as plain text