fs

package
v0.6.3 Latest Latest
Warning

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

Go to latest
Published: May 12, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TypeID_FS_LIST             uint32 = 1001
	TypeID_FS_READ_FILE        uint32 = 1002
	TypeID_FS_WRITE            uint32 = 1003
	TypeID_FS_RENAME           uint32 = 1004
	TypeID_FS_COPY             uint32 = 1005
	TypeID_FS_DELETE           uint32 = 1006
	TypeID_FS_MKDIR            uint32 = 1007
	TypeID_FS_GET_PATH_CONTEXT uint32 = 1010
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

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

func NewService

func NewService(agentHomeAbs string) *Service

func (*Service) Register

func (s *Service) Register(r *rpc.Router, meta *session.Meta)

func (*Service) RegisterWithAccessGate

func (s *Service) RegisterWithAccessGate(r *rpc.Router, meta *session.Meta, gate *accessgate.Gate)

func (*Service) ServeReadFileStream

func (s *Service) ServeReadFileStream(ctx context.Context, stream io.ReadWriteCloser, meta *session.Meta)

ServeReadFileStream implements the `fs/read_file` stream.

Protocol (after StreamHello):

  1. Client -> Agent: fs_read_file_meta (length-prefixed JSON frame)
  2. Agent -> Client: fs_read_file_resp_meta (length-prefixed JSON frame)
  3. Agent -> Client: raw file bytes (length = content_len), then close

func (*Service) ServeReadFileStreamWithAccessGate

func (s *Service) ServeReadFileStreamWithAccessGate(ctx context.Context, stream io.ReadWriteCloser, meta *session.Meta, gate *accessgate.Gate)

Jump to

Keyboard shortcuts

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