Documentation
¶
Index ¶
- func HostInfoFrom(ctx context.Context) (string, bool)
- func PolicyIncludedFrom(ctx context.Context) (bool, bool)
- func ShouldExploitFrom(ctx context.Context) (bool, bool)
- func TraceIDFrom(ctx context.Context) (string, bool)
- func WithHostInfo(ctx context.Context, domain string) context.Context
- func WithNewTraceID(ctx context.Context) context.Context
- func WithPolicyIncluded(ctx context.Context, patternMatched bool) context.Context
- func WithShouldExploit(ctx context.Context, shouldExploit bool) context.Context
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HostInfoFrom ¶
HostInfoFrom extracts a domain name string from the context, if one exists.
func TraceIDFrom ¶
TraceIDFrom extracts a trace ID string from the context, if one exists.
func WithHostInfo ¶
WithHostInfo returns a new context carrying the given domain name string.
func WithNewTraceID ¶
WithNewTraceID ensures a trace ID is present in the context. If one does not exist, it generates a new random trace ID and returns a new context carrying it. If one already exists, it returns the original context unmodified.
func WithPolicyIncluded ¶
Types ¶
This section is empty.