Documentation
¶
Index ¶
- type Client
- func (cl *Client) CheckReplica(ctx context.Context, key string) ([]string, int, error)
- func (cl *Client) Config(ctx context.Context) (*config.Config, error)
- func (cl *Client) CreateFile(ctx context.Context, key string, r io.ReadCloser, rep int, ttl time.Duration, ...) error
- func (cl *Client) CreateReplica(ctx context.Context, key string, reader io.ReadCloser, ttl time.Duration, ...) (string, error)
- func (cl *Client) DeleteFile(ctx context.Context, key string) error
- func (cl *Client) GetFile(ctx context.Context, key string) (io.ReadCloser, int64, error)
- func (cl *Client) HasFile(ctx context.Context, key string) (string, bool, error)
- func (cl *Client) StatFile(ctx context.Context, key string) (*volume.FileStat, error)
- func (cl *Client) UpdateFileReplica(ctx context.Context, key string, vids []string, replica int) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is the client structure that fulfills the storing.Service interface and it's meant to be used to access to a remote node
func (*Client) CheckReplica ¶ added in v0.5.0
CheckReplica fetches the VolumeIDs and replica count for a file from a remote node.
func (*Client) CreateFile ¶
func (cl *Client) CreateFile(ctx context.Context, key string, r io.ReadCloser, rep int, ttl time.Duration, ca time.Time) error
CreateFile creates a file with the given key and the r content with rep replicas
func (*Client) CreateReplica ¶
func (cl *Client) CreateReplica(ctx context.Context, key string, reader io.ReadCloser, ttl time.Duration, ca time.Time) (string, error)
CreateReplica creates a new replica to the Node
func (*Client) DeleteFile ¶
DeleteFile deletes the file with the given key
func (*Client) HasFile ¶
HasFile returns if the file exists on this specific node (local check only).
Click to show internal directories.
Click to hide internal directories.