tyber

package
v2.273.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 14, 2021 License: Apache-2.0, MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContextWithTraceID

func ContextWithTraceID(ctx context.Context) context.Context

func FormatEventLogFields

func FormatEventLogFields(ctx context.Context, details []Detail) []zapcore.Field

func FormatStepLogFields

func FormatStepLogFields(ctx context.Context, details []Detail, status StatusType, end bool) []zapcore.Field

func FormatTraceLogFields

func FormatTraceLogFields(ctx context.Context) []zapcore.Field

Types

type Detail

type Detail struct {
	Name        string `json:"name"`
	Description string `json:"description"`
}

type Event

type Event struct {
	Details []Detail `json:"details"`
}

type LogType

type LogType string
const (
	TraceType LogType = "trace"
	StepType  LogType = "step"
	EventType LogType = "event"
)

type StatusType

type StatusType string
const (
	Running   StatusType = "running"
	Succeeded StatusType = "succeeded"
	Failed    StatusType = "failed"
)

type Step

type Step struct {
	ParentTraceID string     `json:"parentTraceID"`
	Details       []Detail   `json:"details"`
	Status        StatusType `json:"status"`
	EndTrace      bool       `json:"endTrace"`
}

type Trace

type Trace struct {
	TraceID string `json:"traceID"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL