service

package
v0.45.0 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package service provides some convenient service functions.

Index

Constants

This section is empty.

Variables

Monitor is the default service monitor.

View Source
var TaskService = task.DefaultService

TaskService is the default task service.

Functions

func RunTask

func RunTask(delay, interval time.Duration, taskFunc func(context.Context))

RunTask runs the task function synchronously if TaskService is activated. Or, do nothing.

func SetChecker added in v0.42.0

func SetChecker(checker service.Checker)

SetChecker resets the checker of the monitor service.

func SetVipChecker added in v0.42.0

func SetVipChecker(vip string)

SetVipChecker is a convenient function to set the checker based on vip, which is equal to SetChecker(service.NewVipChecker(vip, "")).

Types

This section is empty.

Jump to

Keyboard shortcuts

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