Documentation
¶
Index ¶
Constants ¶
View Source
const ( DirectionInbound Direction = "inbound" DirectionOutbound Direction = "outbound" ResultSuccess Result = "success" ResultFailure Result = "failure" // DebugContextKey is the context key used to store the debugged call in the context. DO NOT // use this key directly, use [composer.DebugContextKey] instead. DebugContextKey string = "krb.debug" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Call ¶ added in v1.9.1
type Call interface {
// SetStartTime sets the start time of the call.
SetStartTime(startTime time.Time)
// SetURL sets the URL of the call.
SetURL(url string)
// SetMethod sets the HTTP method of the call.
SetMethod(method string)
// SetStatusCode sets the HTTP status code of the call.
SetStatusCode(statusCode int)
// AddTransition adds a flow transition to the call.
AddTransition(
component string,
direction Direction,
startTime time.Time,
endTime time.Time,
result Result,
failureCause string,
)
// Finalise finalises the call and makes it ready for storage.
Finalise()
}
Call is the interface that defines the methods for a debugged call.
type Debugger ¶
type Debugger interface {
// Debug starts a new debugged call and returns it along with a context that has the call stored in it.
Debug(context.Context) (Call, context.Context)
}
Debugger is the interface that defines the methods for debugging calls.
Click to show internal directories.
Click to hide internal directories.