Documentation
¶
Index ¶
- Constants
- type Callback
- type CloseRequest
- type ContextInspection
- type DebugCommandRequest
- type DebugState
- type GetLoggingRequest
- type GetOperationRequest
- type InspectContextRequest
- type ListOperationsRequest
- type ListOperationsResponse
- type ListSessionsResponse
- type ListWorkflowsRequest
- type ListWorkflowsResponse
- type LoadWorkflowRequest
- type LoadedWorkflow
- type LoggingState
- type ManagerFactory
- type OpenRequest
- type Operation
- type OperationEvent
- type Option
- func WithAllowedActions(actions ...string) Option
- func WithCallbackHTTPClient(client *http.Client) Option
- func WithCallbackHosts(hosts ...string) Option
- func WithMaxEvents(limit int) Option
- func WithMaxSessions(limit int) Option
- func WithOperationRetention(retention time.Duration) Option
- func WithPrivateCallbacks(enabled bool) Option
- func WithSessionTTL(ttl time.Duration) Option
- type RunActionRequest
- type RunWorkflowRequest
- type Service
- func (s *Service) Close(ctx context.Context, sessionID string) error
- func (s *Service) DebugCommand(request *DebugCommandRequest) (*DebugState, error)
- func (s *Service) DebugState(sessionID, operationID string) (*DebugState, error)
- func (s *Service) GetOperation(sessionID, operationID string) (*Operation, error)
- func (s *Service) InspectContext(request *InspectContextRequest) (*ContextInspection, error)
- func (s *Service) ListOperations(sessionID string) (*ListOperationsResponse, error)
- func (s *Service) ListWorkflows(sessionID string) (*ListWorkflowsResponse, error)
- func (s *Service) LoadWorkflow(ctx context.Context, request *LoadWorkflowRequest) (*LoadedWorkflow, error)
- func (s *Service) Logging(sessionID string) (*LoggingState, error)
- func (s *Service) Open(ctx context.Context, request *OpenRequest) (*SessionInfo, error)
- func (s *Service) Session(sessionID string) (*SessionInfo, error)
- func (s *Service) Sessions() *ListSessionsResponse
- func (s *Service) SetLogging(request *SetLoggingRequest) (*LoggingState, error)
- func (s *Service) Shutdown(ctx context.Context) error
- func (s *Service) StartAction(request *RunActionRequest) (*Operation, error)
- func (s *Service) StartJanitor(ctx context.Context, interval time.Duration)
- func (s *Service) StartWorkflow(request *RunWorkflowRequest) (*Operation, error)
- func (s *Service) StopOperation(sessionID, operationID string) (*Operation, error)
- func (s *Service) UnloadWorkflow(request *UnloadWorkflowRequest) error
- func (s *Service) WaitOperation(ctx context.Context, sessionID, operationID string) (*Operation, error)
- type Session
- type SessionInfo
- type SetLoggingRequest
- type StartOperationRequest
- type StopOperationRequest
- type UnloadWorkflowRequest
- type ValidationError
Constants ¶
View Source
const ( OperationQueued = "queued" OperationRunning = "running" OperationSucceeded = "succeeded" OperationFailed = "failed" OperationCancelling = "cancelling" OperationCancelled = "cancelled" )
View Source
const ServiceID = "manager"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CloseRequest ¶
type CloseRequest struct {
SessionID string `json:"sessionId"`
}
type ContextInspection ¶
type DebugCommandRequest ¶
type DebugState ¶
type GetLoggingRequest ¶
type GetLoggingRequest struct {
SessionID string `json:"sessionId"`
}
type GetOperationRequest ¶
type InspectContextRequest ¶
type ListOperationsRequest ¶
type ListOperationsRequest struct {
SessionID string `json:"sessionId"`
}
type ListOperationsResponse ¶
type ListSessionsResponse ¶
type ListSessionsResponse struct {
Sessions []*SessionInfo `json:"sessions"`
}
type ListWorkflowsRequest ¶
type ListWorkflowsRequest struct {
SessionID string `json:"sessionId"`
}
type ListWorkflowsResponse ¶
type ListWorkflowsResponse struct {
SessionID string `json:"sessionId"`
Workflows []*LoadedWorkflow `json:"workflows"`
}
type LoadWorkflowRequest ¶
type LoadedWorkflow ¶
type LoggingState ¶
type ManagerFactory ¶
type OpenRequest ¶
type Operation ¶
type Operation struct {
ID string `json:"id"`
SessionID string `json:"sessionId"`
Status string `json:"status"`
Kind string `json:"kind"`
Workflow string `json:"workflow"`
Service string `json:"service,omitempty"`
Action string `json:"action,omitempty"`
Tasks string `json:"tasks"`
TagIDs string `json:"tagIds,omitempty"`
CreatedAt time.Time `json:"createdAt"`
StartedAt *time.Time `json:"startedAt,omitempty"`
FinishedAt *time.Time `json:"finishedAt,omitempty"`
Result map[string]interface{} `json:"result,omitempty"`
Error string `json:"error,omitempty"`
Events []*OperationEvent `json:"events,omitempty"`
Debug *DebugState `json:"debug,omitempty"`
DroppedEvents int64 `json:"droppedEvents,omitempty"`
// contains filtered or unexported fields
}
type OperationEvent ¶
type OperationEvent struct {
Sequence int64 `json:"sequence"`
Type string `json:"type"`
EndlyType string `json:"endlyType,omitempty"`
Timestamp time.Time `json:"timestamp"`
Value interface{} `json:"value,omitempty"`
Messages []*msg.Message `json:"messages,omitempty"`
Activity *model.Activity `json:"activity,omitempty"`
ActivityEnd bool `json:"activityEnd,omitempty"`
}
type Option ¶
type Option func(*Service)
func WithAllowedActions ¶
func WithCallbackHTTPClient ¶
func WithCallbackHosts ¶
func WithMaxEvents ¶
func WithMaxSessions ¶
func WithOperationRetention ¶
func WithPrivateCallbacks ¶
func WithSessionTTL ¶
type RunActionRequest ¶
type RunWorkflowRequest ¶
type RunWorkflowRequest struct {
SessionID string `json:"sessionId"`
Workflow string `json:"workflow"`
Tasks string `json:"tasks,omitempty"`
TagIDs string `json:"tagIds,omitempty"`
Params map[string]interface{} `json:"params,omitempty"`
Callbacks []Callback `json:"callbacks,omitempty"`
Debug bool `json:"debug,omitempty"`
Breakpoints []debug.Step `json:"breakpoints,omitempty"`
Timeout time.Duration `json:"-"`
TimeoutMillis int64 `json:"timeoutMillis,omitempty"`
PublishParameters *bool `json:"publishParameters,omitempty"`
}
type Service ¶
type Service struct {
*endly.AbstractService
// contains filtered or unexported fields
}
func New ¶
func New(factory ManagerFactory, options ...Option) *Service
func (*Service) DebugCommand ¶
func (s *Service) DebugCommand(request *DebugCommandRequest) (*DebugState, error)
func (*Service) DebugState ¶
func (s *Service) DebugState(sessionID, operationID string) (*DebugState, error)
func (*Service) GetOperation ¶
func (*Service) InspectContext ¶
func (s *Service) InspectContext(request *InspectContextRequest) (*ContextInspection, error)
func (*Service) ListOperations ¶
func (s *Service) ListOperations(sessionID string) (*ListOperationsResponse, error)
func (*Service) ListWorkflows ¶
func (s *Service) ListWorkflows(sessionID string) (*ListWorkflowsResponse, error)
func (*Service) LoadWorkflow ¶
func (s *Service) LoadWorkflow(ctx context.Context, request *LoadWorkflowRequest) (*LoadedWorkflow, error)
func (*Service) Open ¶
func (s *Service) Open(ctx context.Context, request *OpenRequest) (*SessionInfo, error)
func (*Service) Sessions ¶
func (s *Service) Sessions() *ListSessionsResponse
func (*Service) SetLogging ¶
func (s *Service) SetLogging(request *SetLoggingRequest) (*LoggingState, error)
func (*Service) StartAction ¶
func (s *Service) StartAction(request *RunActionRequest) (*Operation, error)
func (*Service) StartJanitor ¶
func (*Service) StartWorkflow ¶
func (s *Service) StartWorkflow(request *RunWorkflowRequest) (*Operation, error)
func (*Service) StopOperation ¶
func (*Service) UnloadWorkflow ¶
func (s *Service) UnloadWorkflow(request *UnloadWorkflowRequest) error
type SessionInfo ¶
type SetLoggingRequest ¶
type StartOperationRequest ¶
type StartOperationRequest struct {
Kind string `json:"kind"`
Workflow *RunWorkflowRequest `json:"workflow,omitempty"`
Action *RunActionRequest `json:"action,omitempty"`
}
type StopOperationRequest ¶
type StopOperationRequest = GetOperationRequest
type UnloadWorkflowRequest ¶
type ValidationError ¶
type ValidationError struct{ Message string }
func (*ValidationError) Error ¶
func (e *ValidationError) Error() string
Click to show internal directories.
Click to hide internal directories.