Documentation ¶
Index ¶
- Constants
- func EnvGetBool(key string, defaultValue bool) bool
- func EnvGetDuration(key string, defaultValue time.Duration) time.Duration
- func EnvGetInt(key string, defaultValue int) int
- func HttpGetDispositionFilename(disposition string) (string, error)
- func HttpResponseError(rw http.ResponseWriter, statusCode int, err error)
- func HttpResponseErrorMsg(rw http.ResponseWriter, statusCode int, errMsg string)
- func HttpResponseOKWithBody(rw http.ResponseWriter, obj interface{})
- func HttpResponseStatus(rw http.ResponseWriter, statusCode int)
- func Now() string
- func PodNamespace() string
- func UnzipSupportBundle(bundleZipFile, destination string) (err error)
- func WriteStdout(msg string)
- type ErrorResponse
- type Prometheus
Constants ¶
View Source
const PrometheusPort = 9090
Variables ¶
This section is empty.
Functions ¶
func EnvGetBool ¶
func HttpGetDispositionFilename ¶
HttpGetDispositionFilename parses value of "Content-Disposition" header e.g., extract "abc.zip" from "attachment; filename=abc.zip"
func HttpResponseError ¶
func HttpResponseError(rw http.ResponseWriter, statusCode int, err error)
func HttpResponseErrorMsg ¶
func HttpResponseErrorMsg(rw http.ResponseWriter, statusCode int, errMsg string)
func HttpResponseOKWithBody ¶
func HttpResponseOKWithBody(rw http.ResponseWriter, obj interface{})
func HttpResponseStatus ¶
func HttpResponseStatus(rw http.ResponseWriter, statusCode int)
func UnzipSupportBundle ¶ added in v0.0.9
UnzipSupportBundle is a helper method to make it easier to unzip the contents of the sample support bundle for tests
func WriteStdout ¶
func WriteStdout(msg string)
Types ¶
type ErrorResponse ¶ added in v0.0.38
type ErrorResponse struct { // Errors happened during request. Errors []string `json:"errors,omitempty"` }
type Prometheus ¶ added in v0.0.40
type Prometheus struct {
// contains filtered or unexported fields
}
func NewPrometheus ¶ added in v0.0.40
func NewPrometheus(host string) (*Prometheus, error)
Click to show internal directories.
Click to hide internal directories.