Documentation
¶
Index ¶
- func CloseBodyReader(ctx context.Context, bodyReader io.ReadCloser)
- func ContextWithIps(ctx context.Context, request *http.Request) context.Context
- func DefaultHttpTransport() *http.Transport
- func GetCustomCAPool(caFilePath string) (*x509.CertPool, error)
- func IpsFromContext(ctx context.Context) mapset.Set[string]
- func Map[T any, V any](a <-chan T, f func(T) V) chan V
- func MatchWildcards(pattern string, value string) bool
- func WildcardToRegex(pattern string) string
- type Atomic
- type BaseLifecycle
- type CMap
- func (mp *CMap[K, V]) CompareAndSwap(key K, old V, new V) bool
- func (mp *CMap[K, V]) Delete(key K)
- func (mp *CMap[K, V]) Load(key K) (V, bool)
- func (mp *CMap[K, V]) LoadAndDelete(key K) (V, bool)
- func (mp *CMap[K, V]) LoadOrStore(key K, val V) (V, bool)
- func (mp *CMap[K, V]) Range(f func(key K, val V) bool)
- func (mp *CMap[K, V]) Store(key K, val V)
- type Lifecycle
- type Subscription
- type SubscriptionManager
- func (sm *SubscriptionManager[T]) Publish(event T)
- func (sm *SubscriptionManager[T]) Subscribe(name string) *Subscription[T]
- func (sm *SubscriptionManager[T]) SubscribeWithInitialState(name string, size int, initialState T) *Subscription[T]
- func (sm *SubscriptionManager[T]) SubscribeWithSize(name string, size int) *Subscription[T]
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CloseBodyReader ¶
func CloseBodyReader(ctx context.Context, bodyReader io.ReadCloser)
func ContextWithIps ¶
func DefaultHttpTransport ¶
func MatchWildcards ¶
func WildcardToRegex ¶
Types ¶
type Atomic ¶
type Atomic[T any] struct { // contains filtered or unexported fields }
func (*Atomic[T]) CompareAndSwap ¶
type BaseLifecycle ¶
type BaseLifecycle struct {
// contains filtered or unexported fields
}
func NewBaseLifecycle ¶
func NewBaseLifecycle(name string, parentCtx context.Context) *BaseLifecycle
func (*BaseLifecycle) GetParentContext ¶
func (l *BaseLifecycle) GetParentContext() context.Context
func (*BaseLifecycle) Running ¶
func (l *BaseLifecycle) Running() bool
func (*BaseLifecycle) Stop ¶
func (l *BaseLifecycle) Stop()
type CMap ¶
func (*CMap[K, V]) CompareAndSwap ¶
func (*CMap[K, V]) LoadAndDelete ¶
func (*CMap[K, V]) LoadOrStore ¶
type Subscription ¶
type Subscription[T any] struct { Events chan T // contains filtered or unexported fields }
func (*Subscription[T]) Unsubscribe ¶
func (s *Subscription[T]) Unsubscribe()
type SubscriptionManager ¶
type SubscriptionManager[T any] struct { // contains filtered or unexported fields }
func NewSubscriptionManager ¶
func NewSubscriptionManager[T any](name string) *SubscriptionManager[T]
func (*SubscriptionManager[T]) Publish ¶
func (sm *SubscriptionManager[T]) Publish(event T)
func (*SubscriptionManager[T]) Subscribe ¶
func (sm *SubscriptionManager[T]) Subscribe(name string) *Subscription[T]
func (*SubscriptionManager[T]) SubscribeWithInitialState ¶
func (sm *SubscriptionManager[T]) SubscribeWithInitialState(name string, size int, initialState T) *Subscription[T]
func (*SubscriptionManager[T]) SubscribeWithSize ¶
func (sm *SubscriptionManager[T]) SubscribeWithSize(name string, size int) *Subscription[T]
Click to show internal directories.
Click to hide internal directories.