flowtypes

package
v1.5.1 Latest Latest
Warning

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

Go to latest
Published: May 14, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Flow

type Flow struct {
	Client *client.FlowAtomicClient
	State  *State
}

Flow represents the gRPC client for Flow and state

func NewFlowInstance

func NewFlowInstance() *Flow

NewFlowInstance creates a new instance of Flow

func (*Flow) GetClient

func (c *Flow) GetClient() *client.FlowClient

GetClient returns the Flow client

type State

type State struct {
	// GrpcFail the number of times the rpc has failed
	GrpcFail atomic.Uint64
	// GrpcSucc the number of times the rpc has succeeded
	GrpcSucc atomic.Uint64
	// HealthStatus current health state
	HealthStatus atomic.Uint64
	// Err is error message
	Err string
	// WflowMetrics workflow metrics
	WflowMetrics WorkflowMetrics
}

State - Flow state

type WorkflowMetrics

type WorkflowMetrics interface {
	// RecordLatency function to record latency for a workflow
	RecordLatency(activity string, status WorkflowStatus, duration time.Duration)
}

WorkflowMetrics defines interface to be used for workflow metrics

type WorkflowStatus

type WorkflowStatus string
const (
	// WorkflowStatusSuccess workflow has completed successfully
	WorkflowStatusSuccess WorkflowStatus = "Success"
	// WorkflowStatusActFailed workflow activity execution has failed
	WorkflowStatusActivityFailed WorkflowStatus = "ActivityFailed"
	// WorkflowStatusPubFailed workflow status publish failed
	WorkflowStatusPublishFailed WorkflowStatus = "PublishFailed"
	// WorkflowStatusActPubFailed both workflow activity execution and status publish failed
	WorkflowStatusActivityPublishFailed WorkflowStatus = "ActivityPublishFailed"
)

Jump to

Keyboard shortcuts

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