pipeline

package
v0.0.0-...-ce4079a Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2018 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OnComplete

type OnComplete func(role model.Role)

type Pipeline

type Pipeline interface {
	InstallRole(fileRole rolesfile.Role)

	Start()

	Await() bool
	// contains filtered or unexported methods
}

func NewInstallPipeline

func NewInstallPipeline(ctx model.Context, queueSize int, steps []Step) Pipeline

type ProcessRole

type ProcessRole func(ctx model.Context, role model.Role) (model.Role, error)

type Step

type Step interface {
	Context() model.Context

	Queue(role model.Role)

	Start()

	Success(role model.Role)

	Fail(role model.Role)
	// contains filtered or unexported methods
}

func NewStep

func NewStep(processRole ProcessRole, maxConcurrent int) Step

type StepBase

type StepBase struct {
	RoleQueue chan model.Role
	Semaphore util.Semaphore
	// contains filtered or unexported fields
}

func (*StepBase) ConcurrentlyProcessRole

func (step *StepBase) ConcurrentlyProcessRole(role model.Role, processor ProcessRole)

func (*StepBase) Context

func (step *StepBase) Context() model.Context

func (*StepBase) Fail

func (step *StepBase) Fail(role model.Role)

func (*StepBase) Queue

func (step *StepBase) Queue(role model.Role)

func (*StepBase) Success

func (step *StepBase) Success(role model.Role)

Jump to

Keyboard shortcuts

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