Documentation
¶
Index ¶
- Variables
- func NewInMemoryFlowManager() definitions.FlowManager
- type InMemoryFlowManager
- func (fm *InMemoryFlowManager) AddProcessorToFlowAfter(flowID uuid.UUID, newProcessor *definitions.SimpleProcessor, ...) error
- func (fm *InMemoryFlowManager) AddProcessorToFlowBefore(flowID uuid.UUID, newProcessor *definitions.SimpleProcessor, ...) error
- func (fm *InMemoryFlowManager) GetFirstProcessorsForFlow(flowID uuid.UUID) ([]*definitions.SimpleProcessor, error)
- func (fm *InMemoryFlowManager) GetFlowByID(flowID uuid.UUID) (*definitions.Flow, error)
- func (fm *InMemoryFlowManager) GetFlowProcessors(flowID uuid.UUID) ([]*definitions.SimpleProcessor, error)
- func (fm *InMemoryFlowManager) GetLastUpdateTime(flowIDs []uuid.UUID) (map[uuid.UUID]time.Time, error)
- func (fm *InMemoryFlowManager) GetNextProcessors(flowID uuid.UUID, processorID uuid.UUID) ([]*definitions.SimpleProcessor, error)
- func (fm *InMemoryFlowManager) GetProcessorByID(flowID uuid.UUID, processorID uuid.UUID) (*definitions.SimpleProcessor, error)
- func (fm *InMemoryFlowManager) GetProcessors(processorIDs []uuid.UUID) ([]*definitions.SimpleProcessor, error)
- func (fm *InMemoryFlowManager) GetTriggerProcessorsForFlow(flowID uuid.UUID) ([]*definitions.SimpleTriggerProcessor, error)
- func (fm *InMemoryFlowManager) ListFlows(pagination *definitions.PaginationRequest, since time.Time) (*definitions.PaginatedData[*definitions.Flow], error)
- func (fm *InMemoryFlowManager) SaveFlow(flow *definitions.Flow) error
- func (fm *InMemoryFlowManager) SetFlowActive(flowID uuid.UUID, active bool) error
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func NewInMemoryFlowManager ¶ added in v0.1.0
func NewInMemoryFlowManager() definitions.FlowManager
Types ¶
type InMemoryFlowManager ¶ added in v0.1.0
type InMemoryFlowManager struct {
// contains filtered or unexported fields
}
func (*InMemoryFlowManager) AddProcessorToFlowAfter ¶ added in v0.1.0
func (fm *InMemoryFlowManager) AddProcessorToFlowAfter(flowID uuid.UUID, newProcessor *definitions.SimpleProcessor, referenceProcessorID uuid.UUID) error
AddProcessorToFlowAfter adds a processor after the reference processor by appending it to the reference processor's NextProcessors.
func (*InMemoryFlowManager) AddProcessorToFlowBefore ¶ added in v0.1.0
func (fm *InMemoryFlowManager) AddProcessorToFlowBefore(flowID uuid.UUID, newProcessor *definitions.SimpleProcessor, referenceProcessorID uuid.UUID) error
AddProcessorToFlowBefore inserts a processor before the reference processor. This means the new processor should now appear in place of the reference processor wherever it was referenced. Also, the new processor points to the reference processor in its NextProcessors.
func (*InMemoryFlowManager) GetFirstProcessorsForFlow ¶ added in v0.1.0
func (fm *InMemoryFlowManager) GetFirstProcessorsForFlow(flowID uuid.UUID) ([]*definitions.SimpleProcessor, error)
GetFirstProcessorsForFlow retrieves processors that are not referenced as NextProcessors by any other processor.
func (*InMemoryFlowManager) GetFlowByID ¶ added in v0.1.0
func (fm *InMemoryFlowManager) GetFlowByID(flowID uuid.UUID) (*definitions.Flow, error)
GetFlowByID retrieves a flow by its unique identifier.
func (*InMemoryFlowManager) GetFlowProcessors ¶ added in v0.1.0
func (fm *InMemoryFlowManager) GetFlowProcessors(flowID uuid.UUID) ([]*definitions.SimpleProcessor, error)
GetFlowProcessors retrieves all processors for a given flow.
func (*InMemoryFlowManager) GetLastUpdateTime ¶ added in v0.1.0
func (fm *InMemoryFlowManager) GetLastUpdateTime(flowIDs []uuid.UUID) (map[uuid.UUID]time.Time, error)
GetLastUpdateTime retrieves the last update time for the given flow IDs.
func (*InMemoryFlowManager) GetNextProcessors ¶ added in v0.1.0
func (fm *InMemoryFlowManager) GetNextProcessors(flowID uuid.UUID, processorID uuid.UUID) ([]*definitions.SimpleProcessor, error)
GetNextProcessors retrieves the NextProcessors of the specified processor.
func (*InMemoryFlowManager) GetProcessorByID ¶ added in v0.1.0
func (fm *InMemoryFlowManager) GetProcessorByID(flowID uuid.UUID, processorID uuid.UUID) (*definitions.SimpleProcessor, error)
GetProcessorByID retrieves a processor by its ID within a flow.
func (*InMemoryFlowManager) GetProcessors ¶ added in v0.1.0
func (fm *InMemoryFlowManager) GetProcessors(processorIDs []uuid.UUID) ([]*definitions.SimpleProcessor, error)
GetProcessors retrieves processors by their unique identifiers. Since we have multiple flows, we scan them all.
func (*InMemoryFlowManager) GetTriggerProcessorsForFlow ¶ added in v0.1.0
func (fm *InMemoryFlowManager) GetTriggerProcessorsForFlow(flowID uuid.UUID) ([]*definitions.SimpleTriggerProcessor, error)
GetTriggerProcessorsForFlow retrieves the trigger processors for the specified flow.
func (*InMemoryFlowManager) ListFlows ¶ added in v0.1.0
func (fm *InMemoryFlowManager) ListFlows(pagination *definitions.PaginationRequest, since time.Time) (*definitions.PaginatedData[*definitions.Flow], error)
ListFlows lists flows with pagination and a time filter.
func (*InMemoryFlowManager) SaveFlow ¶ added in v0.1.0
func (fm *InMemoryFlowManager) SaveFlow(flow *definitions.Flow) error
SaveFlow saves the flow and its processors. Because the flow already has Processors and TriggerProcessors with proper references, we just store them. We assume that `flow.Processors` includes all processors and `flow.FirstProcessors` is derived, not stored explicitly.
func (*InMemoryFlowManager) SetFlowActive ¶ added in v0.1.0
func (fm *InMemoryFlowManager) SetFlowActive(flowID uuid.UUID, active bool) error
SetFlowActive marks a flow as active or inactive.