remotefs

package
v0.2.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 28, 2023 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Serve

func Serve(fsys fs.FS, ln net.Listener) error

Serve the filesystem from a listener

func ServeFrom

func ServeFrom(ctx context.Context, fsys fs.FS, prefix string) error

ServeFrom serves the filesystem from a listener passed in by a parent process

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func Dial

func Dial(ctx context.Context, addr string) (*Client, error)

func NewClient

func NewClient(rpc *rpc.Client) *Client

func (*Client) Close

func (c *Client) Close() error

func (*Client) Open

func (c *Client) Open(name string) (fs.File, error)

func (*Client) ReadDir

func (c *Client) ReadDir(name string) (des []fs.DirEntry, err error)

func (*Client) WithContext

func (c *Client) WithContext(ctx context.Context) *Client

type Command

type Command shell.Command

Command helps you launch a remotefs server and connect to it with the remotefs client

func (*Command) Start

func (c *Command) Start(ctx context.Context, name string, args ...string) (*Process, error)

type Process

type Process struct {
	// contains filtered or unexported fields
}

func (*Process) Close

func (p *Process) Close() error

func (*Process) Open

func (p *Process) Open(name string) (fs.File, error)

func (*Process) ReadDir

func (p *Process) ReadDir(name string) (des []fs.DirEntry, err error)

func (*Process) URL

func (p *Process) URL() string

type Service

type Service struct {
	// contains filtered or unexported fields
}

func NewService

func NewService(fsys fs.FS) *Service

func (*Service) Open

func (s *Service) Open(path string, vfile *virtual.File) error

func (*Service) ReadDir

func (s *Service) ReadDir(name string, vdes *[]fs.DirEntry) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL