Documentation ¶
Index ¶
- Constants
- type Client
- func (c *Client) Close() error
- func (c *Client) CloseSession(sessionId SessionId) error
- func (c *Client) Dial() error
- func (c *Client) Download(filename, saveFile string) error
- func (c *Client) DownloadAt(filename, saveFile string, blockId int) error
- func (c *Client) GetBlock(sessionId SessionId, blockId int) ([]byte, error)
- func (c *Client) Open(filename string) (SessionId, error)
- func (c *Client) Read(sessionId SessionId, buf []byte) (int, error)
- func (c *Client) ReadAt(sessionId SessionId, offset int64, size int) ([]byte, error)
- func (c *Client) Stat(filename string) (*StatResponse, error)
- type FileRequest
- type GetRequest
- type GetResponse
- type ReadCloser
- type ReadRequest
- type ReadResponse
- type Request
- type Response
- type Rpc
- type Server
- type Session
- type SessionId
- type StatResponse
Constants ¶
View Source
const (
BLOCK_SIZE = 512 * 1024
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { Addr string // contains filtered or unexported fields }
func (*Client) CloseSession ¶
func (*Client) DownloadAt ¶
type FileRequest ¶
type FileRequest struct {
Filename string
}
type GetRequest ¶
type GetResponse ¶
type ReadCloser ¶
type ReadCloser struct {
// contains filtered or unexported fields
}
func (*ReadCloser) Close ¶
func (r *ReadCloser) Close() error
func (*ReadCloser) SessionId ¶
func (r *ReadCloser) SessionId() SessionId
type ReadRequest ¶
type ReadResponse ¶
type Rpc ¶
type Rpc struct {
// contains filtered or unexported fields
}
func (*Rpc) Read ¶
func (r *Rpc) Read(req ReadRequest, res *ReadResponse) error
func (*Rpc) ReadAt ¶
func (r *Rpc) ReadAt(req ReadRequest, res *ReadResponse) error
func (*Rpc) Stat ¶
func (r *Rpc) Stat(req FileRequest, res *StatResponse) error
type Server ¶
func (*Server) ListenAndServe ¶
type StatResponse ¶
func (*StatResponse) IsDir ¶
func (r *StatResponse) IsDir() bool
Click to show internal directories.
Click to hide internal directories.