Documentation ¶
Overview ¶
Package fsserver implements a gRPC server to do local file IO.
Index ¶
- func RegisterService(s grpc.ServiceRegistrar, callbacks Callbacks)
- type Callbacks
- type Peer
- type Service
- func (s *Service) Close(ctx context.Context, req *pb.CloseRequest) (*empty.Empty, error)
- func (s *Service) Fstat(ctx context.Context, req *pb.FstatRequest) (*pb.StatResponse, error)
- func (s *Service) Fsync(ctx context.Context, req *pb.FsyncRequest) (*empty.Empty, error)
- func (s *Service) Ftruncate(ctx context.Context, req *pb.FtruncateRequest) (*empty.Empty, error)
- func (s *Service) KeepAlive(ctx context.Context, req *pb.KeepAliveRequest) (*empty.Empty, error)
- func (s *Service) Mkdir(ctx context.Context, req *pb.MkdirRequest) (*empty.Empty, error)
- func (s *Service) Open(ctx context.Context, req *pb.OpenRequest) (*pb.OpenResponse, error)
- func (s *Service) Read(ctx context.Context, req *pb.ReadRequest) (*pb.ReadResponse, error)
- func (s *Service) ReadAt(ctx context.Context, req *pb.ReadAtRequest) (*pb.ReadResponse, error)
- func (s *Service) Readdir(ctx context.Context, req *pb.ReaddirRequest) (*pb.ReaddirResponse, error)
- func (s *Service) Rename(ctx context.Context, req *pb.RenameRequest) (*empty.Empty, error)
- func (s *Service) Rmdir(ctx context.Context, req *pb.RmdirRequest) (*empty.Empty, error)
- func (s *Service) Seek(ctx context.Context, req *pb.SeekRequest) (*pb.SeekResponse, error)
- func (s *Service) Stat(ctx context.Context, req *pb.StatRequest) (*pb.StatResponse, error)
- func (s *Service) Truncate(ctx context.Context, req *pb.TruncateRequest) (*empty.Empty, error)
- func (s *Service) Unlink(ctx context.Context, req *pb.UnlinkRequest) (*empty.Empty, error)
- func (s *Service) Write(ctx context.Context, req *pb.WriteRequest) (*pb.WriteResponse, error)
- func (s *Service) WriteAt(ctx context.Context, req *pb.WriteAtRequest) (*pb.WriteResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterService ¶
func RegisterService(s grpc.ServiceRegistrar, callbacks Callbacks)
RegisterService creates the services and registers it with the given gRPC server.
Types ¶
type Callbacks ¶
type Callbacks interface { PeerFromContext(context.Context) (Peer, codes.Code, error) ResolvePath(peer Peer, path string) (string, codes.Code, error) }
Callbacks are the callbacks this library needs from callers.
type Service ¶
type Service struct { // "Unsafe" so it doesn't compile if we don't implement all the methods. pb.UnsafeRemoteFileSystemServiceServer // contains filtered or unexported fields }
Service implements pb.RemoteFileSystemServiceServer and can be registered with a grpc.Server.
func NewService ¶
NewService instantiates a new Service.
func (*Service) Fstat ¶
func (s *Service) Fstat(ctx context.Context, req *pb.FstatRequest) (*pb.StatResponse, error)
func (*Service) Open ¶
func (s *Service) Open(ctx context.Context, req *pb.OpenRequest) (*pb.OpenResponse, error)
func (*Service) Read ¶
func (s *Service) Read(ctx context.Context, req *pb.ReadRequest) (*pb.ReadResponse, error)
func (*Service) ReadAt ¶
func (s *Service) ReadAt(ctx context.Context, req *pb.ReadAtRequest) (*pb.ReadResponse, error)
func (*Service) Readdir ¶
func (s *Service) Readdir(ctx context.Context, req *pb.ReaddirRequest) (*pb.ReaddirResponse, error)
func (*Service) Seek ¶
func (s *Service) Seek(ctx context.Context, req *pb.SeekRequest) (*pb.SeekResponse, error)
func (*Service) Stat ¶
func (s *Service) Stat(ctx context.Context, req *pb.StatRequest) (*pb.StatResponse, error)
func (*Service) Write ¶
func (s *Service) Write(ctx context.Context, req *pb.WriteRequest) (*pb.WriteResponse, error)
func (*Service) WriteAt ¶
func (s *Service) WriteAt(ctx context.Context, req *pb.WriteAtRequest) (*pb.WriteResponse, error)
Click to show internal directories.
Click to hide internal directories.