pipeline

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2024 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StateCreated  state = "created"
	StateStarting state = "starting"
	StateStopping state = "stopping"
	StateRunning  state = "running"
	StateStopped  state = "stopped"
)

Variables

View Source
var (
	NotFoundErr   *NotFoundError
	ConflictErr   *ConflictError
	IOErr         *IOError
	ValidationErr *ValidationError
)

Functions

This section is empty.

Types

type ConflictError

type ConflictError struct{ Err error }

func (*ConflictError) Error

func (e *ConflictError) Error() string

func (*ConflictError) Unwrap

func (e *ConflictError) Unwrap() error

type IOError

type IOError struct{ Err error }

func (*IOError) Error

func (e *IOError) Error() string

func (*IOError) Unwrap

func (e *IOError) Unwrap() error

type NotFoundError

type NotFoundError struct{ Err error }

func (*NotFoundError) Error

func (e *NotFoundError) Error() string

func (*NotFoundError) Unwrap

func (e *NotFoundError) Unwrap() error

type Pipeline

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

pipeline run a set of plugins

func New

func New(config *config.Pipeline, log *slog.Logger) *Pipeline

func (*Pipeline) Build

func (p *Pipeline) Build() error

func (*Pipeline) Close

func (p *Pipeline) Close() error

func (*Pipeline) Config

func (p *Pipeline) Config() *config.Pipeline

func (*Pipeline) LastError

func (p *Pipeline) LastError() error

func (*Pipeline) Run

func (p *Pipeline) Run(ctx context.Context)

func (*Pipeline) State

func (p *Pipeline) State() state

func (*Pipeline) Test

func (p *Pipeline) Test() error

type Service

type Service interface {
	Start(id string) error
	Stop(id string) error
	State(id string) (string, error, error)
	List() ([]*config.Pipeline, error)
	Get(id string) (*config.Pipeline, error)
	Add(pipe *config.Pipeline) error
	Update(pipe *config.Pipeline) error
	Delete(id string) error
}

type Storage

type Storage interface {
	List() ([]*config.Pipeline, error)
	Get(id string) (*config.Pipeline, error)
	Add(pipe *config.Pipeline) error
	Update(pipe *config.Pipeline) error
	Delete(id string) error
}

type ValidationError

type ValidationError struct{ Err error }

func (*ValidationError) Error

func (e *ValidationError) Error() string

func (*ValidationError) Unwrap

func (e *ValidationError) Unwrap() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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