wfs

package
v0.7.13 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2022 License: BSD-3-Clause Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	TemporalClient client.Client      // Client is attached to a temporal.io server
	Cache          *cache.Cache       // Cache holds workflow definitions loaded from disk
	Watcher        *watcher.Watcher   // Watcher is used to watch the file system for *.fse changes
	Tracer         opentracing.Tracer // Tracer is used to trace spans to
	// contains filtered or unexported fields
}

Server operates a workflow registry and a bunch of *.fse workflows stored and watched on disk

func (Server) AddHandlers

func (s Server) AddHandlers(mux *http.ServeMux) http.Handler

AddHandlers adds all of this Server's http handlers to mux, attaches open tracing middleware to mux and returns this handler

func (Server) Close

func (s Server) Close() error

Close closes all services of the Server

func (Server) Create

func (s Server) Create(w http.ResponseWriter, r *http.Request)

Create is the HandlerFunc for the /create operation

func (Server) Definition

func (s Server) Definition(w http.ResponseWriter, r *http.Request)

Definition is the HandlerFunc for /. It provides a simple UI for listing and showing workflow definitions hosted an this Server.

func (Server) Inspect

func (s Server) Inspect(w http.ResponseWriter, r *http.Request)

Inspect is the HandlerFunc for the /inspect operation

func (Server) InspectSchema added in v0.7.13

func (s Server) InspectSchema(w http.ResponseWriter, r *http.Request)

InspectSchema is the HandlerFunc for the /inspectschema operation

func (Server) List

func (s Server) List(w http.ResponseWriter, r *http.Request)

List is the HandlerFunc for the /list operation

func (Server) Schema added in v0.5.6

func (s Server) Schema(w http.ResponseWriter, r *http.Request)

Schema is the HandlerFunc for the /schema operation

func (Server) Signal

func (s Server) Signal(w http.ResponseWriter, r *http.Request)

Signal is the HandlerFunc for the /signal operation

func (Server) Terminate

func (s Server) Terminate(w http.ResponseWriter, r *http.Request)

Terminate is the HandlerFunc for the /terminate operation

type ServerOptions

type ServerOptions struct {
	WorkflowsGlobPattern     string        // WorkflowsGlobPattern ist the glob pattern for *.fse files this Server loads and hosts
	WatcherDebounce          time.Duration // WatcherDebounce is the debounce time for a file system watcher if positive. Else no watcher is attached.
	ResetRegistry            bool          // ResetRegistry sholod be set to true, if the registry workflow needs to be restarted
	TaskqueueName            string        // TaskqueueName is the name of the temporal task queue this host listens on, it's also the default for the action queue name
	ActionqueueNameOverride  string        // ActionqueueNameOverride is the name of the temporal actions queue this host listens on, if zero TemporalTaskqueueName is used
	OpenTracingServicename   string        // OpenTracingServicename is the name this server publishes its spans under
	workflow.ActivityOptions               // ActivityOptions besides TaskQueue=ActionqueueName() are passed to all activities started by the ActivityDispatcher
}

ServerOptions contains the fields to configure the workflow server

func (ServerOptions) ActionqueueName

func (so ServerOptions) ActionqueueName() string

ActionqueueName returns ActionqueueNameOverride if non-zero, else TaskqueueName

func (ServerOptions) InitializeServer

func (so ServerOptions) InitializeServer(cli client.Client) (Server, error)

InitializeServer initializes a new Server based on the ServerOptions

Jump to

Keyboard shortcuts

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