Help us shape the future of Go! Take the 2026 Go Developer Survey

workflow

package module
v1.3.6 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2023 License: BSD-3-Clause Imports: 11 Imported by: 0

README

Weplanx Workflow

GitHub go.mod Go version Go Report Card Release GitHub license

Hybrid workflow, general serverless, data processing, file processing

License

BSD-3-Clause License

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ExcelMetadata

type ExcelMetadata struct {
	Name  string   `msgpack:"name"`
	Parts []string `msgpack:"parts"`
}

type File

type File struct {
	Cos *cos.Client
}

func (*File) Excel

func (x *File) Excel(ctx context.Context, name string, sheets typ.ExcelSheets) (err error)

type Option

type Option func(x *Workflow)

func SetJetStream

func SetJetStream(v nats.JetStreamContext) Option

func SetNamespace

func SetNamespace(v string) Option

func SetNats

func SetNats(v *nats.Conn) Option

type Schedule

type Schedule struct {
	Namespace string
	Node      string
	Nats      *nats.Conn
	KeyValue  nats.KeyValue
}

func (*Schedule) Get

func (x *Schedule) Get(key string) (option typ.ScheduleOption, err error)

func (*Schedule) Lists added in v1.3.3

func (x *Schedule) Lists() (keys []string, err error)

func (*Schedule) Ping added in v1.3.3

func (x *Schedule) Ping() (result bool, err error)

func (*Schedule) Remove

func (x *Schedule) Remove(key string) (err error)

func (*Schedule) Set

func (x *Schedule) Set(key string, option typ.ScheduleOption) (err error)

func (*Schedule) Status

func (x *Schedule) Status(key string, value bool) (err error)

type Workflow

type Workflow struct {
	Namespace string
	Nats      *nats.Conn
	JetStream nats.JetStreamContext
}

func New

func New(options ...Option) *Workflow

func (*Workflow) NewFile

func (x *Workflow) NewFile(address string, id string, key string) (f *File, err error)

func (*Workflow) NewSchedule

func (x *Workflow) NewSchedule(node string) (schedule *Schedule, err error)

Directories

Path Synopsis
api
app
app

Jump to

Keyboard shortcuts

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