Documentation
¶
Index ¶
- Variables
- func FormatDisk(dir string) (string, error)
- func OpenDiskFS(dir string, nodeID uint64) (*diskFS, error)
- type Config
- type ExtentNode
- func (en *ExtentNode) AllocExtent(ctx context.Context, req *pb.AllocExtentRequest) (*pb.AllocExtentResponse, error)
- func (en *ExtentNode) Append(stream pb.ExtentService_AppendServer) error
- func (en *ExtentNode) AppendWithWal(ex *extent.Extent, rev int64, blocks [][]byte, mustSync bool) ([]uint32, uint32, error)
- func (en *ExtentNode) CommitLength(ctx context.Context, req *pb.CommitLengthRequest) (*pb.CommitLengthResponse, error)
- func (en *ExtentNode) CopyExtent(req *pb.CopyExtentRequest, stream pb.ExtentService_CopyExtentServer) error
- func (en *ExtentNode) Df(ctx context.Context, req *pb.DfRequest) (*pb.DfResponse, error)
- func (en *ExtentNode) Heartbeat(in *pb.Payload, stream pb.ExtentService_HeartbeatServer) error
- func (en *ExtentNode) LoadExtents() error
- func (en *ExtentNode) ReAvali(ctx context.Context, req *pb.ReAvaliRequest) (*pb.ReAvaliResponse, error)
- func (en *ExtentNode) ReadBlocks(req *pb.ReadBlocksRequest, stream pb.ExtentService_ReadBlocksServer) error
- func (en *ExtentNode) RemoveExtent(eod *ExtentOnDisk) error
- func (en *ExtentNode) RequireRecovery(ctx context.Context, req *pb.RequireRecoveryRequest) (*pb.RequireRecoveryResponse, error)
- func (en *ExtentNode) ServeGRPC(traceSampler float64) error
- func (en *ExtentNode) Shutdown()
- func (en *ExtentNode) SyncFs()
- type ExtentOnDisk
Constants ¶
This section is empty.
Variables ¶
View Source
var (
MaxConcurrentTask = int32(2)
)
Functions ¶
func FormatDisk ¶
func OpenDiskFS ¶
Types ¶
type Config ¶
type ExtentNode ¶
type ExtentNode struct {
// contains filtered or unexported fields
}
func NewExtentNode ¶
func (*ExtentNode) AllocExtent ¶
func (en *ExtentNode) AllocExtent(ctx context.Context, req *pb.AllocExtentRequest) (*pb.AllocExtentResponse, error)
func (*ExtentNode) Append ¶
func (en *ExtentNode) Append(stream pb.ExtentService_AppendServer) error
func (*ExtentNode) AppendWithWal ¶
func (en *ExtentNode) AppendWithWal(ex *extent.Extent, rev int64, blocks [][]byte, mustSync bool) ([]uint32, uint32, error)
1. req.MustSync is false, "nosync append on extent" 2. req.MustSync is true, noWal or block data is big, "sync append" 3. req.MustSync is true, hasWal and block data is small, "sync append on wal" and "nosync append on extent" on the same time.
func (*ExtentNode) CommitLength ¶
func (en *ExtentNode) CommitLength(ctx context.Context, req *pb.CommitLengthRequest) (*pb.CommitLengthResponse, error)
func (*ExtentNode) CopyExtent ¶
func (en *ExtentNode) CopyExtent(req *pb.CopyExtentRequest, stream pb.ExtentService_CopyExtentServer) error
func (*ExtentNode) Df ¶
func (en *ExtentNode) Df(ctx context.Context, req *pb.DfRequest) (*pb.DfResponse, error)
func (*ExtentNode) Heartbeat ¶
func (en *ExtentNode) Heartbeat(in *pb.Payload, stream pb.ExtentService_HeartbeatServer) error
internal services
func (*ExtentNode) LoadExtents ¶
func (en *ExtentNode) LoadExtents() error
func (*ExtentNode) ReAvali ¶
func (en *ExtentNode) ReAvali(ctx context.Context, req *pb.ReAvaliRequest) (*pb.ReAvaliResponse, error)
func (*ExtentNode) ReadBlocks ¶
func (en *ExtentNode) ReadBlocks(req *pb.ReadBlocksRequest, stream pb.ExtentService_ReadBlocksServer) error
TODO:add new API: STREAM-READER, read one single block
func (*ExtentNode) RemoveExtent ¶
func (en *ExtentNode) RemoveExtent(eod *ExtentOnDisk) error
func (*ExtentNode) RequireRecovery ¶
func (en *ExtentNode) RequireRecovery(ctx context.Context, req *pb.RequireRecoveryRequest) (*pb.RequireRecoveryResponse, error)
func (*ExtentNode) ServeGRPC ¶
func (en *ExtentNode) ServeGRPC(traceSampler float64) error
func (*ExtentNode) Shutdown ¶
func (en *ExtentNode) Shutdown()
func (*ExtentNode) SyncFs ¶
func (en *ExtentNode) SyncFs()
type ExtentOnDisk ¶
Click to show internal directories.
Click to hide internal directories.