Documentation ¶
Overview ¶
Index ¶
- func CertSetup() (serverCert *tls.Certificate, err error)
- func ConcatSlices[T any](slices ...[]T) []T
- func FilterSlices[T any](filter func(T) bool, slices ...[]T) []T
- func MapSlices[I any, O any](fn func(I) O, slices ...[]I) []O
- func MaxString(s string, max int) string
- func Must2[T any](data T, err error) T
- func NewCloseSignal() <-chan os.Signal
- func NewReloadSignal() <-chan os.Signal
- func NewTLSServer(addr string, handler http.Handler, errorLog *log.Logger) *http.Server
- func Pointer[T interface{}](data T) *T
- type ContextLocker
- type Set
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CertSetup ¶ added in v0.0.2
func CertSetup() (serverCert *tls.Certificate, err error)
https://gist.github.com/shaneutt/5e1995295cff6721c89a71d13a71c251
func ConcatSlices ¶ added in v0.0.10
func ConcatSlices[T any](slices ...[]T) []T
func FilterSlices ¶ added in v0.0.12
func NewCloseSignal ¶
func NewReloadSignal ¶
func NewTLSServer ¶ added in v0.0.2
Types ¶
type ContextLocker ¶ added in v0.0.4
func ContextMutex ¶ added in v0.0.4
func ContextMutex() ContextLocker
type Set ¶ added in v0.0.6
type Set[K comparable] map[K]struct{}
func NewSetFromSlice ¶ added in v0.0.6
func NewSetFromSlice[K comparable](slices ...[]K) Set[K]
func NewSetFromSliceFn ¶ added in v0.0.9
func NewSetFromSliceFn[T any, K comparable](getKey func(T) (K, bool), slices ...[]T) Set[K]
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package singleflight provides a duplicate function call suppression mechanism.
|
Package singleflight provides a duplicate function call suppression mechanism. |
Click to show internal directories.
Click to hide internal directories.