Documentation ¶
Index ¶
- Variables
- func AddTag(ctx context.Context, key, value interface{}) context.Context
- func BuildInstanceTrack(instance *Instance) string
- func BuildNamespaceTrack(namespace string) string
- func GetSlogAttributesWithError(ctx context.Context, err error) []interface{}
- func GetSlogAttributesWithStatus(ctx context.Context, status core.LogStatus) []interface{}
- func WithTrack(ctx context.Context, track string) context.Context
- type ChildInfo
- type Instance
- type InstanceChildInfoV1
- type InstanceChildrenInfo
- type InstanceDescentInfo
- type InstanceDescentInfoV1
- type InstanceRuntimeInfo
- type InstanceSettings
- type InstanceTelemetryInfo
- type ParentInfo
Constants ¶
This section is empty.
Variables ¶
var ErrInvalidInstanceChildInfo = errors.New("invalid instance child info")
var ErrInvalidInstanceDescentInfo = errors.New("invalid instance descent info")
var ErrInvalidInstanceRuntimeInfo = errors.New("invalid instance runtime info")
var ErrInvalidInstanceSettings = errors.New("invalid instance settings")
var ErrInvalidInstanceTelemetryInfo = errors.New("invalid instance telemetry info")
Functions ¶
func BuildInstanceTrack ¶ added in v0.8.4
func BuildNamespaceTrack ¶ added in v0.8.4
func GetSlogAttributesWithError ¶ added in v0.8.4
func GetSlogAttributesWithStatus ¶ added in v0.8.4
Types ¶
type ChildInfo ¶
type ChildInfo struct { ID string `json:"id"` Async bool `json:"async"` Complete bool `json:"complete"` Type string `json:"type"` Attempts int `json:"attempts"` ServiceName string `json:"service_name"` }
ChildInfo is part of the ChildrenInfo structure. It represents useful information about a single child action.
type Instance ¶
type Instance struct { Instance *instancestore.InstanceData TelemetryInfo *InstanceTelemetryInfo RuntimeInfo *InstanceRuntimeInfo Settings *InstanceSettings DescentInfo *InstanceDescentInfo }
func ParseInstanceData ¶
func ParseInstanceData(idata *instancestore.InstanceData) (*Instance, error)
func (*Instance) GetAttributes ¶
func (instance *Instance) GetAttributes(recipientType recipient.RecipientType) map[string]string
type InstanceChildInfoV1 ¶
type InstanceChildrenInfo ¶
type InstanceChildrenInfo struct { Version string // to let us identify and correct outdated versions of this struct Children []ChildInfo }
ChildrenInfo keeps some useful information about all direct child actions of this instance.
func LoadInstanceChildInfo ¶
func LoadInstanceChildInfo(data []byte) (*InstanceChildrenInfo, error)
func (*InstanceChildrenInfo) MarshalJSON ¶
func (info *InstanceChildrenInfo) MarshalJSON() ([]byte, error)
type InstanceDescentInfo ¶
type InstanceDescentInfo struct { Version string // to let us identify and correct outdated versions of this struct Descent []ParentInfo // chain of callers from the root instance to the direct parent. }
InstanceDescentInfo keeps a local copy of useful information about the entire chain of parent instances all the way to the root instance, excepting this instance.
func LoadInstanceDescentInfo ¶
func LoadInstanceDescentInfo(data []byte) (*InstanceDescentInfo, error)
func (*InstanceDescentInfo) MarshalJSON ¶
func (info *InstanceDescentInfo) MarshalJSON() ([]byte, error)
type InstanceDescentInfoV1 ¶
type InstanceDescentInfoV1 struct { Version string `json:"version"` Descent []ParentInfo `json:"descent"` }
type InstanceRuntimeInfo ¶
type InstanceRuntimeInfo struct { Version string // to let us identify and correct outdated versions of this struct Controller string Flow []string // NOTE: now that we keep a copy of the definition we could replace []string with []int StateBeginTime time.Time Attempts int }
InstanceRuntimeInfo keeps other miscellaneous information useful to the engine.
func LoadInstanceRuntimeInfo ¶
func LoadInstanceRuntimeInfo(data []byte) (*InstanceRuntimeInfo, error)
func (*InstanceRuntimeInfo) MarshalJSON ¶
func (info *InstanceRuntimeInfo) MarshalJSON() ([]byte, error)
type InstanceSettings ¶
type InstanceSettings struct { Version string // to let us identify and correct outdated versions of this struct LogToEvents string }
InstanceSettings keeps a local copy of various namespace and workflow settings so that the engine doesn't have to look them up separately.
func LoadInstanceSettings ¶
func LoadInstanceSettings(data []byte) (*InstanceSettings, error)
func (*InstanceSettings) MarshalJSON ¶
func (info *InstanceSettings) MarshalJSON() ([]byte, error)
type InstanceTelemetryInfo ¶
type InstanceTelemetryInfo struct { Version string // to let us identify and correct outdated versions of this struct TraceID string SpanID string CallPath string NamespaceName string }
InstanceTelemetryInfo keeps information useful to our telemetry logic.
func LoadInstanceTelemetryInfo ¶
func LoadInstanceTelemetryInfo(data []byte) (*InstanceTelemetryInfo, error)
func (*InstanceTelemetryInfo) MarshalJSON ¶
func (info *InstanceTelemetryInfo) MarshalJSON() ([]byte, error)
type ParentInfo ¶
type ParentInfo struct { ID uuid.UUID `json:"id"` State string `json:"state"` Step int `json:"step"` Branch int `json:"branch"` // NOTE: renamed iterator to branch }
ParentInfo is part of the InstanceDescentInfo structure. It represents useful information about a single instance in the chain.