task

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: May 28, 2023 License: Apache-2.0 Imports: 4 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetJob added in v0.1.1

func GetJob(key string) (string, cron.Job, bool)

GetJob get job

func RemoveJob added in v0.1.1

func RemoveJob(key string) error

RemoveJob remove job

func UpdateJob

func UpdateJob(key string, spec string, job cron.Job) error

UpdateJob update or create job

Types

type Option

type Option func(*options)

func WithSchedule

func WithSchedule(key string, spec string, job cron.Job) Option

type Server

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

Server manage

func New

func New(opts ...Option) *Server

New server

func (*Server) Options

func (e *Server) Options(opts ...Option)

Options set options

func (*Server) Shutdown

func (e *Server) Shutdown(_ context.Context) error

func (*Server) Start

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

Start server

func (*Server) String

func (e *Server) String() string

String server name

Jump to

Keyboard shortcuts

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