Documentation
¶
Index ¶
- Constants
- Variables
- func AnnounceToDht(shard, layerId string) (err error)
- func ApiPorts(conf *Configuration) (ports []int)
- func ApiRouter() *mux.Router
- func GetAccount(accT interfaces.AccountType) interfaces.IAccount
- func GetActivityFolder() string
- func GetDownloadUrlsForShard(shard string) (mergedUrls []string, err error)
- func GetHashesFolder() string
- func GetLogFilePath() string
- func GetSPProfiles(layer pl.PermissionLayerID) (StorageProviders, error)
- func GetShardsFolder() string
- func InHashesFolder(paths ...string) string
- func InRootFolder(paths ...string) string
- func InShardsFolder(paths ...string) string
- func ProcessArgs()
- func RecordActivity(a *ActivityInfo)
- func RelativeToRoot(absPath string) string
- func RunWebServer() (err error)
- func SetupAccountAndDht()
- func StoredFilePath(a *ArchonUrl, shardIndex int) string
- func VerifyPendingUploads()
- type ActivityInfo
- type Configuration
- type RegisterCommand
- type StatsResponse
- type UnregisterCommand
Constants ¶
View Source
const ( StorageRoot = "www" ShardsFolder = "shards" HashesFolder = "hashes" LogFolder = "log" ActivityFolder = "activity" )
Variables ¶
View Source
var PortsUsed []int
View Source
var SPAccount struct { Eth *account.EthAccount Neo *account.NeoAccount }
The Storage Provider account
View Source
var StartTime time.Time
For info only
Functions ¶
func AnnounceToDht ¶
func ApiPorts ¶
func ApiPorts(conf *Configuration) (ports []int)
func GetAccount ¶
func GetAccount(accT interfaces.AccountType) interfaces.IAccount
func GetActivityFolder ¶
func GetActivityFolder() string
func GetDownloadUrlsForShard ¶
GetDownloadUrlsForShard returns download URLs that have store this shard. Ignores errors
func GetHashesFolder ¶
func GetHashesFolder() string
func GetLogFilePath ¶
func GetLogFilePath() string
func GetSPProfiles ¶
func GetSPProfiles(layer pl.PermissionLayerID) (StorageProviders, error)
func GetShardsFolder ¶
func GetShardsFolder() string
func InHashesFolder ¶
func InRootFolder ¶
func InShardsFolder ¶
func ProcessArgs ¶
func ProcessArgs()
func RecordActivity ¶
func RecordActivity(a *ActivityInfo)
func RelativeToRoot ¶
func SetupAccountAndDht ¶
func SetupAccountAndDht()
func StoredFilePath ¶
StoredFilePath returns the path where the file is stored on the server If shardIndex is negative, this is a whole file
func VerifyPendingUploads ¶
func VerifyPendingUploads()
VerifyPendingUploads checks previously uploaded files for validity and removes them if not valid
Types ¶
type ActivityInfo ¶
type Configuration ¶
type Configuration struct { HttpPort string `json:"http_port,omitempty"` // obsolete EthWalletPath string `json:"eth_wallet_path"` NeoWalletPath string `json:"neo_wallet_path"` Host string `json:"host"` // DNS or IP Port string `json:"port"` // the first of a consecutive range of 6 or more LogLevel string `json:"log_level"` // The following can only be edited manually EthRpcUrls []string `json:"eth_rpc_urls"` NeoRpcUrls []string `json:"neo_rpc_urls"` BootstrapPeers []string `json:"bootstrap_peers"` EthBootstrapPeers []string `json:"eth_bootstrap_peers"` NeoBootstrapPeers []string `json:"neo_bootstrap_peers"` }
func GetSPConfiguration ¶
func GetSPConfiguration() *Configuration
GetSPConfiguration returns the current configuration
func (*Configuration) String ¶
func (c *Configuration) String() string
type RegisterCommand ¶
type RegisterCommand struct { }
func (*RegisterCommand) Execute ¶
func (x *RegisterCommand) Execute(args []string) error
type StatsResponse ¶
type UnregisterCommand ¶
type UnregisterCommand struct { }
func (*UnregisterCommand) Execute ¶
func (x *UnregisterCommand) Execute(args []string) error
Click to show internal directories.
Click to hide internal directories.