tasks

package
v1.2.4 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2023 License: BSD-3-Clause Imports: 41 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseTask

type BaseTask struct {
}

func (*BaseTask) IsPrimaryNode added in v0.6.0

func (this *BaseTask) IsPrimaryNode() bool

type DNSTaskExecutor

type DNSTaskExecutor struct {
	BaseTask
	// contains filtered or unexported fields
}

DNSTaskExecutor DNS任务执行器

func NewDNSTaskExecutor

func NewDNSTaskExecutor(duration time.Duration) *DNSTaskExecutor

func (*DNSTaskExecutor) Loop

func (this *DNSTaskExecutor) Loop() error

func (*DNSTaskExecutor) Start

func (this *DNSTaskExecutor) Start()

type EventLooper

type EventLooper struct {
	BaseTask
	// contains filtered or unexported fields
}

EventLooper 事件相关处理程序

func NewEventLooper

func NewEventLooper(duration time.Duration) *EventLooper

func (*EventLooper) Loop

func (this *EventLooper) Loop() error

func (*EventLooper) Start

func (this *EventLooper) Start()

type HealthCheckClusterTask

type HealthCheckClusterTask struct {
	BaseTask
	// contains filtered or unexported fields
}

HealthCheckClusterTask 单个集群的健康检查任务

func NewHealthCheckClusterTask

func NewHealthCheckClusterTask(clusterId int64, config *serverconfigs.HealthCheckConfig) *HealthCheckClusterTask

NewHealthCheckClusterTask 创建新任务

func (*HealthCheckClusterTask) Config

Config 获取当前配置

func (*HealthCheckClusterTask) Loop

func (this *HealthCheckClusterTask) Loop() error

Loop 单个循环任务

func (*HealthCheckClusterTask) Reset

Reset 重置配置

func (*HealthCheckClusterTask) Run

func (this *HealthCheckClusterTask) Run()

Run 执行

func (*HealthCheckClusterTask) Stop

func (this *HealthCheckClusterTask) Stop()

Stop 停止

type HealthCheckExecutor

type HealthCheckExecutor struct {
	BaseTask
	// contains filtered or unexported fields
}

func NewHealthCheckExecutor

func NewHealthCheckExecutor(clusterId int64) *HealthCheckExecutor

func (*HealthCheckExecutor) Run

func (this *HealthCheckExecutor) Run() ([]*HealthCheckResult, error)

type HealthCheckResult

type HealthCheckResult struct {
	Node       *models.Node
	NodeAddr   string // 节点IP地址
	NodeAddrId int64  // 节点IP地址ID
	IsOk       bool
	Error      string
	CostMs     float64
}

HealthCheckResult 健康检查结果

type HealthCheckTask

type HealthCheckTask struct {
	BaseTask
	// contains filtered or unexported fields
}

HealthCheckTask 节点健康检查任务

func NewHealthCheckTask

func NewHealthCheckTask(duration time.Duration) *HealthCheckTask

func (*HealthCheckTask) Loop

func (this *HealthCheckTask) Loop() error

func (*HealthCheckTask) Start

func (this *HealthCheckTask) Start()

type LogTask

type LogTask struct {
	BaseTask
	// contains filtered or unexported fields
}

func NewLogTask

func NewLogTask(cleanDuration time.Duration, monitorDuration time.Duration) *LogTask

func (*LogTask) LoopClean

func (this *LogTask) LoopClean() error

func (*LogTask) LoopMonitor

func (this *LogTask) LoopMonitor() error

func (*LogTask) RunClean

func (this *LogTask) RunClean()

func (*LogTask) RunMonitor

func (this *LogTask) RunMonitor()

func (*LogTask) Start

func (this *LogTask) Start()

type MessageTask

type MessageTask struct {
	BaseTask
	// contains filtered or unexported fields
}

MessageTask 消息相关任务

func NewMessageTask

func NewMessageTask(duration time.Duration) *MessageTask

NewMessageTask 获取新对象

func (*MessageTask) Loop

func (this *MessageTask) Loop() error

Loop 单次运行

func (*MessageTask) Start

func (this *MessageTask) Start()

Start 开始运行

type MonitorItemValueTask

type MonitorItemValueTask struct {
	BaseTask
	// contains filtered or unexported fields
}

MonitorItemValueTask 节点监控数值任务

func NewMonitorItemValueTask

func NewMonitorItemValueTask(duration time.Duration) *MonitorItemValueTask

NewMonitorItemValueTask 获取新对象

func (*MonitorItemValueTask) Loop

func (this *MonitorItemValueTask) Loop() error

func (*MonitorItemValueTask) Start

func (this *MonitorItemValueTask) Start()

type NodeLogCleanerTask

type NodeLogCleanerTask struct {
	BaseTask
	// contains filtered or unexported fields
}

NodeLogCleanerTask 清理节点日志的任务

func NewNodeLogCleanerTask

func NewNodeLogCleanerTask(duration time.Duration) *NodeLogCleanerTask

func (*NodeLogCleanerTask) Loop

func (this *NodeLogCleanerTask) Loop() error

func (*NodeLogCleanerTask) Start

func (this *NodeLogCleanerTask) Start()

type NodeMonitorTask

type NodeMonitorTask struct {
	BaseTask
	// contains filtered or unexported fields
}

NodeMonitorTask 边缘节点监控任务

func NewNodeMonitorTask

func NewNodeMonitorTask(duration time.Duration) *NodeMonitorTask

func (*NodeMonitorTask) Loop

func (this *NodeMonitorTask) Loop() error

func (*NodeMonitorTask) MonitorCluster

func (this *NodeMonitorTask) MonitorCluster(cluster *models.NodeCluster) error

func (*NodeMonitorTask) Start

func (this *NodeMonitorTask) Start()

type NodeTaskExtractor

type NodeTaskExtractor struct {
	BaseTask
	// contains filtered or unexported fields
}

NodeTaskExtractor 节点任务

func NewNodeTaskExtractor

func NewNodeTaskExtractor(duration time.Duration) *NodeTaskExtractor

func (*NodeTaskExtractor) Loop

func (this *NodeTaskExtractor) Loop() error

func (*NodeTaskExtractor) Start

func (this *NodeTaskExtractor) Start()

type SSLCertExpireCheckExecutor

type SSLCertExpireCheckExecutor struct {
	BaseTask
	// contains filtered or unexported fields
}

SSLCertExpireCheckExecutor 证书检查任务

func NewSSLCertExpireCheckExecutor

func NewSSLCertExpireCheckExecutor(duration time.Duration) *SSLCertExpireCheckExecutor

func (*SSLCertExpireCheckExecutor) Loop

func (this *SSLCertExpireCheckExecutor) Loop() error

Loop 单次执行

func (*SSLCertExpireCheckExecutor) Start

func (this *SSLCertExpireCheckExecutor) Start()

Start 启动任务

type SSLCertUpdateOCSPTask

type SSLCertUpdateOCSPTask struct {
	BaseTask
	// contains filtered or unexported fields
}

func NewSSLCertUpdateOCSPTask

func NewSSLCertUpdateOCSPTask(duration time.Duration) *SSLCertUpdateOCSPTask

func (*SSLCertUpdateOCSPTask) Loop

func (this *SSLCertUpdateOCSPTask) Loop() error

func (*SSLCertUpdateOCSPTask) Start

func (this *SSLCertUpdateOCSPTask) Start()

func (*SSLCertUpdateOCSPTask) UpdateCertOCSP

func (this *SSLCertUpdateOCSPTask) UpdateCertOCSP(certOne *models.SSLCert) (ocspData []byte, expiresAt int64, err error)

UpdateCertOCSP 更新单个证书OCSP

type ServerAccessLogCleaner

type ServerAccessLogCleaner struct {
	BaseTask
	// contains filtered or unexported fields
}

ServerAccessLogCleaner 服务访问日志自动清理

func NewServerAccessLogCleaner

func NewServerAccessLogCleaner(duration time.Duration) *ServerAccessLogCleaner

func (*ServerAccessLogCleaner) Loop

func (this *ServerAccessLogCleaner) Loop() error

func (*ServerAccessLogCleaner) Start

func (this *ServerAccessLogCleaner) Start()

type TaskInterface

type TaskInterface interface {
	Start() error
	Loop() error
	Stop() error
}

Jump to

Keyboard shortcuts

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