Documentation
¶
Index ¶
- Constants
- type FileInfo
- type ListResponse
- type PathContextResponse
- type RootInfo
- type RootPermissionInfo
- type Service
- func (s *Service) ListDirectory(path string, showHidden bool) (*ListResponse, error)
- func (s *Service) PathContext() *PathContextResponse
- func (s *Service) Register(r *rpc.Router, meta *session.Meta)
- func (s *Service) RegisterWithAccessGate(r *rpc.Router, meta *session.Meta, gate *accessgate.Gate)
- func (s *Service) ServeReadFileStream(ctx context.Context, stream io.ReadWriteCloser, meta *session.Meta)
- func (s *Service) ServeReadFileStreamWithAccessGate(ctx context.Context, stream io.ReadWriteCloser, meta *session.Meta, ...)
Constants ¶
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ListResponse ¶ added in v0.7.2
type ListResponse = fsListResp
type PathContextResponse ¶ added in v0.7.2
type PathContextResponse = fsGetPathContextResp
type RootPermissionInfo ¶ added in v0.7.2
type RootPermissionInfo = fsRootPermissionInfo
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func NewServiceWithScope ¶ added in v0.6.8
func NewServiceWithScope(scope *filesystemscope.Registry) *Service
func (*Service) ListDirectory ¶ added in v0.7.2
func (s *Service) ListDirectory(path string, showHidden bool) (*ListResponse, error)
func (*Service) PathContext ¶ added in v0.7.2
func (s *Service) PathContext() *PathContextResponse
func (*Service) RegisterWithAccessGate ¶
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):
- Client -> Agent: fs_read_file_meta (length-prefixed JSON frame)
- Agent -> Client: fs_read_file_resp_meta (length-prefixed JSON frame)
- 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)
Click to show internal directories.
Click to hide internal directories.