Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IpfsFetcher ¶
type IpfsFetcher struct {
// contains filtered or unexported fields
}
func NewIpfsFetcher ¶
func NewIpfsFetcher(distPath string, fetchLimit int64, repoRoot *string) *IpfsFetcher
NewIpfsFetcher creates a new IpfsFetcher
Specifying "" for distPath sets the default IPNS path. Specifying 0 for fetchLimit sets the default, -1 means no limit.
Bootstrap and peer information in read from the IPFS config file in repoRoot, unless repoRoot is nil. If repoRoot is empty (""), then read the config from the default IPFS directory.
func (*IpfsFetcher) AddrInfo ¶
func (f *IpfsFetcher) AddrInfo() peer.AddrInfo
func (*IpfsFetcher) Close ¶
func (f *IpfsFetcher) Close() error
func (*IpfsFetcher) Fetch ¶
func (f *IpfsFetcher) Fetch(ctx context.Context, filePath string) (io.ReadCloser, error)
Fetch attempts to fetch the file at the given path, from the distribution site configured for this HttpFetcher. Returns io.ReadCloser on success, which caller must close.
func (*IpfsFetcher) FetchedPaths ¶
func (f *IpfsFetcher) FetchedPaths() []ipath.Path
FetchedPaths returns the IPFS paths of all items fetched by this fetcher
Click to show internal directories.
Click to hide internal directories.