resetter

package
v0.0.0-...-071f0a0 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Configurer

type Configurer interface {
	// UnmarshalKey takes a single key and unmarshal it into a Struct.
	UnmarshalKey(name string, out any) error
	// Has checks if config section exists.
	Has(name string) bool
}

type Plugin1

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

Gauge //////////////

func (*Plugin1) Init

func (p1 *Plugin1) Init(cfg Configurer, server Server) error

func (*Plugin1) Name

func (p1 *Plugin1) Name() string

func (*Plugin1) Reset

func (p1 *Plugin1) Reset() error

func (*Plugin1) Serve

func (p1 *Plugin1) Serve() chan error

func (*Plugin1) Stop

func (p1 *Plugin1) Stop(context.Context) error

type Pool

type Pool interface {
	// Workers returns worker list associated with the pool.
	Workers() (workers []*worker.Process)
	// Exec payload
	Exec(ctx context.Context, p *payload.Payload, stopCh chan struct{}) (chan *staticPool.PExec, error)
	// Reset kill all workers inside the watcher and replaces with new
	Reset(ctx context.Context) error
	// Destroy all underlying stack (but let them complete the task).
	Destroy(ctx context.Context)
}

type Server

type Server interface {
	CmdFactory(env map[string]string) func() *exec.Cmd
	NewPool(ctx context.Context, cfg *pool.Config, env map[string]string, _ *zap.Logger) (*staticPool.Pool, error)
	NewWorker(ctx context.Context, env map[string]string) (*worker.Process, error)
}

Server creates workers for the application.

Jump to

Keyboard shortcuts

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