mirror of
https://github.com/grafana/grafana.git
synced 2025-07-31 10:22:10 +08:00
Add error options for rendering to return errors on failure (#48864)
This commit is contained in:
@ -41,6 +41,7 @@ func getRequestTimeout(opt TimeoutOpts) time.Duration {
|
||||
type Opts struct {
|
||||
TimeoutOpts
|
||||
AuthOpts
|
||||
ErrorOpts
|
||||
Width int
|
||||
Height int
|
||||
Path string
|
||||
@ -52,6 +53,15 @@ type Opts struct {
|
||||
Theme models.Theme
|
||||
}
|
||||
|
||||
type ErrorOpts struct {
|
||||
// ErrorConcurrentLimitReached returns an ErrConcurrentLimitReached
|
||||
// error instead of a rendering limit exceeded image.
|
||||
ErrorConcurrentLimitReached bool
|
||||
// ErrorRenderUnavailable returns an ErrRunderUnavailable error
|
||||
// instead of a rendering unavailable image.
|
||||
ErrorRenderUnavailable bool
|
||||
}
|
||||
|
||||
type CSVOpts struct {
|
||||
TimeoutOpts
|
||||
AuthOpts
|
||||
|
Reference in New Issue
Block a user