Documentation ¶
Overview ¶
******************************************************************************
- Copyright 2017 Dell 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 2018 Dell 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
- func LoadScheduler(lc logger.LoggingClient, dbClient interfaces.DBClient, ...) error
- func Main(ctx context.Context, cancel context.CancelFunc, router *mux.Router, ...)
- func StartTicker(ticker *time.Ticker, lc logger.LoggingClient, ...)
- func StopTicker(ticker *time.Ticker)
- type Bootstrap
- type IntervalContext
- type QueueClient
- func (qc *QueueClient) AddIntervalActionToQueue(intervalAction contract.IntervalAction) error
- func (qc *QueueClient) AddIntervalToQueue(interval contract.Interval) error
- func (qc *QueueClient) Connect() (string, error)
- func (qc *QueueClient) QueryIntervalActionByID(intervalActionId string) (contract.IntervalAction, error)
- func (qc *QueueClient) QueryIntervalActionByName(intervalActionName string) (contract.IntervalAction, error)
- func (qc *QueueClient) QueryIntervalByID(intervalId string) (contract.Interval, error)
- func (qc *QueueClient) QueryIntervalByName(intervalName string) (contract.Interval, error)
- func (qc *QueueClient) RemoveIntervalActionQueue(intervalActionId string) error
- func (qc *QueueClient) RemoveIntervalInQueue(intervalId string) error
- func (qc *QueueClient) UpdateIntervalActionQueue(intervalAction contract.IntervalAction) error
- func (qc *QueueClient) UpdateIntervalInQueue(interval contract.Interval) error
Constants ¶
View Source
const ( /* -------------- Constants for Scheduler -------------------- */ ID = "id" NAME = "name" TARGETNAME = "targetname" INTERVALACTION = "intervalaction" INTERVAL = "interval" LABEL = "label" YAML = "yaml" COMMAND = "command" KEY = "key" VALUE = "value" UNLOCKED = "UNLOCKED" ENABLED = "ENABLED" TIMELAYOUT = "20060102T150405" SCRUB = "scrub" TARGET = "target" /* ---------------- URL PARAM NAMES -----------------------*/ ContentTypeKey = "Content-Type" ContentTypeJsonValue = "application/json; charset=utf-8" ContentLengthKey = "Content-Length" )
Variables ¶
This section is empty.
Functions ¶
func LoadScheduler ¶
func LoadScheduler( lc logger.LoggingClient, dbClient interfaces.DBClient, scClient interfaces.SchedulerQueueClient, configuration *config.ConfigurationStruct) error
Utility function for adding configured locally intervals and scheduled events
func StartTicker ¶
func StartTicker(ticker *time.Ticker, lc logger.LoggingClient, configuration *config.ConfigurationStruct)
func StopTicker ¶
Types ¶
type Bootstrap ¶
type Bootstrap struct {
// contains filtered or unexported fields
}
Bootstrap contains references to dependencies required by the BootstrapHandler.
func NewBootstrap ¶
NewBootstrap is a factory method that returns an initialized Bootstrap receiver struct.
type IntervalContext ¶
type IntervalContext struct { Interval models.Interval IntervalActionsMap map[string]models.IntervalAction StartTime time.Time EndTime time.Time NextTime time.Time Frequency time.Duration CurrentIterations int64 MaxIterations int64 MarkedDeleted bool }
func (*IntervalContext) GetInfo ¶
func (sc *IntervalContext) GetInfo() string
func (*IntervalContext) IsComplete ¶
func (sc *IntervalContext) IsComplete() bool
func (*IntervalContext) Reset ¶
func (sc *IntervalContext) Reset(interval models.Interval, lc logger.LoggingClient)
func (*IntervalContext) UpdateIterations ¶
func (sc *IntervalContext) UpdateIterations()
func (*IntervalContext) UpdateNextTime ¶
func (sc *IntervalContext) UpdateNextTime()
type QueueClient ¶
type QueueClient struct {
// contains filtered or unexported fields
}
func NewSchedulerQueueClient ¶
func NewSchedulerQueueClient(lc logger.LoggingClient) *QueueClient
NewClient
func (*QueueClient) AddIntervalActionToQueue ¶
func (qc *QueueClient) AddIntervalActionToQueue(intervalAction contract.IntervalAction) error
func (*QueueClient) AddIntervalToQueue ¶
func (qc *QueueClient) AddIntervalToQueue(interval contract.Interval) error
func (*QueueClient) Connect ¶
func (qc *QueueClient) Connect() (string, error)
func (*QueueClient) QueryIntervalActionByID ¶
func (qc *QueueClient) QueryIntervalActionByID(intervalActionId string) (contract.IntervalAction, error)
func (*QueueClient) QueryIntervalActionByName ¶
func (qc *QueueClient) QueryIntervalActionByName(intervalActionName string) (contract.IntervalAction, error)
func (*QueueClient) QueryIntervalByID ¶
func (qc *QueueClient) QueryIntervalByID(intervalId string) (contract.Interval, error)
func (*QueueClient) QueryIntervalByName ¶
func (qc *QueueClient) QueryIntervalByName(intervalName string) (contract.Interval, error)
func (*QueueClient) RemoveIntervalActionQueue ¶
func (qc *QueueClient) RemoveIntervalActionQueue(intervalActionId string) error
func (*QueueClient) RemoveIntervalInQueue ¶
func (qc *QueueClient) RemoveIntervalInQueue(intervalId string) error
func (*QueueClient) UpdateIntervalActionQueue ¶
func (qc *QueueClient) UpdateIntervalActionQueue(intervalAction contract.IntervalAction) error
func (*QueueClient) UpdateIntervalInQueue ¶
func (qc *QueueClient) UpdateIntervalInQueue(interval contract.Interval) error
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
****************************************************************************** * Copyright 2018 Dell Inc.
|
****************************************************************************** * Copyright 2018 Dell Inc. |
****************************************************************************** * Copyright 2018 Dell Inc.
|
****************************************************************************** * Copyright 2018 Dell Inc. |
operators
|
|
interval
****************************************************************************** * Copyright 2019 VMware Inc.
|
****************************************************************************** * Copyright 2019 VMware Inc. |
intervalaction
****************************************************************************** * Copyright 2019 VMware Inc.
|
****************************************************************************** * Copyright 2019 VMware Inc. |
Click to show internal directories.
Click to hide internal directories.