Documentation ¶
Index ¶
- Constants
- Variables
- func InstanceMemory(rec *ent.WorkflowInstance) ([]byte, error)
- func NewInternalError(err error) error
- func SyncSubscribeTo(dbConnString string, topic int, fn func(interface{})) error
- func WrapCatchableError(msg string, err error) error
- type CatchableError
- type CmdErrorResponse
- type Config
- type ErrorType
- type InternalError
- type ServiceResponse
- type SyncRequest
- type UncatchableError
- type WorkflowServer
- func (s *WorkflowServer) GetConfig() Config
- func (s *WorkflowServer) Kill()
- func (s *WorkflowServer) Lifeline() chan bool
- func (s *WorkflowServer) Run() error
- func (s *WorkflowServer) SetInstanceLogger(l dlog.Log)
- func (s *WorkflowServer) SetVariableStorage(vs varstore.VarStorage)
- func (s *WorkflowServer) Stop()
Constants ¶
const ( DirektivActionIDHeader = "Direktiv-ActionID" DirektivInstanceIDHeader = "Direktiv-InstanceID" DirektivExchangeKeyHeader = "Direktiv-ExchangeKey" DirektivPingAddrHeader = "Direktiv-PingAddr" DirektivDeadlineHeader = "Direktiv-Deadline" DirektivTimeoutHeader = "Direktiv-Timeout" DirektivStepHeader = "Direktiv-Step" DirektivResponseHeader = "Direktiv-Response" DirektivNamespaceHeader = "Direktiv-Namespace" DirektivSourceHeader = "Direktiv-Source" DirektivFileHeader = "Direktiv-Files" DirektivErrorCodeHeader = "Direktiv-ErrorCode" DirektivErrorMessageHeader = "Direktiv-ErrorMessage" )
headers for flow->container communication
const ( ServiceResponseNoError = "" ServiceErrorInternal = "au.com.direktiv.error.internal" ServiceErrorImage = "au.com.direktiv.error.image" ServiceErrorNetwork = "au.com.direktiv.error.network" ServiceErrorIO = "au.com.direktiv.error.io" )
internal error codes for knative services
const ( CancelFunction = iota CancelSubflow CancelTimer CancelInstanceTimers AddCron )
direktiv pub/sub items
const ApiSync = "apisync"
const FlowSync = "flowsync"
FlowSync is the name of postgres pubsub channel
const (
// WorkflowStateSubscription is the channel that runs workflow states.
WorkflowStateSubscription = "workflow-state"
)
Variables ¶
var ( ErrCodeJQBadQuery = "direktiv.jq.badCommand" ErrCodeJQNotObject = "direktiv.jq.notObject" ErrCodeMultipleErrors = "direktiv.workflow.multipleErrors" ErrCodeAllBranchesFailed = "direktiv.parallel.allFailed" )
internal errors
Functions ¶
func InstanceMemory ¶ added in v0.2.3
func InstanceMemory(rec *ent.WorkflowInstance) ([]byte, error)
func NewInternalError ¶
func SyncSubscribeTo ¶ added in v0.2.1
SyncSubscribeTo subscribes to direktiv interna postgres pub/sub
func WrapCatchableError ¶
Types ¶
type CatchableError ¶
func NewCatchableError ¶
func NewCatchableError(code string, msg string, a ...interface{}) *CatchableError
func (*CatchableError) Error ¶
func (err *CatchableError) Error() string
type CmdErrorResponse ¶
CmdErrorResponse struct for responding when command has an error
type Config ¶
type Config struct { FunctionsProtocol string `yaml:"functions-protocol"` Database struct { DB string } InstanceLogging struct { Driver string } VariablesStorage struct { Driver string } }
Config is the configuration for workflow and runner server
func ReadConfig ¶
ReadConfig reads the configuration file and overwrites with environment variables if set
type ErrorType ¶
type ErrorType int
ErrorType types of errors direktiv commands can return
func GetErrorType ¶
GetErrorType get Error Type from passed error
type InternalError ¶
func NewInternalErrorWithDepth ¶
func NewInternalErrorWithDepth(err error, depth int) *InternalError
func (*InternalError) Error ¶
func (err *InternalError) Error() string
func (*InternalError) Unwrap ¶
func (err *InternalError) Unwrap() error
type ServiceResponse ¶ added in v0.2.0
type ServiceResponse struct { ErrorCode string `json:"errorCode"` ErrorMessage string `json:"errorMessage"` Data interface{} `json:"data"` }
ServiceResponse is the response structure for internal knative services
type SyncRequest ¶ added in v0.2.0
SyncRequest sync maintenance requests between instances subscribed to FlowSync
type UncatchableError ¶
func NewUncatchableError ¶
func NewUncatchableError(code, msg string, a ...interface{}) *UncatchableError
func (*UncatchableError) Error ¶
func (err *UncatchableError) Error() string
type WorkflowServer ¶
type WorkflowServer struct { LifeLine chan bool // contains filtered or unexported fields }
WorkflowServer is a direktiv server
func NewWorkflowServer ¶
func NewWorkflowServer(config *Config) (*WorkflowServer, error)
NewWorkflowServer creates a new workflow server
func (*WorkflowServer) GetConfig ¶ added in v0.3.4
func (s *WorkflowServer) GetConfig() Config
func (*WorkflowServer) Lifeline ¶
func (s *WorkflowServer) Lifeline() chan bool
Lifeline interface impl
func (*WorkflowServer) Run ¶
func (s *WorkflowServer) Run() error
Run starts all components of direktiv
func (*WorkflowServer) SetInstanceLogger ¶
func (s *WorkflowServer) SetInstanceLogger(l dlog.Log)
SetInstanceLogger set logger for direktiv for firecracker instances
func (*WorkflowServer) SetVariableStorage ¶ added in v0.2.3
func (s *WorkflowServer) SetVariableStorage(vs varstore.VarStorage)
Source Files ¶
- config.go
- db-events.go
- db-instance.go
- db-namespace.go
- db-workflow.go
- db.go
- engine-util.go
- engine.go
- errors.go
- events.go
- flow.go
- grpc-instances.go
- grpc-namespace.go
- grpc-secrets.go
- grpc-variables.go
- grpc-workflow.go
- grpc.go
- health.go
- isolate.go
- kubereq.go
- metrics.go
- secrets.go
- state-logic-action.go
- state-logic-consume-event.go
- state-logic-delay.go
- state-logic-error.go
- state-logic-eventsand.go
- state-logic-eventsxor.go
- state-logic-foreach.go
- state-logic-generate-event.go
- state-logic-getter.go
- state-logic-parallel.go
- state-logic-setter.go
- state-logic-switch.go
- state-logic-validate.go
- state-logic.go
- sync.go
- timer.go
- wfserver.go
- wli.go