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(ctx context.Context, req *pb.AppendRequest) (*pb.AppendResponse, error)
- func (en *ExtentNode) AppendWithWal(ex *extent.Extent, rev int64, blocks []*pb.Block, 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(ctx context.Context, req *pb.ReadBlocksRequest) (*pb.ReadBlocksResponse, error)
- func (en *ExtentNode) ReadEntries(ctx context.Context, req *pb.ReadEntriesRequest) (*pb.ReadEntriesResponse, error)
- func (en *ExtentNode) ReplicateBlocks(ctx context.Context, req *pb.ReplicateBlocksRequest) (*pb.ReplicateBlocksResponse, error)
- func (en *ExtentNode) RequireRecovery(ctx context.Context, req *pb.RequireRecoveryRequest) (*pb.RequireRecoveryResponse, error)
- func (en *ExtentNode) ServeGRPC() error
- func (en *ExtentNode) Shutdown()
- func (en *ExtentNode) SmartReadBlocks(ctx context.Context, req *pb.ReadBlocksRequest) (*pb.ReadBlocksResponse, error)
- 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(ctx context.Context, req *pb.AppendRequest) (*pb.AppendResponse, error)
func (*ExtentNode) AppendWithWal ¶
func (en *ExtentNode) AppendWithWal(ex *extent.Extent, rev int64, blocks []*pb.Block, 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(ctx context.Context, req *pb.ReadBlocksRequest) (*pb.ReadBlocksResponse, error)
func (*ExtentNode) ReadEntries ¶
func (en *ExtentNode) ReadEntries(ctx context.Context, req *pb.ReadEntriesRequest) (*pb.ReadEntriesResponse, error)
func (*ExtentNode) ReplicateBlocks ¶
func (en *ExtentNode) ReplicateBlocks(ctx context.Context, req *pb.ReplicateBlocksRequest) (*pb.ReplicateBlocksResponse, error)
func (*ExtentNode) RequireRecovery ¶
func (en *ExtentNode) RequireRecovery(ctx context.Context, req *pb.RequireRecoveryRequest) (*pb.RequireRecoveryResponse, error)
func (*ExtentNode) ServeGRPC ¶
func (en *ExtentNode) ServeGRPC() error
func (*ExtentNode) Shutdown ¶
func (en *ExtentNode) Shutdown()
func (*ExtentNode) SmartReadBlocks ¶
func (en *ExtentNode) SmartReadBlocks(ctx context.Context, req *pb.ReadBlocksRequest) (*pb.ReadBlocksResponse, error)
func (*ExtentNode) SyncFs ¶
func (en *ExtentNode) SyncFs()
type ExtentOnDisk ¶
Click to show internal directories.
Click to hide internal directories.