Documentation
¶
Index ¶
- Constants
- func IsHTTPErrorWithStatus(err error, status int) bool
- func ListenAndServeContext(ctx context.Context, server *http.Server) error
- func RHandleFunc(fn func(http.ResponseWriter, *http.Request, httprouter.Params) error) httprouter.Handle
- func ResolveParameter(c *cli.Context, src ParameterSource, name string) (string, error)
- func SetUpLogger(logLevel string, w io.Writer) *slog.Logger
- func UnmarshalFile(path string, o interface{}) error
- func UnmarshalHTTPResource(resURL string, o interface{}) error
- type HTTPError
- type HealthServer
- type LazySSM
- type ParameterSource
- type ReadyFunc
- type ReadyResult
Constants ¶
View Source
const ( LogKeyLogLevel = "log_level" LogKeyError = "err" LogKeyCountMetric = "count_metric" LogKeyDocumentUUID = "document_uuid" LogKeyTransaction = "transaction" LogKeyOCSource = "oc_source" LogKeyOCVersion = "oc_version" LogKeyOCEvent = "oc_event" LogKeyChannel = "channel" LogKeyMessage = "message" LogKeyDelay = "delay" LogKeyBucket = "bucket" LogKeyObjectKey = "object_key" LogKeyComponent = "component" LogKeyCount = "count" LogKeyEventID = "event_id" LogKeyEventType = "event_type" LogKeyJobLock = "job_lock" LogKeyJobLockID = "job_lock_id" LogKeyState = "state" LogKeyIndex = "index" )
Log attribute keys used throughout the application.
Variables ¶
This section is empty.
Functions ¶
func IsHTTPErrorWithStatus ¶
func ListenAndServeContext ¶
func RHandleFunc ¶
func RHandleFunc( fn func(http.ResponseWriter, *http.Request, httprouter.Params) error, ) httprouter.Handle
func ResolveParameter ¶
func SetUpLogger ¶
SetUpLogger creates a default JSON logger and sets it as the global logger.
func UnmarshalFile ¶
func UnmarshalHTTPResource ¶
Types ¶
type HealthServer ¶
type HealthServer struct {
// contains filtered or unexported fields
}
HealthServer exposes health endpoints, metrics, and PPROF endpoints.
func NewHealthServer ¶
func NewHealthServer(addr string) *HealthServer
func (*HealthServer) AddReadyFunction ¶
func (s *HealthServer) AddReadyFunction(name string, fn ReadyFunc)
func (*HealthServer) Close ¶
func (s *HealthServer) Close() error
func (*HealthServer) ListenAndServe ¶
func (s *HealthServer) ListenAndServe(ctx context.Context) error
type LazySSM ¶
type LazySSM struct {
// contains filtered or unexported fields
}
func NewLazySSM ¶
func NewLazySSM() *LazySSM
type ParameterSource ¶
type ParameterSource interface {
GetParameterValue(ctx context.Context, name string) (string, error)
}
func GetParameterSource ¶
func GetParameterSource(name string) (ParameterSource, error)
type ReadyResult ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.