models

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2025 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NextState

type NextState struct {
	Name                string    // Name of the state
	ActionLog           string    // Additional information about the state
	NextExecution       time.Time //specific time set by the code
	NextExecutionOffset string    // a  human friendly time string sent to the database ie 10 minutes
}

type RetryConfig

type RetryConfig struct {
	MaxRetryCount    int
	RetryIntervalMin time.Duration
	RetryIntervalMax time.Duration
}

func (*RetryConfig) SlidingInterval

func (rc *RetryConfig) SlidingInterval(retryNum int) time.Duration

create a function that is a sliding scale between the min and max based on the number of retries SlidingInterval returns a retry interval between min and max based on the current retry attempt.

type SearchWorkflowRequest

type SearchWorkflowRequest struct {
	ID            int64  `json:"id"`
	ExternalID    string `json:"externalId"`
	ExecutorGroup string `json:"executorGroup"`
	WorkflowType  string `json:"workflowType"`
	BusinessKey   string `json:"businessKey"`
	State         string `json:"state"`
	Status        string `json:"status"`
	Limit         int64  `json:"limit"`
	Offset        int64  `json:"offset"`
}

type SearchWorkflowResponse

type SearchWorkflowResponse struct {
	Results   int               `json:"results"`
	Workflows []domain.Workflow `json:"workflows"`
	Offset    int64             `json:"offset"`
}

type StateType

type StateType string
const (
	StateStart  StateType = "Start"  // Initial state
	StateNormal StateType = "Normal" // Normal state
	StateManual StateType = "Manual" // Manual state
	StateError  StateType = "Error"  // Error state
	StateEnd    StateType = "End"    // End state
)

type WorkflowState

type WorkflowState struct {
	Name      string    // Name of the state
	StateType StateType // Type of the state (e.g., Start, Normal, End)
}

Jump to

Keyboard shortcuts

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