BaseConfig describes the tracking configuration - conditions, list of tracked
states and data expiration TTLs. Called is a list of mutation states (called ones) required to track a
transition. See also CalledExclude. Optional. CalledExclude flips Called to be a blocklist. Changed is a list of transition states which had clock changes, required to
track a transition. See also ChangedExclude. A state can be called, but not
changed. Optional. ChangedExclude flips Changed to be a blocklist.Logbool MaxRecords is the maximum number of records to keep in the history before
a rotation begins. TODO StoreSchema keeps the latest machine schema and state names within
[MachineRecord]. Useful for dynamic machines. StoreTransitions is a flag to store TransitionRecord, in addition to
TimeRecord, for each tracked transition. TrackRejected is a flag to track rejected transitions. TrackedStates is a list of states to store clock values of.
func (*BaseMemory).Config() BaseConfig
func (*Memory).Config() BaseConfig
func MemoryApi.Config() BaseConfig
func github.com/pancsta/asyncmachine-go/pkg/history/bbolt.(*Memory).Config() BaseConfig
func github.com/pancsta/asyncmachine-go/pkg/history/gorm.(*Memory).Config() BaseConfig
func NewBaseMemory(ctx context.Context, mach am.Api, config BaseConfig, memImpl MemoryApi) *BaseMemory
func NewMemory(ctx context.Context, machRecord *MachineRecord, mach am.Api, config BaseConfig, onErr func(err error)) (*Memory, error)
HTime is the human time for a mutation to match. MTime is the machine time for a mutation to match. MTimeDiff is a machine time difference for this transition, compared to the
previous transition. MTimeRecordDiff is a machine time difference since the previous
[TimeRecord]. MTimeStates is a set of states for MTime. MTimeSum is a machine time sum after this transition. MTimeDiff is a machine time difference for this transition for tracked
states only. MTimeSum is a machine time sum after this transition for tracked states
only. MachTick is the machine tick at the time of this transition.
ConditionTx represents a condition for a single transition. Requires
[BaseConfig.StoreTransitions] to be true. Called is a set of states that were called in the mutation.ExecutedAtuint64IsAcceptedboolIsAutoboolIsBrokenboolIsCheckboolQueryQuery Activated is a set of states that were activated during the transition. Active is a set of states that were active AFTER the mutation Deactivated is a set of states that were deactivated during the
transition. End is the end of a scalar time condition and requires an equivalent in
[Query.Start]. Inactive is a set of states that were inactive AFTER the mutation Start is the beginning of a scalar time condition and requires an
equivalent in [Query.End].QueueLenuint16QueuedAtuint64SourceMachstringSourceTxstring
HTime is a human time in UTC. MTimeDiffSum is a machine time difference for this transition. MTimeRecordDiffSum is a machine time difference since the previous
[TimeRecord]. MTimeSum is a machine time sum after this transition. MTime is a machine time after this mutation. MTimeTrackedDiff is a machine time diff compared to the previous mutation
(not a record). MTimeDiffSum is a machine time difference for this transition for tracked
states only. MTimeSum is a machine time sum after this transition for tracked states
only. MachTick is the machine tick at the time of this transition. MutType is a mutation type.
func (*BaseMemory).ToTimeRecord(format any) (*TimeRecord, error)
func MemoryApi.ToTimeRecord(format any) (*TimeRecord, error)
func github.com/pancsta/asyncmachine-go/pkg/history/bbolt.DecTimeRecord(machId string, id uint64, v []byte, tryJson bool) (*TimeRecord, error)
NewMemory returns a new memory instance that tracks the given machine
according to the given tracking configuration. All states are tracked by
default, which often is not desired. Keeps 1000 records by default.
The pages are generated with Goldsv0.8.2. (GOOS=linux GOARCH=amd64)
Golds is a Go 101 project developed by Tapir Liu.
PR and bug reports are welcome and can be submitted to the issue list.
Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds.