Documentation
¶
Index ¶
- func HostForRemoteClient(cfg *Config) (host.Host, error)
- func MakeRemoteDataNodeClient(ctx context.Context, host host.Host, target string, timeout int, token string) (core.RemoteDataNodeClient, error)
- type Client
- func (cl *Client) Add(p string, objname string) (*MetaInfo, error)
- func (cl *Client) AddReader(r io.Reader, fsize int64, fname string, objname string) (*MetaInfo, error)
- func (cl *Client) FileInfo(objname string) (*MetaInfo, error)
- func (cl *Client) Get(objname string) (io.ReadCloser, error)
- func (cl *Client) GetByCid(cidstr string) (io.ReadCloser, error)
- func (cl *Client) GetDataStore() datastore.Batching
- type Config
- type MetaInfo
- type RemoteStore
- func (d *RemoteStore) Batch() (ds.Batch, error)
- func (d *RemoteStore) Close() error
- func (d *RemoteStore) Delete(k ds.Key) error
- func (d *RemoteStore) Get(k ds.Key) ([]byte, error)
- func (d *RemoteStore) GetSize(k ds.Key) (int, error)
- func (d *RemoteStore) Has(k ds.Key) (bool, error)
- func (d *RemoteStore) Put(k ds.Key, value []byte) error
- func (d *RemoteStore) Query(q dsq.Query) (dsq.Results, error)
- func (d *RemoteStore) Sync(ds.Key) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) GetDataStore ¶ added in v0.0.7
func (cl *Client) GetDataStore() datastore.Batching
type Config ¶
type Config struct { AccessToken string `json:"access_token"` Bucket string `json:"bucket"` Timeout int `json:"timeout"` SwarmKey string `json:"swarmkey"` Target string `json:"target"` }
func ReadConfig ¶
type RemoteStore ¶
type RemoteStore struct {
// contains filtered or unexported fields
}
func NewRemoteStore ¶
func NewRemoteStoreWithClient ¶
func NewRemoteStoreWithClient(ctx context.Context, h host.Host, client core.RemoteDataNodeClient) *RemoteStore
func (*RemoteStore) Close ¶
func (d *RemoteStore) Close() error
Click to show internal directories.
Click to hide internal directories.