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 ¶
- type AddExecutor
- type CollectionExecutor
- type DeleteExecutor
- type IdExecutor
- type IntervalActionLoader
- type IntervalDeleter
- type IntervalLoader
- type IntervalUpdater
- type IntervalWriter
- type SchedulerQueueDeleter
- type SchedulerQueueLoader
- type SchedulerQueueUpdater
- type SchedulerQueueWriter
- type ScrubExecutor
- type UpdateExecutor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddExecutor ¶
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 ¶
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(db IntervalDeleter, scDeleter SchedulerQueueDeleter, did string) DeleteExecutor
NewDeleteByIDExecutor creates a new DeleteExecutor which deletes an interval based on id.
func NewDeleteByNameExecutor ¶
func NewDeleteByNameExecutor(db IntervalDeleter, scDeleter SchedulerQueueDeleter, dname string) DeleteExecutor
NewDeleteByNameExecutor creates a new DeleteExecutor which deletes an interval based on name.
type IdExecutor ¶
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 ¶
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.