model

package
v0.0.14 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JobInfo

type JobInfo struct {
	Name   string
	Job    go_worker.Job
	Option *work.JobOptions
}

type Service

type Service interface {
	GetRegisterInfo() *JobInfo
	Do(job *work.Job) error
}

func NewService

func NewService(taskName string, config *viper.Viper) Service

type ServiceEntity

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

func (*ServiceEntity) Do

func (g *ServiceEntity) Do(job *work.Job) error

func (*ServiceEntity) GetConfig added in v0.0.14

func (g *ServiceEntity) GetConfig() *viper.Viper

func (*ServiceEntity) GetRegisterInfo

func (g *ServiceEntity) GetRegisterInfo() *JobInfo

func (*ServiceEntity) GetTaskName added in v0.0.14

func (g *ServiceEntity) GetTaskName() string

Jump to

Keyboard shortcuts

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