scheduling

package
v2.2.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 22, 2025 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Scheduling

type Scheduling interface {
	// ScheduleCandidateParents schedules candidate parents to the normal peer to download the task.
	// Used only in v2 version of the grpc.
	ScheduleCandidateParents(context.Context, *standard.Peer, set.SafeSet[string]) error

	// ScheduleParentAndCandidateParents schedules a parent and candidate parents to the normal peer to download the task.
	// Used only in v1 version of the grpc.
	ScheduleParentAndCandidateParents(context.Context, *standard.Peer, set.SafeSet[string])

	// FindCandidateParents finds candidate parents for the peer to download the task.
	// Used only in v2 version of the grpc.
	FindCandidateParents(context.Context, *standard.Peer, set.SafeSet[string]) ([]*standard.Peer, bool)

	// FindParentAndCandidateParents finds a parent and candidate parents for the peer to download the task.
	// Used only in v1 version of the grpc.
	FindParentAndCandidateParents(context.Context, *standard.Peer, set.SafeSet[string]) ([]*standard.Peer, bool)

	// FindSuccessParent finds success parent for the peer to download the task.
	FindSuccessParent(context.Context, *standard.Peer, set.SafeSet[string]) (*standard.Peer, bool)

	// FindReplicatePersistentCacheHosts finds replicate persistent cache hosts for the peer to replicate the task. It will compare the current
	// persistent replica count with the persistent replica count and try to find enough parents. Then function will return the cached replicate parents,
	// the replicate hosts without cache and found flag.
	FindReplicatePersistentCacheHosts(context.Context, *persistentcache.Task, set.SafeSet[string]) ([]*persistentcache.Peer, []*persistentcache.Host, bool)

	// FindCandidatePersistentCacheParents finds candidate persistent cache parents for the peer to download the task.
	FindCandidatePersistentCacheParents(context.Context, *persistentcache.Peer, set.SafeSet[string]) ([]*persistentcache.Peer, bool)
}

func New

func New(cfg *config.SchedulerConfig, persistentCacheResource persistentcache.Resource, dynconfig config.DynconfigInterface, pluginDir string) Scheduling

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL