gcron

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2025 License: MIT Imports: 3 Imported by: 0

README

HTTP

server/gcron 中基于 robfig/cron 实现了 Server,用以注册 cron 到 dove.Server() 中。

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	*cron.Cron
	// contains filtered or unexported fields
}

func NewServer

func NewServer(opts ...ServerOption) *Server

NewServer 新建 Cron 服务器。

func (*Server) Start

func (s *Server) Start(ctx context.Context) error

Start 启动 Cron 服务。

func (*Server) Stop

func (s *Server) Stop(ctx context.Context) error

Stop 停止 Cron 服务。

type ServerOption

type ServerOption func(s *Server)

ServerOption 定义一个 Cron 服务选项类型。

func Options

func Options(cronOpts ...cron.Option) ServerOption

Options 配置 Cron 选项。

Jump to

Keyboard shortcuts

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