module

package
v3.1.3 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2024 License: Apache-2.0 Imports: 7 Imported by: 16

Documentation

Index

Constants

View Source
const (
	DefaultModuleName          = "DefaultBaseModule"
	DefaultTaskModuleName      = "DefaultTaskModule"
	DefaultGoroutineModuleName = "DefaultGoroutineModuleName"
	DefaultCustomModuleName    = "DefaultCustomModule"

	BaseModuleType      = "BaseModuleType"
	TaskModuleType      = "TaskModuleType"
	GoroutineModuleType = "GoroutineModuleType"
	CustomModuleType    = "CustomModuleType"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseModule

type BaseModule struct {
	Name          string
	Desc          string
	Skip          bool
	ModuleCache   *cache.Cache
	PipelineCache *cache.Cache
	Runtime       connector.ModuleRuntime
	PostHook      []PostHookInterface
}

func (*BaseModule) AppendPostHook

func (b *BaseModule) AppendPostHook(h PostHookInterface)

func (*BaseModule) AutoAssert

func (b *BaseModule) AutoAssert()

func (*BaseModule) CallPostHook

func (b *BaseModule) CallPostHook(result *ending.ModuleResult) error

func (*BaseModule) Default

func (b *BaseModule) Default(runtime connector.Runtime, pipelineCache *cache.Cache, moduleCache *cache.Cache)

func (*BaseModule) Init

func (b *BaseModule) Init()

func (*BaseModule) Is

func (b *BaseModule) Is() string

func (*BaseModule) IsSkip

func (b *BaseModule) IsSkip() bool

func (*BaseModule) Run

func (b *BaseModule) Run(result *ending.ModuleResult)

func (*BaseModule) Slogan

func (b *BaseModule) Slogan()

func (*BaseModule) Until

func (b *BaseModule) Until() (*bool, error)

type BaseTaskModule

type BaseTaskModule struct {
	BaseModule
	Tasks []task.Interface
}

func (*BaseTaskModule) Init

func (b *BaseTaskModule) Init()

func (*BaseTaskModule) Is

func (b *BaseTaskModule) Is() string

func (*BaseTaskModule) Run

func (b *BaseTaskModule) Run(result *ending.ModuleResult)

type CustomModule

type CustomModule struct {
	BaseModule
}

func (*CustomModule) Init

func (c *CustomModule) Init()

func (*CustomModule) Is

func (c *CustomModule) Is() string

type Module

type Module interface {
	IsSkip() bool
	Default(runtime connector.Runtime, pipelineCache *cache.Cache, moduleCache *cache.Cache)
	Init()
	Is() string
	Run(result *ending.ModuleResult)
	Until() (*bool, error)
	Slogan()
	AutoAssert()
	AppendPostHook(h PostHookInterface)
	CallPostHook(result *ending.ModuleResult) error
}

type PostHook

type PostHook struct {
	Module Module
	Result *ending.ModuleResult
}

func (*PostHook) Catch

func (p *PostHook) Catch(err error) error

func (*PostHook) Finally

func (p *PostHook) Finally()

func (*PostHook) Init

func (p *PostHook) Init(module Module, result *ending.ModuleResult)

func (*PostHook) Try

func (p *PostHook) Try() error

type PostHookInterface

type PostHookInterface interface {
	hook.Interface
	Init(module Module, result *ending.ModuleResult)
}

Jump to

Keyboard shortcuts

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