util

package
v0.0.0-...-4f441f0 Latest Latest
Warning

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

Go to latest
Published: May 5, 2021 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetLogger deprecated

func GetLogger() *zap.SugaredLogger

Deprecated: instead calling this method inject logger from wire

func IsErrNoRows

func IsErrNoRows(err error) bool

func NewHttpClient

func NewHttpClient() *http.Client

func NewSugardLogger

func NewSugardLogger() *zap.SugaredLogger

Types

type ApiError

type ApiError struct {
	HttpStatusCode    int         `json:"-"`
	Code              string      `json:"code,omitempty"`
	InternalMessage   string      `json:"internalMessage,omitempty"`
	UserMessage       interface{} `json:"userMessage,omitempty"`
	UserDetailMessage string      `json:"userDetailMessage,omitempty"`
}

func (*ApiError) Error

func (e *ApiError) Error() string

func (*ApiError) ErrorfInternal

func (e *ApiError) ErrorfInternal(format string, a ...interface{}) error

default internal will be set

func (ApiError) ErrorfUser

func (e ApiError) ErrorfUser(format string, a ...interface{}) error

default telemetry message will be set

type Config

type Config struct {
}

type PodLoggingController

type PodLoggingController struct {
	// contains filtered or unexported fields
}

func NewInformerConnection

func NewInformerConnection(cfg *Config, logger *zap.SugaredLogger) (*PodLoggingController, error)

func NewPodLoggingController

func NewPodLoggingController(informerFactory informers.SharedInformerFactory) *PodLoggingController

func (*PodLoggingController) Run

func (c *PodLoggingController) Run(stopCh chan struct{}) error

Run starts shared informers and waits for the shared informer cache to synchronize.

type SentryConfig

type SentryConfig struct {
	DSN           string `env:"DSN" envDefault:"https://0e57adc987494c3f99c56e8287475c20@sentry.io/1887839"`
	SentryEnv     string `env:"SENTRY_ENV" envDefault:"Staging"`
	SentryEnabled bool   `env:"SENTRY_ENABLED" envDefault:"false"`
}

Jump to

Keyboard shortcuts

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