Documentation
¶
Index ¶
- func BufferGrpcServerStream(acceptableMimeTypes []string, maxFileSize int, ...) (bytes.Buffer, string, error)
- func GetEnvOrDefault(key, fallback string) string
- func GetFileExtension(mimeType string) string
- func RetryWithExponentialBackoff(ctx context.Context, maxRetries int, baseDelay time.Duration, fn func() error) error
- func StreamContextError(ctx context.Context) error
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 ¶ added in v0.1.46
func GetFileExtension ¶ added in v0.1.25
func RetryWithExponentialBackoff ¶ added in v0.1.46
func StreamContextError ¶ added in v0.1.25
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.