util

package
v0.43.0 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const MaxDrainResponseBytes = 16 << 10

MaxDrainResponseBytes is the maximum number of bytes that transport implementations will read from response bodies when draining them.

Variables

This section is empty.

Functions

func EnvelopeIdentifier

func EnvelopeIdentifier(envelope *protocol.Envelope) string

EnvelopeIdentifier returns a human-readable identifier for the event to be used in log messages. Format: "<description> [<event-id>]".

func HandleHTTPResponse

func HandleHTTPResponse(response *http.Response, identifier string) bool

HandleHTTPResponse is a helper method that reads the HTTP response and handles debug output.

Types

type SyncMap

type SyncMap[K comparable, V any] struct {
	// contains filtered or unexported fields
}

func (*SyncMap[K, V]) Clear

func (s *SyncMap[K, V]) Clear()

func (*SyncMap[K, V]) CompareAndDelete

func (s *SyncMap[K, V]) CompareAndDelete(key K, value V)

func (*SyncMap[K, V]) Delete

func (s *SyncMap[K, V]) Delete(key K)

func (*SyncMap[K, V]) Load

func (s *SyncMap[K, V]) Load(key K) (V, bool)

func (*SyncMap[K, V]) LoadOrStore

func (s *SyncMap[K, V]) LoadOrStore(key K, value V) (V, bool)

func (*SyncMap[K, V]) Range

func (s *SyncMap[K, V]) Range(f func(key K, value V) bool)

func (*SyncMap[K, V]) Store

func (s *SyncMap[K, V]) Store(key K, value V)

Jump to

Keyboard shortcuts

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