scheduler

package
v0.0.0-...-d79ed59 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package scheduler is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockExecutor

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

MockExecutor is a mock of Executor interface.

func NewMockExecutor

func NewMockExecutor(ctrl *gomock.Controller) *MockExecutor

NewMockExecutor creates a new mock instance.

func (*MockExecutor) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockExecutor) Exists

func (m *MockExecutor) Exists(arg0 context.Context, arg1 entity.Workload) (bool, error)

Exists mocks base method.

func (*MockExecutor) GetState

func (m *MockExecutor) GetState(arg0 context.Context, arg1 entity.Workload) (string, error)

GetState mocks base method.

func (*MockExecutor) Remove

func (m *MockExecutor) Remove(arg0 context.Context, arg1 entity.Workload) error

Remove mocks base method.

func (*MockExecutor) Run

func (m *MockExecutor) Run(arg0 context.Context, arg1 entity.Workload) error

Run mocks base method.

func (*MockExecutor) Stop

func (m *MockExecutor) Stop(arg0 context.Context, arg1 entity.Workload) error

Stop mocks base method.

type MockExecutorMockRecorder

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

MockExecutorMockRecorder is the mock recorder for MockExecutor.

func (*MockExecutorMockRecorder) Exists

func (mr *MockExecutorMockRecorder) Exists(arg0, arg1 interface{}) *gomock.Call

Exists indicates an expected call of Exists.

func (*MockExecutorMockRecorder) GetState

func (mr *MockExecutorMockRecorder) GetState(arg0, arg1 interface{}) *gomock.Call

GetState indicates an expected call of GetState.

func (*MockExecutorMockRecorder) Remove

func (mr *MockExecutorMockRecorder) Remove(arg0, arg1 interface{}) *gomock.Call

Remove indicates an expected call of Remove.

func (*MockExecutorMockRecorder) Run

func (mr *MockExecutorMockRecorder) Run(arg0, arg1 interface{}) *gomock.Call

Run indicates an expected call of Run.

func (*MockExecutorMockRecorder) Stop

func (mr *MockExecutorMockRecorder) Stop(arg0, arg1 interface{}) *gomock.Call

Stop indicates an expected call of Stop.

type Scheduler

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

func New

func New(executor common.Executor) *Scheduler

New creates a new scheduler with the default heartbeat period of 2 seconds.

func NewWitHeartbeatPeriod

func NewWitHeartbeatPeriod(executor common.Executor, heartbeatPeriod time.Duration) *Scheduler

New creates a new scheduler with the hearbeat period provided by the user.

func (*Scheduler) Start

func (s *Scheduler) Start(ctx context.Context, input chan entity.Message, profileUpdateCh chan []profile.ProfileEvaluationResult)

func (*Scheduler) Stop

func (s *Scheduler) Stop(ctx context.Context)

type Store

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

it is *not* thread safe

func NewStore

func NewStore() *Store

func (*Store) Add

func (s *Store) Add(t *entity.Job)

func (*Store) Clone

func (s *Store) Clone() *Store

func (*Store) Delete

func (s *Store) Delete(element *entity.Job) *entity.Job

func (*Store) Find

func (s *Store) Find(id string) (*entity.Job, bool)

func (*Store) Get

func (s *Store) Get(idx int) (*entity.Job, bool)

func (*Store) Len

func (s *Store) Len() int

func (*Store) ToList

func (s *Store) ToList() []*entity.Job

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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