cron

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2021 License: Apache-2.0 Imports: 5 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RetrieveEvents

func RetrieveEvents(db *gorm.DB)

RetrieveEvents returns events from the database

Types

type APIResponse added in v1.1.1

type APIResponse struct {
	CurrentTime string `json:"currentTime"`
	StartedTime string `json:"startedTime"`
	BuildInfo   string `json:"buildInfo"`
	ClusterID   string `json:"clusterID"`
	NSF         string `json:"nsf"`
	APIBaseURL  string `json:"apiBaseURL"`
}

APIResponse for API respsonses

type Config

type Config struct {
	DB      database.DBConfig `json:"db,omitempty" yaml:"db,omitempty"`
	SetupDB bool              `json:"setup_db,omitempty" yaml:"setup_db,omitempty"`
}

Config represents cron configuration

func NewConfig

func NewConfig() *Config

NewConfig returns a new, blank configuration for Cron

type Job added in v1.1.1

type Job struct {
	Config *Config
	Cron   *cron.Cron
	DB     *gorm.DB
}

Job represents a cron job for the services

func NewCron

func NewCron(config *Config, db *gorm.DB) Job

NewCron returns new cron job

type Metric

type Metric map[string]string

Metric represents Prometheus metric

type PrometheusResponse

type PrometheusResponse struct {
	Status string
	Data   PrometheusResponseData
}

PrometheusResponse for prometheus response

type PrometheusResponseData

type PrometheusResponseData struct {
	ResultType string
	Result     []PrometheusResponseObject
}

PrometheusResponseData for Prometheus response

type PrometheusResponseObject

type PrometheusResponseObject struct {
	Metric Metric
	Value  []interface{}
}

PrometheusResponseObject for Prometheus response

Jump to

Keyboard shortcuts

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