scheduler

package
v0.1.34 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2023 License: MIT Imports: 12 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() *Schedule

func (*Schedule) Destroy

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

func (*Schedule) Install

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

func (*Schedule) Invoke

func (s *Schedule) Invoke(ctx context.Context, node string, port string, data []byte) (v1alpha1.TinyNodeStatus, error)

Invoke sends data to the port of given instance name @todo

func (*Schedule) SetLogger

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

func (*Schedule) SetManager added in v0.1.25

func (s *Schedule) SetManager(m manager.ResourceInterface) *Schedule

func (*Schedule) Start

func (s *Schedule) Start(ctx context.Context, eventBus chan *runner.Msg, outsideCh chan *runner.Msg, callbacks ...tracker.Callback) error

func (*Schedule) Upsert

Upsert updates or creates instance

type Scheduler

type Scheduler interface {
	//Install makes component available for running nodes
	Install(component module.Component) error
	//Upsert creates a new instance by using unique name, if instance is already running - updates it
	Upsert(node v1alpha1.TinyNode) (v1alpha1.TinyNodeStatus, error)
	//Invoke sends data to the port of the given instance
	Invoke(ctx context.Context, name string, port string, data []byte) (v1alpha1.TinyNodeStatus, error)
	//Destroy stops the instance
	Destroy(name string) error
	//Start starts scheduler
	Start(ctx context.Context, inputCh chan *runner.Msg, outputCh chan *runner.Msg, callbacks ...tracker.Callback) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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