conductor

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2023 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandleActionWrapper

func HandleActionWrapper(
	ctx context.Context,
	conn db.Conn,
	thread *db.Thread,
	isAsyncAction bool,
	handleFn func() error,
) error

Types

type ArgoClient

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

func NewArgoClient

func NewArgoClient(ctx context.Context, ac *config.ArgoConf, wfs []*config.Workflow) (*ArgoClient, error)

func (*ArgoClient) HandleAction

func (ac *ArgoClient) HandleAction(ctx context.Context, conn db.Conn, thread *db.Thread) error

func (*ArgoClient) SubmitWorkflow

func (ac *ArgoClient) SubmitWorkflow(
	ctx context.Context,
	wfId string,
	wfUuid uuid.UUID,
	priority int,
) error

type ArgoWorkflow

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

func ArgoWorkflowFromWorkflow

func ArgoWorkflowFromWorkflow(wf *config.Workflow) (*ArgoWorkflow, error)

func (*ArgoWorkflow) SubmitWorkflow

func (awf *ArgoWorkflow) SubmitWorkflow(
	ctx context.Context,
	ac *ArgoClient,
	wfUuid uuid.UUID,
	priority int,
) error

type Handler

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

func (*Handler) GetName

func (h *Handler) GetName() string

func (*Handler) Notify

func (h *Handler) Notify()

func (*Handler) NotifyNow

func (h *Handler) NotifyNow()

func (*Handler) Run

func (h *Handler) Run(ctx context.Context, conn db.Conn) error

func (*Handler) Start

func (h *Handler) Start(ctx context.Context, dbConf *db.ConnectConfig) error

type HandlerClient

type HandlerClient interface {
	HandleAction(ctx context.Context, conn db.Conn, thread *db.Thread) error
}

type PgConductor

type PgConductor struct {
	InstanceName string
	S3           *s3.SwoopS3
	SwoopConfig  *config.SwoopConfig
	DbConfig     *db.ConnectConfig
}

func (*PgConductor) AddFlags

func (c *PgConductor) AddFlags(fs *pflag.FlagSet)

func (*PgConductor) NewHandlerFromConfig

func (c *PgConductor) NewHandlerFromConfig(ctx context.Context, conf *config.Handler) (*Handler, error)

func (*PgConductor) Run

func (c *PgConductor) Run(ctx context.Context, cancel context.CancelFunc) error

func (*PgConductor) SignalHandler

func (c *PgConductor) SignalHandler(
	signalChan <-chan os.Signal,
	ctx context.Context,
	cancel context.CancelFunc,
)

Jump to

Keyboard shortcuts

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