task

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package task 提供具体的任务实现,包含各种任务的具体执行逻辑和工具函数。

Index

Constants

This section is empty.

Variables

View Source
var (
	// ProviderSet 是 wire 的依赖注入提供者集合。
	// 包含了创建任务实例所需的所有依赖。
	ProviderSet = wire.NewSet(NewHello)
)

Functions

This section is empty.

Types

type Hello

type Hello interface {
	// Run 执行 Hello 任务。
	Run(ctx context.Context) error
}

Hello 定义了 Hello 任务的接口。

func NewHello

func NewHello(logger kitlog.Logger, cfg *appconf.Config) (Hello, error)

NewHello 创建一个新的 Hello 实例。

参数:

  • logger: 用于记录日志的 logger 实例。
  • cfg: 应用配置信息。

返回值:

  • Hello: 一个新的 Hello 实例。
  • error: 创建实例过程中可能发生的错误。

Jump to

Keyboard shortcuts

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