util

package
v0.0.25 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2022 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BaseEvent = "BASE_EVENT"
)
View Source
const MEGABYTE = 1024 * 1024

Variables

This section is empty.

Functions

func AddStackTrace added in v0.0.10

func AddStackTrace(e error) error

func EnableErrorStackTrace added in v0.0.10

func EnableErrorStackTrace()

func Filter added in v0.0.10

func Filter[T any](slice []T, f func(T) bool) []T

func GetConfigEmail added in v0.0.10

func GetConfigEmail() string

func GetStackTrace added in v0.0.10

func GetStackTrace(e error) string

func PrintStackTrace added in v0.0.10

func PrintStackTrace(e error, w io.Writer)

func SendAllFromSlice added in v0.0.10

func SendAllFromSlice[T any](ctx context.Context, out chan<- T, items []T) error

SendAllFromSlice iterates over `items` and sends each one over `out` unless `ctx` is cancelled. Returns ctx.Err() if not all items were written to the channel.

func SendEvent added in v0.0.10

func SendEvent(ctx context.Context, logger *zap.Logger, eventType string, eventProperties map[string]interface{})

func SessionId added in v0.0.10

func SessionId() int64

func StartProfiler

func StartProfiler()

Types

This section is empty.

Directories

Path Synopsis
Backport of os/rlimit.go from go1.19.
Backport of os/rlimit.go from go1.19.

Jump to

Keyboard shortcuts

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