interval

package
v1.2.2-dev.57 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

******************************************************************************

  • Copyright 2019 VMware Inc. *
  • Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
  • in compliance with the License. You may obtain a copy of the License at *
  • http://www.apache.org/licenses/LICENSE-2.0 *
  • Unless required by applicable law or agreed to in writing, software distributed under the License
  • is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
  • or implied. See the License for the specific language governing permissions and limitations under
  • the License. ******************************************************************************

******************************************************************************

  • Copyright 2019 VMware Inc. *
  • Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
  • in compliance with the License. You may obtain a copy of the License at *
  • http://www.apache.org/licenses/LICENSE-2.0 *
  • Unless required by applicable law or agreed to in writing, software distributed under the License
  • is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
  • or implied. See the License for the specific language governing permissions and limitations under
  • the License. ******************************************************************************

******************************************************************************

  • Copyright 2019 VMware Inc. *
  • Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
  • in compliance with the License. You may obtain a copy of the License at *
  • http://www.apache.org/licenses/LICENSE-2.0 *
  • Unless required by applicable law or agreed to in writing, software distributed under the License
  • is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
  • or implied. See the License for the specific language governing permissions and limitations under
  • the License. ******************************************************************************

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddExecutor

type AddExecutor interface {
	Execute() (string, error)
}

func NewAddExecutor

func NewAddExecutor(db IntervalWriter, scClient SchedulerQueueWriter, interval contract.Interval) AddExecutor

This factory method returns an executor used to add an addressable.

type CollectionExecutor

type CollectionExecutor interface {
	Execute() ([]contract.Interval, error)
}

func NewAllExecutor

func NewAllExecutor(db IntervalLoader, limit int) CollectionExecutor

type DeleteExecutor

type DeleteExecutor interface {
	Execute() error
}

DeleteExecutor handles the deletion of a interval. Returns ErrIntervalNotFound if an interval could not be found with a matching ID

func NewDeleteByIDExecutor

func NewDeleteByIDExecutor(
	intervalDeleter IntervalDeleter,
	sqDeleter SchedulerQueueDeleter,
	did string) DeleteExecutor

NewDeleteByIDExecutor creates a new DeleteExecutor which deletes an interval based on id.

func NewDeleteByNameExecutor

func NewDeleteByNameExecutor(
	intervalDeleter IntervalDeleter,
	sqDeleter SchedulerQueueDeleter,
	dname string) DeleteExecutor

NewDeleteByNameExecutor creates a new DeleteExecutor which deletes an interval based on name.

type IdExecutor

type IdExecutor interface {
	Execute() (contract.Interval, error)
}

func NewIdExecutor

func NewIdExecutor(db IntervalLoader, id string) IdExecutor

func NewNameExecutor

func NewNameExecutor(db IntervalLoader, name string) IdExecutor

type IntervalActionLoader

type IntervalActionLoader interface {
	IntervalActionsByIntervalName(name string) ([]contract.IntervalAction, error)
}

type IntervalDeleter

type IntervalDeleter interface {
	DeleteIntervalById(id string) error
	ScrubAllIntervals() (int, error)
	IntervalLoader
	IntervalActionLoader
}

IntervalDeleter deletes interval.

type IntervalLoader

type IntervalLoader interface {
	Intervals() ([]contract.Interval, error)
	IntervalsWithLimit(limit int) ([]contract.Interval, error)
	IntervalById(id string) (contract.Interval, error)
	IntervalByName(name string) (contract.Interval, error)
}

IntervalLoader provides functionality for obtaining Interval.

type IntervalUpdater

type IntervalUpdater interface {
	UpdateInterval(interval contract.Interval) error
	IntervalLoader
	IntervalActionLoader
}

IntervalUpdater updates interval.

type IntervalWriter

type IntervalWriter interface {
	AddInterval(interval contract.Interval) (string, error)
	IntervalLoader
}

IntervalWriter adds interval.

type SchedulerQueueDeleter

type SchedulerQueueDeleter interface {
	RemoveIntervalInQueue(intervalId string) error
	SchedulerQueueLoader
}

SchedulerQueueDeleter deletes interval from SchedulerQueue

type SchedulerQueueLoader

type SchedulerQueueLoader interface {
	QueryIntervalByID(intervalId string) (contract.Interval, error)
	QueryIntervalByName(intervalName string) (contract.Interval, error)
}

SchedulerQueueLoader provides functionality for obtaining Interval from SchedulerQueue

type SchedulerQueueUpdater

type SchedulerQueueUpdater interface {
	UpdateIntervalInQueue(interval contract.Interval) error
	SchedulerQueueLoader
}

SchedulerQueueUpdater update interval in SchedulerQueue

type SchedulerQueueWriter

type SchedulerQueueWriter interface {
	AddIntervalToQueue(interval contract.Interval) error
	SchedulerQueueLoader
}

SchedulerQueueWriter adds interval in SchedulerQueue

type ScrubExecutor

type ScrubExecutor interface {
	Execute() (int, error)
}

func NewScrubExecutor

func NewScrubExecutor(db IntervalDeleter) ScrubExecutor

NewDeleteByScrubExecutor creates a new DeleteExecutor which scrubs intervals.

type UpdateExecutor

type UpdateExecutor interface {
	Execute() error
}

func NewUpdateExecutor

func NewUpdateExecutor(database IntervalUpdater, scClient SchedulerQueueUpdater, interval contract.Interval) UpdateExecutor

This factory method returns an executor used to update an addressable.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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