client

package
v0.1.138 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2022 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApiError

type ApiError struct {
	Code    int
	Message string
}

ApiError returns a GRPC error code and an error message

func (ApiError) Error

func (a ApiError) Error() string

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) CompleteManualTask

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

func (*Client) CompleteServiceTask

func (c *Client) CompleteServiceTask(ctx context.Context, trackingID string, newVars model.Vars) 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(messageName string, sender senderFn)

func (*Client) RegisterServiceTask

func (c *Client) RegisterServiceTask(taskName string, fn serviceFn)

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 Command

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

func (*Command) SendMessage

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

type EphemeralStorage added in v0.1.73

type EphemeralStorage struct {
	Option
}

type Option added in v0.1.86

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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