scheduler

package
v1.9.3 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2020 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotStopping = errors.New("not stopping")
)

Functions

This section is empty.

Types

type IPScheduler

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

func NewIPScheduler

func NewIPScheduler(config config.Config, etcd *clientv3.Client, storage models.Storage, leaseManager locker.EtcdLeaseManager) *IPScheduler

func (*IPScheduler) ConfiguredIPs

func (s *IPScheduler) ConfiguredIPs(ctx context.Context) []api.IP

func (*IPScheduler) GetIP

func (s *IPScheduler) GetIP(ctx context.Context, id string) *api.IP

func (*IPScheduler) Start

func (s *IPScheduler) Start(ctx context.Context, ipAddr models.IP) (models.IP, error)

func (*IPScheduler) Status

func (s *IPScheduler) Status(id string) string

func (*IPScheduler) Stop

func (s *IPScheduler) Stop(ctx context.Context, id string) error

func (*IPScheduler) TryGetLock

func (s *IPScheduler) TryGetLock(ctx context.Context, id string) bool

type Scheduler

type Scheduler interface {
	Start(context.Context, models.IP) (models.IP, error)
	Stop(ctx context.Context, id string) error
	Status(string) string
	ConfiguredIPs(ctx context.Context) []api.IP
	GetIP(ctx context.Context, id string) *api.IP
	TryGetLock(ctx context.Context, id string) bool
}

Directories

Path Synopsis
Package schedulermock is a generated GoMock package.
Package schedulermock is a generated GoMock package.

Jump to

Keyboard shortcuts

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