Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DataScheduler ¶
type DataScheduler interface { // state should be got from SchedulerResult which is got from last caller for the same range request. Schedule(ctx context.Context, rr basic.RangeRequest, state ScheduleState) (SchedulerResult, error) }
DataScheduler defines how to schedule peers for range request.
type ScheduleState ¶
type ScheduleState interface { // Continue tells user if reschedule the request range again. Continue() bool }
ScheduleState defines the state of this schedule.
type SchedulerResult ¶
type SchedulerResult interface { // Result get the schedule result for range data which may not include all data of request range. Result() []*basic.SchedulePieceDataResult // State gets the temporary states of this schedule which binds to range request. State() ScheduleState }
SchedulerResult defines the schedule result of request range. For some implementation, developer could do more than one schedule for the same request range.
Click to show internal directories.
Click to hide internal directories.