provideradmin

package
v0.0.0-...-e76b1b5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 15, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package provideradmin - contains the provideradmin code.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FilecoinRetrievalProviderAdmin

type FilecoinRetrievalProviderAdmin struct {
	// contains filtered or unexported fields
}

func NewFilecoinRetrievalProviderAdmin

func NewFilecoinRetrievalProviderAdmin() *FilecoinRetrievalProviderAdmin

NewFilecoinRetrievalProviderAdmin initialises the Filecoin Retrieval Provider Admin.

func (*FilecoinRetrievalProviderAdmin) FastPublishOffer

func (a *FilecoinRetrievalProviderAdmin) FastPublishOffer(targetID string, filename string, tag string, price *big.Int, expiry int64, qos uint64) error

FastPublishOffer uploads a file to given provider then asks it to publish the offer

func (*FilecoinRetrievalProviderAdmin) ForceSync

func (a *FilecoinRetrievalProviderAdmin) ForceSync(targetID string) error

ForceSync forces a given managed provider to sync

func (*FilecoinRetrievalProviderAdmin) GetOfferByCID

func (a *FilecoinRetrievalProviderAdmin) GetOfferByCID(targetID string, cid string) (
	[]string,
	[]string,
	[]string,
	[]int64,
	[]uint64,
	error,
)

GetOfferByCID gets offers containing given cid from a managed provider

func (*FilecoinRetrievalProviderAdmin) InitialiseProvider

func (a *FilecoinRetrievalProviderAdmin) InitialiseProvider(
	adminURL string,
	adminKey string,
	p2pPort int,
	providerIP string,
	rootPrivKey string,
	lotusAPIAddr string,
	lotusAuthToken string,
	registerPrivKey string,
	registerAPIAddr string,
	registerAuthToken string,
	regionCode string,
	alias string,
) error

InitialiseProvider initialises given provider.

func (*FilecoinRetrievalProviderAdmin) ListFiles

func (a *FilecoinRetrievalProviderAdmin) ListFiles(targetID string) (
	[]string,
	[]string,
	[]int64,
	[]bool,
	[]int,
	error,
)

ListFiles lists all the files a given provider is monitoring.

func (*FilecoinRetrievalProviderAdmin) ListProviders

func (a *FilecoinRetrievalProviderAdmin) ListProviders() (
	[]string,
	[]string,
	[]string,
)

ListProviders lists the list of active providers. It returns a slice of provider ids and a corresponding slice of region code and alias.

func (*FilecoinRetrievalProviderAdmin) PublishOffer

func (a *FilecoinRetrievalProviderAdmin) PublishOffer(targetID string, files []string, price *big.Int, expiry int64, qos uint64) (
	bool,
	string,
	error,
)

PublishOffer asks given managed provider to publish an offer

func (*FilecoinRetrievalProviderAdmin) UploadFile

func (a *FilecoinRetrievalProviderAdmin) UploadFile(targetID string, filename string, tag string) (
	bool,
	string,
	error,
)

UploadFile uploads a file to given managed provider

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL