Documentation
      ¶
    
    
  
    
  
    Overview ¶
package quota defined skyflow quota here
Index ¶
- Variables
 - func AddPath(ctx context.Context, paths ...string) context.Context
 - func GetPath(ctx context.Context) []string
 - func MergeError(ctx context.Context, err error) error
 - func NewFieldPathError(ctx context.Context, err error) error
 - type CommonDecoder
 - func (decoder *CommonDecoder) AddCtxDecodePath(ctx context.Context, paths ...string) context.Context
 - func (decoder *CommonDecoder) Decode(definition string) (*states.StateMachine, error)
 - func (decoder *CommonDecoder) GetCtxDecodePath(ctx context.Context) []string
 - func (decoder *CommonDecoder) JSONUnmarshall(data string, v any) error
 - func (decoder *CommonDecoder) MapDecode(input any, output any) error
 - func (decoder *CommonDecoder) NewFieldPathError(ctx context.Context, err error) error
 
- type Decoder
 - type DecoderPath
 - type ParserConfig
 - type Quota
 
Constants ¶
This section is empty.
Variables ¶
      View Source
      
  var DefaultQuota = Quota{
	MaxStateNameSize:           200,
	MaxStateNumber:             1000,
	MaxStateMachineDepth:       100,
	MaxParallelBranchNumber:    500,
	MaxMapBranchNumber:         500,
	MaxMapConncurrency:         100,
	MaxActivityURISize:         200,
	MaxStartExecutionInputSize: 128 * 1024,
	MaxExecuteTimes:            10000,
	MaxExecutionUUIDSize:       200,
	MaxWorkflowSize:     512 * 1024,
	MaxWorkflowURISize:  200,
	MaxStepNameSize:     200,
	MaxRunningExecution: 1000,
	MaxTitleSize:        200,
	MaxInputSize: 128 * 1024,
	MaxOutputSize: 128 * 1024,
	MaxStepDataSize: 32 * 1024,
	MaxTaskInputSize: 32 * 1024,
	MaxTaskOutputSize: 32 * 1024,
}
    DefaultQuota default quota
      View Source
      
  var DefaultStateMachineHeader = states.StateMachineHeader{ Version: "1.0", Type: WorkflowType.Statemachine, }
DefaultStateMachineHeader ...
      View Source
      
  var StandardParserConfig = ParserConfig{ AllowActivity: true, AllowWait: true, AllowSuspend: true, AllowParallel: true, AllowMap: true, AllowChoice: true, AllowFail: true, AllowSucceed: true, AllowPass: true, }
StandardParserConfig standard model workflow
      View Source
      
  var WorkflowType = struct { Pipeline string Statemachine string Stepfunction string }{ Pipeline: "pipeline", Statemachine: "statemachine", Stepfunction: "stepfunction", }
WorkflowType ...
Functions ¶
Types ¶
type CommonDecoder ¶
type CommonDecoder struct {
}
    CommonDecoder ...
func (*CommonDecoder) AddCtxDecodePath ¶
func (decoder *CommonDecoder) AddCtxDecodePath(ctx context.Context, paths ...string) context.Context
AddCtxDecodePath ...
func (*CommonDecoder) Decode ¶
func (decoder *CommonDecoder) Decode(definition string) (*states.StateMachine, error)
Decode ...
func (*CommonDecoder) GetCtxDecodePath ¶
func (decoder *CommonDecoder) GetCtxDecodePath(ctx context.Context) []string
GetCtxDecodePath ...
func (*CommonDecoder) JSONUnmarshall ¶
func (decoder *CommonDecoder) JSONUnmarshall(data string, v any) error
JSONUnmarshall unmarshal the json string to the target object
func (*CommonDecoder) MapDecode ¶
func (decoder *CommonDecoder) MapDecode(input any, output any) error
MapDecode decode the map to the target object
func (*CommonDecoder) NewFieldPathError ¶
func (decoder *CommonDecoder) NewFieldPathError(ctx context.Context, err error) error
NewFieldPathError ...
type Decoder ¶
type Decoder interface {
	Decode(definition string) (*states.StateMachine, error)
}
    Decoder interface
type ParserConfig ¶
type ParserConfig struct {
	// AllowActivity specifies whether to allow activity Task.
	AllowActivity bool
	// AllowWait specifies whether to allow Wait State.
	AllowWait bool
	// AllowSuspend specifies whether to allow Suspend State.
	AllowSuspend bool
	// AllowParallel specifies whether to allow Parallel State.
	AllowParallel bool
	// AllowMap specifies whether to allow Map State.
	AllowMap bool
	// AllowChoice specifies whether to allow Choice State.
	AllowChoice bool
	// AllowFail specifies whether to allow Fail State.
	AllowFail bool
	// AllowSucceed specifies whether to allow Succeed State.
	AllowSucceed bool
	// AllowPass specifies whether to allow Pass State.
	AllowPass bool
}
    ParserConfig ...
type Quota ¶
type Quota struct {
	// MaxStateNameSize specifies the maximum size of the state name.
	MaxStateNameSize int
	// MaxStateLimit specifies the maximum number of states allowed in a workflow.
	// If the number of states exceeds this limit, the parser will return an error.
	// If MaxStateLimit is 0, the parser will not check the number of states.
	MaxStateNumber int
	// MaxParallelBranchNumber specifies the maximum number of branches allowed in a parallel state.
	MaxParallelBranchNumber int
	// MaxMapBranchNumber specifies the maximum number of branches allowed in a map state.
	MaxMapBranchNumber int
	// MaxMapConncurrency specifies the maximum number of branches allowed in a map state.
	MaxMapConncurrency int
	// MaxStateMachineDepth specifies the maximum depth of the state machine.
	MaxStateMachineDepth int
	// MaxActivityURISize specifies the maximum size of the activity URI.
	MaxActivityURISize int
	// MaxStartExecutionInputSize specifies the maximum size of the start execution input.
	MaxStartExecutionInputSize int
	// MaxExecuteTimes specifies the maximum number of times a workflow can be executed.
	MaxExecuteTimes int
	// MaxExecutionUUIDSize specifies the maximum size of the execution UUID.
	MaxExecutionUUIDSize int
	//  MaxWorkflowSize specifies the maximum size of the workflow.
	MaxWorkflowSize int
	// MaxWorkflowURISize specifies the maximum size of the workflow URI.
	MaxWorkflowURISize int
	// MaxStepNameSize specifies the maximum size of the step name.
	MaxStepNameSize int
	// MaxRunningExecution specifies the maximum number of running
	// executions allowed in the system.
	MaxRunningExecution int
	// MaxTitleSize specifies the maximum size of the title.
	MaxTitleSize int
	// MaxInputSize specifies the maximum size of the input.
	MaxInputSize int
	// MaxOutputSize specifies the maximum size of the output.
	MaxOutputSize int
	// MaxStepDataSize specifies the maximum size of the step stored data.
	MaxStepDataSize int
	// MaxTaskInputSize specifies the maximum size of the task input.
	MaxTaskInputSize int
	// MaxTaskOutputSize specifies the maximum size of the task output.
	MaxTaskOutputSize int
}
    Quota defines the quota for the workflow parser
 Click to show internal directories. 
   Click to hide internal directories.