chain

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Chain

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

func NewChain

func NewChain(opts ...Option) *Chain

NewChain creates a new chain.

func (*Chain) Append

func (c *Chain) Append(chain ...Interface) *Chain

Append appends a task to the chain.

func (*Chain) Do

func (c *Chain) Do() error

Do execute the chain.

type Interface

type Interface func() error

type Option

type Option func(*Chain)

func WithTask

func WithTask(chain ...Interface) Option

WithTask replaces the tasks with the given chain.

Jump to

Keyboard shortcuts

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