utils

package
v0.0.0-...-032e02f Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

README

utils

import "github.com/carousell/Orion/utils"

Overview

Imported Packages

Index

Package files

documentation.go utils.go

Variables

var (
    // NewRelicApp is the reference for newrelic application
    NewRelicApp newrelic.Application
)

func FinishNRTransaction

func FinishNRTransaction(ctx context.Context, err error)

FinishNRTransaction finishes an existing transaction

func GetHostname

func GetHostname() string

GetHostname fetches the hostname of the system

func GetNewRelicTransactionFromContext

func GetNewRelicTransactionFromContext(ctx context.Context) newrelic.Transaction

GetNewRelicTransactionFromContext fetches the new relic transaction that is stored in the context

func IgnoreNRTransaction

func IgnoreNRTransaction(ctx context.Context) error

IgnoreNRTransaction ignores this NR trasaction and prevents it from being reported

func StartNRTransaction

func StartNRTransaction(path string, ctx context.Context, req *http.Request, w http.ResponseWriter) context.Context

StartNRTransaction starts a new newrelic transaction

func StoreNewRelicTransactionToContext

func StoreNewRelicTransactionToContext(ctx context.Context, t newrelic.Transaction) context.Context

StoreNewRelicTransactionToContext stores a new relic transaction object to context


Generated by godoc2ghmd

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// NewRelicApp is the reference for newrelic application
	NewRelicApp newrelic.Application
)

Functions

func FinishNRTransaction

func FinishNRTransaction(ctx context.Context, err error)

FinishNRTransaction finishes an existing transaction

func GetHostname

func GetHostname() string

GetHostname fetches the hostname of the system

func GetNewRelicTransactionFromContext

func GetNewRelicTransactionFromContext(ctx context.Context) newrelic.Transaction

GetNewRelicTransactionFromContext fetches the new relic transaction that is stored in the context

func IgnoreNRTransaction

func IgnoreNRTransaction(ctx context.Context) error

IgnoreNRTransaction ignores this NR trasaction and prevents it from being reported

func StartNRTransaction

func StartNRTransaction(path string, ctx context.Context, req *http.Request, w http.ResponseWriter) context.Context

StartNRTransaction starts a new newrelic transaction

func StoreNewRelicTransactionToContext

func StoreNewRelicTransactionToContext(ctx context.Context, t newrelic.Transaction) context.Context

StoreNewRelicTransactionToContext stores a new relic transaction object to context

Types

This section is empty.

Directories

Path Synopsis
Package httptripper provides an implementation of http.RoundTripper that provides retries, popluates opentracing span info and hystrix circuit breaker.
Package httptripper provides an implementation of http.RoundTripper that provides retries, popluates opentracing span info and hystrix circuit breaker.
retry
Package retry provides an implementation for retrying http requests with multiple wait strategies
Package retry provides an implementation for retrying http requests with multiple wait strategies
strategy
Package strategy provides strategies for use with retry
Package strategy provides strategies for use with retry
log
Package log provides a minimal interface for structured logging in services.
Package log provides a minimal interface for structured logging in services.
loggers
Package loggers provides loggers implementation for log package
Package loggers provides loggers implementation for log package
loggers/gokit
Package gokit provides BaseLogger implementation for go-kit/log
Package gokit provides BaseLogger implementation for go-kit/log
loggers/logrus
Package logrus provides a BaseLogger implementation for logrus
Package logrus provides a BaseLogger implementation for logrus
loggers/stdlog
Package stdlog provides a BaseLogger implementation for golang "log" package
Package stdlog provides a BaseLogger implementation for golang "log" package
wrap
Package wrap provides multiple wrap functions to wrap log implementation of other log packages
Package wrap provides multiple wrap functions to wrap log implementation of other log packages
message_queue/mocks
Code generated by mockery v1.0.0.
Code generated by mockery v1.0.0.

Jump to

Keyboard shortcuts

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