kubesim

package
v0.0.0-...-55e4108 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2019 License: Apache-2.0 Imports: 21 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KubeSim

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

KubeSim represents a simulated kubernetes cluster.

func NewKubeSim

func NewKubeSim(
	conf *config.Config, queue queue.PodQueue, sched scheduler.Scheduler,
) (*KubeSim, error)

NewKubeSim creates a new KubeSim with the given config, queue, and scheduler. Returns error if the configuration failed.

func NewKubeSimFromConfigPath

func NewKubeSimFromConfigPath(
	confPath string, queue queue.PodQueue, sched scheduler.Scheduler,
) (*KubeSim, error)

NewKubeSimFromConfigPath creates a new KubeSim with config from confPath (excluding file extension), queue, and scheduler. Returns error if the configuration failed.

func NewKubeSimFromConfigPathOrDie

func NewKubeSimFromConfigPathOrDie(
	confPath string, queue queue.PodQueue, sched scheduler.Scheduler,
) *KubeSim

NewKubeSimFromConfigPathOrDie creates a new KubeSim with config from confPath (excluding file extension), queue, and scheduler. If an error occurs during the initialization, it panics and stops the execution.

func (*KubeSim) AddSubmitter

func (k *KubeSim) AddSubmitter(name string, submitter submitter.Submitter)

AddSubmitter adds the new submitter to this KubeSim.

func (*KubeSim) List

func (k *KubeSim) List() ([]*v1.Node, error)

List implements "k8s.io/pkg/scheduler/algorithm".NodeLister interface. Never returns an error.

func (*KubeSim) Run

func (k *KubeSim) Run(ctx context.Context) error

Run executes the main loop, which invokes submitters and the scheduler, and binds pods to the selected nodes. This method blocks until ctx is done or this KubeSim finishes processing all pods.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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