coordinator

package
v0.0.0-...-f49f4f7 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2025 License: MPL-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Coordinator

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

func New

func New(cfg *CoordinatorConfig) *Coordinator

func (*Coordinator) CancelRun

func (c *Coordinator) CancelRun(id ulid.ULID, namespace string) error

func (*Coordinator) CreateTrigger

func (c *Coordinator) CreateTrigger(trigger *state.Trigger) error

func (*Coordinator) Getlogs

func (c *Coordinator) Getlogs(namespace, runID, stepID, logType string) ([]string, error)

func (*Coordinator) HandleWebhook

func (c *Coordinator) HandleWebhook(w http.ResponseWriter, r *http.Request, trigger *state.Trigger)

func (*Coordinator) RunFlow

func (c *Coordinator) RunFlow(
	id, namespace, trigger string,
	vars map[string]any,
) (ulid.ULID, error)

func (*Coordinator) Start

func (c *Coordinator) Start() error

Start starts the coordinator and its trigger coordinator

func (*Coordinator) Stop

func (c *Coordinator) Stop()

Stop gracefully stops the coordinator

func (*Coordinator) StreamLogs

func (c *Coordinator) StreamLogs(namespace, runID, stepID, logType string) *LogStream

func (*Coordinator) TriggerDelete

func (c *Coordinator) TriggerDelete(trigger *state.Trigger) error

func (*Coordinator) WriteLogsBatch

func (c *Coordinator) WriteLogsBatch(namespace, runID, stepID, logType string, lines []string) error

type CoordinatorConfig

type CoordinatorConfig struct {
	Logger      *zap.Logger
	NomadClient *api.Client
	State       serverstate.State
	DataDir     string
	RPCAddr     string
}

type LogStream

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

func NewLogStream

func NewLogStream(path string) *LogStream

func (*LogStream) ErrorCh

func (s *LogStream) ErrorCh() <-chan error

func (*LogStream) Run

func (s *LogStream) Run(ctx context.Context)

func (*LogStream) StreamCh

func (s *LogStream) StreamCh() <-chan string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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