controller

package
v0.0.0-...-58c3220 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2022 License: Apache-2.0 Imports: 41 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetupRunners

func SetupRunners(runMgr *WorkersManager, kubeMgr manager.Manager, db *sql.DB, cfg config.Config)

Types

type Controller

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

func NewController

func NewController(config *config.Config) (*Controller, error)

func (*Controller) Run

func (s *Controller) Run(ctx context.Context) error

type GenericWorker

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

func NewGenericWorker

func NewGenericWorker(
	name string,
	launchPeriod time.Duration,
	syncer types.RuntimeAdapter,
) GenericWorker

func (*GenericWorker) GetNotSynced

func (r *GenericWorker) GetNotSynced() (
	toCreateInService []types.StorageEntity,
	toUpdateInService []types.StorageEntity,
	toDeleteInService []types.RuntimeEntity,
	toDeleteInDB []types.StorageEntity, err error)

func (*GenericWorker) Run

func (r *GenericWorker) Run(ctx context.Context) (err error)

func (*GenericWorker) String

func (r *GenericWorker) String() string

Return name of runner

func (*GenericWorker) SyncSpecs

func (r *GenericWorker) SyncSpecs(_ context.Context) error

func (*GenericWorker) SyncStatus

func (r *GenericWorker) SyncStatus(re types.RuntimeEntity, se types.StorageEntity) error

type Runnable

type Runnable interface {
	Run(ctx context.Context) error
	String() string
}

type WorkersManager

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

func NewWorkersManager

func NewWorkersManager() *WorkersManager

func (*WorkersManager) AddRunnable

func (r *WorkersManager) AddRunnable(runnable Runnable)

func (*WorkersManager) Run

func (r *WorkersManager) Run(ctx context.Context) error

Directories

Path Synopsis
adapters

Jump to

Keyboard shortcuts

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