meta

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Meta

type Meta struct {
	// contains filtered or unexported fields
}

type MetadataManager

type MetadataManager interface {
	GetStore(addr string) (*store.Store, error)
	AddStore(addr string) error
	RemoveStore(addr string) error
	GetAllStores() []*store.Store
}

type NodeStatus

type NodeStatus struct {
	ID            string
	Address       string
	Alive         bool
	LastHeartbeat time.Time
	Capacity      int
	Availability  bool
}

type RoundRobinScheduler

type RoundRobinScheduler struct {
	// contains filtered or unexported fields
}

func (*RoundRobinScheduler) SelectNode

func (s *RoundRobinScheduler) SelectNode(key []byte) (*NodeStatus, error)

type Scheduler

type Scheduler struct {
	// contains filtered or unexported fields
}

func NewScheduler

func NewScheduler(config *SchedulerConfig) *Scheduler

func (*Scheduler) ScheduleNode

func (s *Scheduler) ScheduleNode(key []byte) (*NodeStatus, error)

func (*Scheduler) SetSchedulingStrategy

func (s *Scheduler) SetSchedulingStrategy(strategy SchedulingStrategy)

type SchedulerConfig

type SchedulerConfig struct {
	MaxLoad              int
	MinLoad              int
	ReplicationFactor    int
	DataShardingStrategy string
	PriorityStrategy     string
	SchedulingAlgorithm  string
}

type SchedulingStrategy

type SchedulingStrategy interface {
	SelectNode(nodes []*NodeStatus, key []byte) (*NodeStatus, error)
}

Jump to

Keyboard shortcuts

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