Documentation ¶
Index ¶
- Constants
- func GetAppID() string
- func GetAppIDUUID() ints.Uuid
- func GetAppName() (name string)
- func GetAppVersion() (version string)
- func GetDataCenter() (name string)
- func GetUnsecure() (unsec bool)
- func SetAppName(name string)
- func SetAppVersion(version string)
- func SetDataCenter(name string)
- func SetDefaultProvider(p *Provider)
- func SetUnsecure(unsec bool)
- func ToJson(sp JsonifyProvider, value any) json.RawMessage
- func WriteLog(lp LogProvider, c *Crumps, level LogLevel, ...)
- func WriteMetricRequest(mp MetricsProvider, c *Crumps, segment, method string)
- func WriteMetricResponse(mp MetricsProvider, c *Crumps, mRequest time.Time, segment, method string, ...)
- func WriteTrace(tp TraceProvider, span trace.Span, c *Crumps, ...)
- type Crumps
- func (c *Crumps) Complete(err error)
- func (c *Crumps) Copy() *Crumps
- func (c *Crumps) Deadline() (deadline time.Time, ok bool)
- func (c *Crumps) Done() <-chan struct{}
- func (c *Crumps) Err() error
- func (c *Crumps) GetOperationID() string
- func (c *Crumps) Log(level LogLevel, message string)
- func (c *Crumps) LogUnsec(level LogLevel, message string)
- func (c *Crumps) Start(method string) *Crumps
- func (c *Crumps) StartSegment(segment, method string) *Crumps
- func (c *Crumps) Value(key any) any
- func (c *Crumps) With(name string, value any) *Crumps
- func (c *Crumps) WithCancel() (*Crumps, context.CancelFunc)
- func (c *Crumps) WithCancelCause() (*Crumps, context.CancelCauseFunc)
- func (c *Crumps) WithDeadline(d time.Time) (*Crumps, context.CancelFunc)
- func (c *Crumps) WithDeadlineCause(d time.Time, cause error) (*Crumps, context.CancelFunc)
- func (c *Crumps) WithTimeout(timeout time.Duration) (*Crumps, context.CancelFunc)
- func (c *Crumps) WithTimeoutCause(timeout time.Duration, cause error) (*Crumps, context.CancelFunc)
- func (c *Crumps) WithUnsec(name string, value any) *Crumps
- func (c *Crumps) WithValue(key any, val any) (*Crumps, context.CancelFunc)
- func (c *Crumps) WithoutCancel(key any, val any) (*Crumps, context.CancelFunc)
- type JsonifyProvider
- type LogLevel
- type LogProvider
- type MetricsProvider
- type Provider
- type StepInfo
- type TraceProvider
- type Values
Constants ¶
View Source
const ( MsgComplete = "complete" MsgError = "error" )
View Source
const (
CtxValName string = "_Crumps"
)
Variables ¶
This section is empty.
Functions ¶
func GetAppIDUUID ¶ added in v1.0.1
func GetAppName ¶
func GetAppName() (name string)
func GetAppVersion ¶
func GetAppVersion() (version string)
func GetDataCenter ¶ added in v0.0.3
func GetDataCenter() (name string)
func GetUnsecure ¶ added in v1.1.0
func GetUnsecure() (unsec bool)
func SetAppName ¶
func SetAppName(name string)
func SetAppVersion ¶
func SetAppVersion(version string)
func SetDataCenter ¶ added in v0.0.3
func SetDataCenter(name string)
func SetDefaultProvider ¶
func SetDefaultProvider(p *Provider)
func SetUnsecure ¶ added in v1.1.0
func SetUnsecure(unsec bool)
func ToJson ¶
func ToJson(sp JsonifyProvider, value any) json.RawMessage
func WriteMetricRequest ¶
func WriteMetricRequest(mp MetricsProvider, c *Crumps, segment, method string)
func WriteMetricResponse ¶
func WriteTrace ¶
Types ¶
type Crumps ¶
type Crumps struct {
// contains filtered or unexported fields
}
func (*Crumps) GetOperationID ¶ added in v0.0.2
func (*Crumps) StartSegment ¶
func (*Crumps) WithCancel ¶ added in v0.0.3
func (c *Crumps) WithCancel() (*Crumps, context.CancelFunc)
func (*Crumps) WithCancelCause ¶ added in v0.0.3
func (c *Crumps) WithCancelCause() (*Crumps, context.CancelCauseFunc)
func (*Crumps) WithDeadline ¶ added in v0.0.3
func (*Crumps) WithDeadlineCause ¶ added in v0.0.3
func (*Crumps) WithTimeout ¶ added in v0.0.3
func (*Crumps) WithTimeoutCause ¶ added in v0.0.3
func (*Crumps) WithUnsec ¶ added in v1.1.0
WithUnsec adds jsonify value and adds it when unsecure is true
func (*Crumps) WithoutCancel ¶ added in v0.0.3
type JsonifyProvider ¶
type JsonifyProvider interface {
ToJson(value any) json.RawMessage
}
type LogProvider ¶
type MetricsProvider ¶
type Provider ¶
type Provider struct { LP LogProvider MP MetricsProvider SP JsonifyProvider TP TraceProvider }
func (*Provider) MakeCrumps ¶
type TraceProvider ¶
type Values ¶
type Values []json.RawMessage
Click to show internal directories.
Click to hide internal directories.