scheduler

package
v0.1.96 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2024 License: MIT Imports: 15 Imported by: 0

README

Scheduler

Scheduler rus, configures and stops goroutines Should know nothing about K8s. It uses protobuf generated objects only for the sake of simplicity

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Schedule

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

func New

func New(outsideHandler runner.Handler) *Schedule

func (*Schedule) Destroy

func (s *Schedule) Destroy(name string) error

func (*Schedule) Handle added in v0.1.53

func (s *Schedule) Handle(ctx context.Context, msg *runner.Msg) error

Handle could be external and synchronous

func (*Schedule) HandleInternal added in v0.1.63

func (s *Schedule) HandleInternal(ctx context.Context, msg *runner.Msg) error

HandleInternal only local and async

func (*Schedule) Install

func (s *Schedule) Install(component module.Component) error

func (*Schedule) SetLogger

func (s *Schedule) SetLogger(l logr.Logger) *Schedule

func (*Schedule) SetManager added in v0.1.25

func (s *Schedule) SetManager(m resource.ManagerInterface) *Schedule

func (*Schedule) SetMeter added in v0.1.53

func (s *Schedule) SetMeter(m metric.Meter) *Schedule

func (*Schedule) SetTracer added in v0.1.53

func (s *Schedule) SetTracer(t trace.Tracer) *Schedule

func (*Schedule) SetTracker added in v0.1.65

func (s *Schedule) SetTracker(t tracker.Manager) *Schedule

func (*Schedule) Start

func (s *Schedule) Start(ctx context.Context) error

func (*Schedule) Update added in v0.1.63

func (s *Schedule) Update(ctx context.Context, node *v1alpha1.TinyNode) error

Update updates node instance or creates one

type Scheduler

type Scheduler interface {
	//Install makes component available to run instances
	Install(component module.Component) error

	//Update creates a new instance by using unique name, if instance exists - updates one
	Update(ctx context.Context, node *v1alpha1.TinyNode) error

	Handle(ctx context.Context, msg *runner.Msg) error
	//HandleInternal same as Handle but does not wait until port unblock and does not fall back msg outside
	HandleInternal(ctx context.Context, msg *runner.Msg) error
	//Destroy stops the instance and deletes it
	Destroy(name string) error
	//Start starts scheduler
	Start(ctx context.Context) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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