call

package
v0.0.0-...-6e646ca Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Call

type Call struct {
	// Env is the environment the app is running in
	// - ex. cc.Env returns "dev"
	Env string
	// Region is the AWS region the app is running in
	// - ex. cc.Region returns "us-east-1"
	Region string
}

Call is a utility struct used for simplifying logging and metrics throughout the codebase

func New

func New(appEnv, appRegion string) Call

New returns a new Call pointer, and initialises the statsd client for Datadog metrics on port 8125

func (*Call) ErrorF

func (cc *Call) ErrorF(stringRaw string, a ...any) error

ErrorF logs an error message

func (*Call) InfoF

func (cc *Call) InfoF(stringRaw string, a ...any)

InfoF logs an info message

func (*Call) TraceF

func (cc *Call) TraceF(stringRaw string, a ...any)

TraceF logs a trace message

type Service

type Service interface {
	InfoF(stringRaw string, a ...any)
	TraceF(stringRaw string, a ...any)
	ErrorF(stringRaw string, a ...any) error
}

Jump to

Keyboard shortcuts

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