ejob

package
v0.5.7 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2021 License: MIT Imports: 6 Imported by: 11

Documentation

Index

Constants

View Source
const PackageName = "task.ejob"

PackageName 包名

Variables

This section is empty.

Functions

This section is empty.

Types

type Component

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

Component ...

func (*Component) Init

func (c *Component) Init() error

Init 初始化

func (*Component) Name

func (c *Component) Name() string

Name 配置名称

func (*Component) PackageName

func (c *Component) PackageName() string

PackageName 包名

func (*Component) Start

func (c *Component) Start() error

Start 启动

func (*Component) Stop

func (c *Component) Stop() error

Stop ...

type Config

type Config struct {
	Name string
	// contains filtered or unexported fields
}

Config ...

func DefaultConfig

func DefaultConfig() *Config

DefaultConfig 默认配置

type Container

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

Container 容器

func DefaultContainer

func DefaultContainer() *Container

DefaultContainer 默认容器

func (*Container) Build

func (c *Container) Build(options ...Option) *Component

Build 构建组件

type Ejob

type Ejob interface {
	standard.Component
}

Ejob ...

type Option

type Option func(c *Container)

Option 选项

func WithName

func WithName(name string) Option

WithName 设置Job的名称

func WithStartFunc

func WithStartFunc(startFunc func(ctx context.Context) error) Option

WithStartFunc 设置Job的函数

Jump to

Keyboard shortcuts

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