Class: GftpStorageProvider
storage/gftp.GftpStorageProvider
Implements
Table of contents
Constructors
Methods
Constructors
constructor
• new GftpStorageProvider(logger?
)
Parameters
Name | Type |
---|---|
logger? | Logger |
Defined in
Methods
init
▸ init(): Promise
<void
>
Initialize storage provider.
Returns
Promise
<void
>
Implementation of
Defined in
isInitiated
▸ isInitiated(): boolean
Returns
boolean
Defined in
receiveFile
▸ receiveFile(path
): Promise
<string
>
Return allocated resource URL from Yagna of a file to be downloaded.
Parameters
Name | Type |
---|---|
path | string |
Returns
Promise
<string
>
Implementation of
Defined in
receiveData
▸ receiveData(callback
): Promise
<string
>
Return allocated resource URL from Yagna of a file to be downloaded.
Parameters
Name | Type |
---|---|
callback | StorageProviderDataCallback |
Returns
Promise
<string
>
Implementation of
Defined in
publishFile
▸ publishFile(src
): Promise
<string
>
Return allocated resource URL from Yagna of a file to be uploaded.
Parameters
Name | Type |
---|---|
src | string |
Returns
Promise
<string
>
Implementation of
Defined in
publishData
▸ publishData(src
): Promise
<string
>
Return allocated resource URL from Yagna of data to be uploaded.
Parameters
Name | Type |
---|---|
src | Uint8Array |
Returns
Promise
<string
>
Implementation of
Defined in
release
▸ release(urls
): Promise
<void
>
Release previously allocated resource URL from Yagna.
Parameters
Name | Type |
---|---|
urls | string [] |
Returns
Promise
<void
>
Implementation of
Defined in
close
▸ close(): Promise
<void
>
Close storage provider and release all resources.
Returns
Promise
<void
>
Implementation of
Defined in
readStream
▸ readStream(readable
): AsyncGenerator
<string
, void
, unknown
>
Parameters
Name | Type |
---|---|
readable | any |
Returns
AsyncGenerator
<string
, void
, unknown
>