Documentation ¶
Index ¶
- Constants
- Variables
- func GetInodePath(path string) string
- func IsNotFound(err error) bool
- func NewInternalError(err error) error
- func PublishKnativeEvent(ce *cloudevents.Event)
- func Run(ctx context.Context, logger *zap.SugaredLogger, conf *util.Config) error
- func SyncSubscribeTo(log *zap.Logger, addr, topic string, fn func(interface{})) error
- func WrapCatchableError(msg string, err error) error
- type Carrier
- type CatchableError
- type Config
- type ConfigBroadcast
- type EventingCtxKey
- type InternalError
- type NotFoundError
- type PubsubUpdate
- type ServiceResponse
- type UncatchableError
Constants ¶
View Source
const ( BroadcastEventTypeCreate string = "create" BroadcastEventTypeUpdate string = "update" BroadcastEventTypeDelete string = "delete" BroadcastEventTypeInstanceStarted string = "started" BroadcastEventTypeInstanceFailed string = "failed" BroadcastEventTypeInstanceSuccess string = "success" )
View Source
const ( BroadcastEventScopeWorkflow string = "workflow" BroadcastEventScopeNamespace string = "namespace" BroadcastEventScopeInstance string = "instance" )
View Source
const ( BroadcastEventPrefixWorkflow string = "workflow" BroadcastEventPrefixDirectory string = "directory" BroadcastEventPrefixVariable string = "variable" BroadcastEventPrefixInstance string = "instance" )
View Source
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
View Source
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
View Source
const ( StatusPending = "pending" StatusFailed = "failed" StatusCrashed = "crashed" StatusComplete = "complete" )
View Source
const CancelActionMessage = "cancelAction"
Variables ¶
View Source
var ( ErrCodeInternal = "direktiv.internal.error" ErrCodeWorkflowUnparsable = "direktiv.workflow.unparsable" ErrCodeMultipleErrors = "direktiv.workflow.multipleErrors" ErrCodeCancelledByParent = "direktiv.cancels.parent" ErrCodeSoftTimeout = "direktiv.cancels.timeout.soft" ErrCodeHardTimeout = "direktiv.cancels.timeout.hard" ErrCodeJQBadQuery = "direktiv.jq.badCommand" ErrCodeJQNotObject = "direktiv.jq.notObject" ErrCodeAllBranchesFailed = "direktiv.parallel.allFailed" ErrCodeFailedSchemaValidation = "direktiv.schema.failed" )
View Source
var ( ErrNotDir = errors.New("not a directory") ErrNotWorkflow = errors.New("not a workflow") )
Functions ¶
func GetInodePath ¶ added in v0.5.4
func IsNotFound ¶ added in v0.5.0
func NewInternalError ¶ added in v0.5.0
func PublishKnativeEvent ¶ added in v0.5.5
func PublishKnativeEvent(ce *cloudevents.Event)
func SyncSubscribeTo ¶ added in v0.5.0
SyncSubscribeTo subscribes to direktiv interna postgres pub/sub
func WrapCatchableError ¶ added in v0.5.0
Types ¶
type CatchableError ¶ added in v0.5.0
func NewCatchableError ¶ added in v0.5.0
func NewCatchableError(code string, msg string, a ...interface{}) *CatchableError
func (*CatchableError) Error ¶ added in v0.5.0
func (err *CatchableError) Error() string
type Config ¶ added in v0.5.5
type Config struct {
Broadcast *ConfigBroadcast `json:"broadcast"`
}
type ConfigBroadcast ¶ added in v0.5.5
type ConfigBroadcast struct { WorkflowCreate *bool `json:"workflow.create"` WorkflowUpdate *bool `json:"workflow.update"` WorkflowDelete *bool `json:"workflow.delete"` DirectoryCreate *bool `json:"directory.create"` DirectoryDelete *bool `json:"directory.delete"` WorkflowVariableCreate *bool `json:"workflow.variable.create"` WorkflowVariableUpdate *bool `json:"workflow.variable.update"` WorkflowVariableDelete *bool `json:"workflow.variable.delete"` NamespaceVariableCreate *bool `json:"namespace.variable.create"` NamespaceVariableUpdate *bool `json:"namespace.variable.update"` NamespaceVariableDelete *bool `json:"namespace.variable.delete"` InstanceVariableCreate *bool `json:"instance.variable.create"` InstanceVariableUpdate *bool `json:"instance.variable.update"` InstanceVariableDelete *bool `json:"instance.variable.delete"` InstanceStarted *bool `json:"instance.started"` InstanceSuccess *bool `json:"instance.success"` InstanceFailed *bool `json:"instance.failed"` }
type EventingCtxKey ¶ added in v0.5.5
type EventingCtxKey string
const EventingCtxKeySource EventingCtxKey = "source"
type InternalError ¶ added in v0.5.0
func NewInternalErrorWithDepth ¶ added in v0.5.0
func NewInternalErrorWithDepth(err error, depth int) *InternalError
func (*InternalError) Error ¶ added in v0.5.0
func (err *InternalError) Error() string
func (*InternalError) Unwrap ¶ added in v0.5.0
func (err *InternalError) Unwrap() error
type NotFoundError ¶ added in v0.5.0
type NotFoundError struct {
Label string
}
func (*NotFoundError) Error ¶ added in v0.5.0
func (err *NotFoundError) Error() string
type PubsubUpdate ¶ added in v0.5.0
type ServiceResponse ¶ added in v0.5.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 UncatchableError ¶ added in v0.5.0
func NewUncatchableError ¶ added in v0.5.0
func NewUncatchableError(code, msg string, a ...interface{}) *UncatchableError
func (*UncatchableError) Error ¶ added in v0.5.0
func (err *UncatchableError) Error() string
Source Files ¶
- actions.go
- broadcast.go
- cancel.go
- config.go
- data.go
- database.go
- db-events.go
- engine.go
- errors.go
- eventing.go
- events.go
- functions.go
- grpc-flow.go
- grpc-health.go
- grpc-instance-variables.go
- grpc-instances.go
- grpc-internal.go
- grpc-logs.go
- grpc-namespace-variables.go
- grpc-namespaces.go
- grpc-nodes.go
- grpc-refs.go
- grpc-revisions.go
- grpc-routing.go
- grpc-secrets.go
- grpc-workflow-variables.go
- grpc-workflow.go
- isolate.go
- locks.go
- logs.go
- memory.go
- metrics.go
- pagination.go
- pubsub.go
- routing.go
- scheduling.go
- secrets.go
- server.go
- state-action.go
- state-consume-event.go
- state-delay.go
- state-error.go
- state-eventsand.go
- state-eventsxor.go
- state-foreach.go
- state-generate-event.go
- state-getter.go
- state-logic.go
- state-noop.go
- state-parallel.go
- state-setter.go
- state-switch.go
- state-validate.go
- status.go
- sync.go
- timeouts.go
- timers.go
- trace.go
- vars.go
- workflow.go
Click to show internal directories.
Click to hide internal directories.