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 *sessionrpc.Router, meta *session.Meta)
- func (s *Service) RegisterWithAccessGate(r *sessionrpc.Router, meta *session.Meta, gate *accessgate.Gate)
- func (s *Service) ServeReadFileStream(ctx context.Context, stream io.ReadWriter, meta *session.Meta)
- func (s *Service) ServeReadFileStreamWithAccessGate(ctx context.Context, stream io.ReadWriter, meta *session.Meta, ...)
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 TypeID_FS_EXTRACT uint32 = 1011 )
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 NewServiceWithCoordinator ¶ added in v0.11.0
func NewServiceWithCoordinator(scope *filesystemscope.Registry, coordinator gitruntime.FilesystemMutationCoordinator) *Service
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 (s *Service) RegisterWithAccessGate(r *sessionrpc.Router, meta *session.Meta, gate *accessgate.Gate)
func (*Service) ServeReadFileStream ¶
func (s *Service) ServeReadFileStream(ctx context.Context, stream io.ReadWriter, meta *session.Meta)
ServeReadFileStream implements the `fs/read_file` stream.
Protocol (after StreamHello):
- Client -> Agent: fs_read_file_meta (newline-terminated JSON)
- Agent -> Client: fs_read_file_resp_meta (newline-terminated JSON)
- Agent -> Client: raw file bytes (length = content_len)
The session handler owns normal FIN and error/reset teardown. This service borrows the stream; closing it here would reset unread response bytes.
func (*Service) ServeReadFileStreamWithAccessGate ¶
func (s *Service) ServeReadFileStreamWithAccessGate(ctx context.Context, stream io.ReadWriter, meta *session.Meta, gate *accessgate.Gate)
Click to show internal directories.
Click to hide internal directories.