nightwatch

package
v0.2.0-alpha.5 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2024 License: MIT Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InstallJobAPI

func InstallJobAPI(router *gin.Engine, db *gorm.DB)

Types

type Config

type Config struct {
	HealthOptions     *genericoptions.HealthOptions
	MySQLOptions      *genericoptions.MySQLOptions
	RedisOptions      *genericoptions.RedisOptions
	WatchOptions      *watch.Options
	HTTPOptions       *genericoptions.HTTPOptions
	TLSOptions        *genericoptions.TLSOptions
	DisableRESTServer bool
	// The maximum concurrency event of user watcher.
	UserWatcherMaxWorkers int64
	// The list of watchers that should be disabled.
	Client clientset.Interface
	// Created from MySQLOptions.
	DB *gorm.DB
}

Config holds the configuration for the nightwatch server.

func (*Config) CreateWatcherConfig

func (c *Config) CreateWatcherConfig() (*watcher.AggregateConfig, error)

CreateWatcherConfig used to create configuration used by all watcher.

func (*Config) New

func (c *Config) New(stopCh <-chan struct{}) (*nightWatch, error)

New creates an asynchronous task instance.

type RESTServer

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

RESTServer represents the HTTP server with optional TLS and graceful shutdown capabilities.

func NewRESTServer

func NewRESTServer(stopCh <-chan struct{}, addr string, tlsOptions *genericoptions.TLSOptions, db *gorm.DB) *RESTServer

NewRESTServer creates a new instance of RESTServer with the specified options.

func (*RESTServer) Start

func (rs *RESTServer) Start()

Start begins listening for incoming requests and handles graceful shutdown if stopCh is provided.

Directories

Path Synopsis
biz
Package biz is the place where you can implements more complex business logic.
Package biz is the place where you can implements more complex business logic.
job
dao
service
v1
Package watcher provides functions used by all watchers.
Package watcher provides functions used by all watchers.
all
clean
Package clean is a watcher implement.
Package clean is a watcher implement.
cronjob/cronjob
Package cronjob is a watcher implement.
Package cronjob is a watcher implement.
cronjob/statesync
Package statesync is a watcher implement.
Package statesync is a watcher implement.
secretsclean
Package secretsclean is a watcher implement used to delete expired keys from the database.
Package secretsclean is a watcher implement used to delete expired keys from the database.
user
Package user is a watcher implement.
Package user is a watcher implement.

Jump to

Keyboard shortcuts

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