client

package
v1.0.271 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2022 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithEphemeralStorage added in v0.1.175

func WithEphemeralStorage() ephemeralStorage

Types

type Client

type Client struct {
	SvcTasks map[string]ServiceFn

	MsgSender map[string]SenderFn
	// contains filtered or unexported fields
}

func New

func New(log *zap.Logger, option ...Option) *Client

func (*Client) CancelWorkflowInstance

func (c *Client) CancelWorkflowInstance(ctx context.Context, instanceID string) error

func (*Client) CompleteUserTask

func (c *Client) CompleteUserTask(ctx context.Context, owner string, trackingID string, newVars model.Vars) error

func (*Client) Dial

func (c *Client) Dial(natsURL string, opts ...nats.Option) error

func (*Client) GetServerInstanceStats added in v0.1.134

func (c *Client) GetServerInstanceStats(ctx context.Context) (*model.WorkflowStats, error)

func (*Client) GetUserTask added in v0.1.88

func (c *Client) GetUserTask(ctx context.Context, owner string, trackingID string) (*model.GetUserTaskResponse, model.Vars, error)

func (*Client) GetWorkflowInstanceStatus

func (c *Client) GetWorkflowInstanceStatus(ctx context.Context, id string) ([]*model.WorkflowState, error)

func (*Client) LaunchWorkflow

func (c *Client) LaunchWorkflow(ctx context.Context, workflowName string, mvars model.Vars) (string, error)

func (*Client) ListUserTaskIDs added in v0.1.86

func (c *Client) ListUserTaskIDs(ctx context.Context, owner string) (*model.UserTasks, error)

func (*Client) ListWorkflowInstance

func (c *Client) ListWorkflowInstance(ctx context.Context, name string) ([]*model.ListWorkflowInstanceResult, error)

func (*Client) ListWorkflows

func (c *Client) ListWorkflows(ctx context.Context) ([]*model.ListWorkflowResult, error)

func (*Client) Listen

func (c *Client) Listen(ctx context.Context) error

func (*Client) LoadBPMNWorkflowFromBytes

func (c *Client) LoadBPMNWorkflowFromBytes(ctx context.Context, name string, b []byte) (string, error)

func (*Client) RegisterMessageSender

func (c *Client) RegisterMessageSender(ctx context.Context, workflowName string, messageName string, sender SenderFn) error

func (*Client) RegisterServiceTask

func (c *Client) RegisterServiceTask(ctx context.Context, taskName string, fn ServiceFn) error

func (*Client) RegisterWorkflowInstanceComplete added in v0.1.66

func (c *Client) RegisterWorkflowInstanceComplete(fn chan *model.WorkflowInstanceComplete)

func (*Client) SendMessage

func (c *Client) SendMessage(ctx context.Context, workflowInstanceID string, name string, key any, mvars model.Vars) error

type JobClient added in v1.0.271

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

func (*JobClient) Log added in v1.0.271

func (c *JobClient) Log(ctx context.Context, severity messages.WorkflowLogLevel, code int32, message string, attrs map[string]string) error

type MessageClient added in v1.0.271

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

func (*MessageClient) Log added in v1.0.271

func (c *MessageClient) Log(ctx context.Context, severity messages.WorkflowLogLevel, code int32, message string, attrs map[string]string) error

func (*MessageClient) SendMessage added in v1.0.271

func (c *MessageClient) SendMessage(ctx context.Context, name string, key any, vars model.Vars) error

type Option added in v0.1.86

type Option interface {
	// contains filtered or unexported methods
}

type SenderFn added in v1.0.267

type SenderFn func(ctx context.Context, client *MessageClient, vars model.Vars) error

type ServiceFn added in v1.0.267

type ServiceFn func(ctx context.Context, client *JobClient, vars model.Vars) (model.Vars, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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