runner

package
v0.12.1 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NatsClient

type NatsClient interface {
	ConsumeSequences(context.Context, string, nats.SequenceHandler) error
	GetMsg(ctx context.Context, subjTokens ...string) (*jetstream.RawStreamMsg, error)
	GetSysObject(key string) ([]byte, error)
	Publish(context.Context, []byte, ...string) (*jetstream.PubAck, bool, error)
	PublishResult(context.Context, time.Time, interface{}, error, ...string) (error, bool)
	PutSysObject(string, []byte) (*natsgo.ObjectInfo, error)
}

type Runner

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

func NewRunner

func NewRunner(natsClient NatsClient, hops *dsl.HopsFiles, logger zerolog.Logger) (*Runner, error)

func (*Runner) Run

func (r *Runner) Run(ctx context.Context, fromConsumer string) error

func (*Runner) SequenceCallback

func (r *Runner) SequenceCallback(
	ctx context.Context,
	sequenceId string,
	msgBundle nats.MessageBundle,
) error

type Schedule added in v0.7.0

type Schedule struct {
	Config       dsl.ScheduleAST
	CronSchedule cron.Schedule
	// contains filtered or unexported fields
}

func NewSchedule added in v0.7.0

func NewSchedule(config dsl.ScheduleAST, natsClient NatsClient, logger zerolog.Logger) (*Schedule, error)

func (*Schedule) Run added in v0.7.0

func (s *Schedule) Run()

Jump to

Keyboard shortcuts

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