Documentation ¶
Index ¶
- func CanRecover(errorList ...error) bool
- func CloseSilently(closable interface{ ... })
- func DefaultMiddleWare(logger *zap.Logger, fakeServiceName string, r *chi.Mux) error
- func DefaultTransport() *http.Transport
- func EnvironmentVariableNameFor(s string) string
- func EnvironmentVariablesAsMap(names ...string) (map[string]string, error)
- func HTTPClient() *http.Client
- func IgnoreError(f func() error)
- func NewRouter(serviceName string, logger *zap.Logger) (*chi.Mux, error)
- func Retry(backoff wait.Backoff, f func() error) error
- func RetryConditionally(retryBackoff wait.Backoff, f func() (bool, error)) error
- func RetryObjectUpdater(logger *zap.Logger, updater updater.ObjectUpdater, obj runtime.Object) error
- func ToRawExtension(obj interface{}) (*runtime.RawExtension, error)
- type ErrInvalidVariableName
- type ErrVariableNotFound
- type ErrorList
- type HTTPServer
- type JSONPatch
- type Operation
- type Patch
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CanRecover ¶
func CloseSilently ¶
func CloseSilently(closable interface{ Close() error })
useful in cases where you would write defer thing.Close to work around lint checks for unhandled errors
func DefaultMiddleWare ¶
DefaultMiddleWare builds an http handler with logging fakeServiceName feeds into laas and normally would be a micros service name, here it's a fake
func DefaultTransport ¶
func HTTPClient ¶
func IgnoreError ¶
func IgnoreError(f func() error)
useful in cases where you want to document that you explicitly do not want to handle errors
func RetryConditionally ¶
RetryConditionally keeps retrying as long as f() returns true, indicating that it is retriable.
func RetryObjectUpdater ¶
func RetryObjectUpdater(logger *zap.Logger, updater updater.ObjectUpdater, obj runtime.Object) error
RetryObjectUpdater retries the objectupdater. It's hardcoded to use the retry.DefaultRetry from client-go as it's designed for the conflict scenario
func ToRawExtension ¶
func ToRawExtension(obj interface{}) (*runtime.RawExtension, error)
Types ¶
type ErrInvalidVariableName ¶
type ErrInvalidVariableName struct {
// contains filtered or unexported fields
}
func NewErrInvalidVariableName ¶
func NewErrInvalidVariableName(varName string) *ErrInvalidVariableName
func (*ErrInvalidVariableName) Error ¶
func (e *ErrInvalidVariableName) Error() string
type ErrVariableNotFound ¶
type ErrVariableNotFound struct { Similar string // contains filtered or unexported fields }
func NewErrVariableNotFound ¶
func NewErrVariableNotFound(varName string, similar string) *ErrVariableNotFound
func (*ErrVariableNotFound) Error ¶
func (e *ErrVariableNotFound) Error() string
type ErrorList ¶
type ErrorList struct {
ErrorList []error
}
func NewErrorList ¶
func (*ErrorList) AddErrorList ¶
func (*ErrorList) CanRecover ¶
type HTTPServer ¶
type HTTPServer struct {
// contains filtered or unexported fields
}
func NewHTTPServer ¶
func NewHTTPServer(serviceName string, logger *zap.Logger, config options.ServerConfig) (*HTTPServer, error)
func (*HTTPServer) GetRouter ¶
func (a *HTTPServer) GetRouter() *chi.Mux
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package auth contains types for working with non blank user names.
|
Package auth contains types for working with non blank user names. |
Package sets has auto-generated set types.
|
Package sets has auto-generated set types. |
Click to show internal directories.
Click to hide internal directories.