bootUtils

package
v0.0.0-...-52651d0 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2025 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BufferGrpcServerStream

func BufferGrpcServerStream(acceptableMimeTypes []string, maxFileSize int, readBytes func() ([]byte, error)) (bytes.Buffer, string, error)

Output: Returns byte buffer of stream and mime-type of the stream. Input: acceptableMimeTypes, fileSizeLimit and a stream readByte function. To accept any kind of stream pass "application/octet-stream" in acceptableStreams.

func GetEnvOrDefault

func GetEnvOrDefault(key, fallback string) string

func GetFileExtension

func GetFileExtension(mimeType string) string

func RetryWithExponentialBackoff

func RetryWithExponentialBackoff(ctx context.Context, maxRetries int, baseDelay time.Duration, fn func() error) error

func StreamContextError

func StreamContextError(ctx context.Context) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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