mirror of
https://github.com/moby/moby.git
synced 2026-08-13 17:06:44 +00:00
vendor: github.com/aws/smithy-go v1.23.2
full diff: https://github.com/aws/smithy-go/compare/v1.23.1...v1.23.2 Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
10
vendor/github.com/aws/smithy-go/CHANGELOG.md
generated
vendored
10
vendor/github.com/aws/smithy-go/CHANGELOG.md
generated
vendored
@@ -1,3 +1,13 @@
|
||||
# Release (2025-11-03)
|
||||
|
||||
## General Highlights
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
## Module Highlights
|
||||
* `github.com/aws/smithy-go`: v1.23.2
|
||||
* **Bug Fix**: Adjust the initial sizes of each middleware phase to avoid some unnecessary reallocation.
|
||||
* **Bug Fix**: Avoid unnecessary allocation overhead from the metrics system when not in use.
|
||||
|
||||
# Release (2025-10-15)
|
||||
|
||||
## General Highlights
|
||||
|
||||
2
vendor/github.com/aws/smithy-go/go_module_metadata.go
generated
vendored
2
vendor/github.com/aws/smithy-go/go_module_metadata.go
generated
vendored
@@ -3,4 +3,4 @@
|
||||
package smithy
|
||||
|
||||
// goModuleVersion is the tagged release for this module
|
||||
const goModuleVersion = "1.23.1"
|
||||
const goModuleVersion = "1.23.2"
|
||||
|
||||
93
vendor/github.com/aws/smithy-go/metrics/nop.go
generated
vendored
93
vendor/github.com/aws/smithy-go/metrics/nop.go
generated
vendored
@@ -9,54 +9,82 @@ var _ MeterProvider = (*NopMeterProvider)(nil)
|
||||
|
||||
// Meter returns a meter which creates no-op instruments.
|
||||
func (NopMeterProvider) Meter(string, ...MeterOption) Meter {
|
||||
return nopMeter{}
|
||||
return NopMeter{}
|
||||
}
|
||||
|
||||
type nopMeter struct{}
|
||||
// NopMeter creates no-op instruments.
|
||||
type NopMeter struct{}
|
||||
|
||||
var _ Meter = (*nopMeter)(nil)
|
||||
var _ Meter = (*NopMeter)(nil)
|
||||
|
||||
func (nopMeter) Int64Counter(string, ...InstrumentOption) (Int64Counter, error) {
|
||||
return nopInstrument[int64]{}, nil
|
||||
// Int64Counter creates a no-op instrument.
|
||||
func (NopMeter) Int64Counter(string, ...InstrumentOption) (Int64Counter, error) {
|
||||
return nopInstrumentInt64, nil
|
||||
}
|
||||
func (nopMeter) Int64UpDownCounter(string, ...InstrumentOption) (Int64UpDownCounter, error) {
|
||||
return nopInstrument[int64]{}, nil
|
||||
|
||||
// Int64UpDownCounter creates a no-op instrument.
|
||||
func (NopMeter) Int64UpDownCounter(string, ...InstrumentOption) (Int64UpDownCounter, error) {
|
||||
return nopInstrumentInt64, nil
|
||||
}
|
||||
func (nopMeter) Int64Gauge(string, ...InstrumentOption) (Int64Gauge, error) {
|
||||
return nopInstrument[int64]{}, nil
|
||||
|
||||
// Int64Gauge creates a no-op instrument.
|
||||
func (NopMeter) Int64Gauge(string, ...InstrumentOption) (Int64Gauge, error) {
|
||||
return nopInstrumentInt64, nil
|
||||
}
|
||||
func (nopMeter) Int64Histogram(string, ...InstrumentOption) (Int64Histogram, error) {
|
||||
return nopInstrument[int64]{}, nil
|
||||
|
||||
// Int64Histogram creates a no-op instrument.
|
||||
func (NopMeter) Int64Histogram(string, ...InstrumentOption) (Int64Histogram, error) {
|
||||
return nopInstrumentInt64, nil
|
||||
}
|
||||
func (nopMeter) Int64AsyncCounter(string, Int64Callback, ...InstrumentOption) (AsyncInstrument, error) {
|
||||
return nopInstrument[int64]{}, nil
|
||||
|
||||
// Int64AsyncCounter creates a no-op instrument.
|
||||
func (NopMeter) Int64AsyncCounter(string, Int64Callback, ...InstrumentOption) (AsyncInstrument, error) {
|
||||
return nopInstrumentInt64, nil
|
||||
}
|
||||
func (nopMeter) Int64AsyncUpDownCounter(string, Int64Callback, ...InstrumentOption) (AsyncInstrument, error) {
|
||||
return nopInstrument[int64]{}, nil
|
||||
|
||||
// Int64AsyncUpDownCounter creates a no-op instrument.
|
||||
func (NopMeter) Int64AsyncUpDownCounter(string, Int64Callback, ...InstrumentOption) (AsyncInstrument, error) {
|
||||
return nopInstrumentInt64, nil
|
||||
}
|
||||
func (nopMeter) Int64AsyncGauge(string, Int64Callback, ...InstrumentOption) (AsyncInstrument, error) {
|
||||
return nopInstrument[int64]{}, nil
|
||||
|
||||
// Int64AsyncGauge creates a no-op instrument.
|
||||
func (NopMeter) Int64AsyncGauge(string, Int64Callback, ...InstrumentOption) (AsyncInstrument, error) {
|
||||
return nopInstrumentInt64, nil
|
||||
}
|
||||
func (nopMeter) Float64Counter(string, ...InstrumentOption) (Float64Counter, error) {
|
||||
return nopInstrument[float64]{}, nil
|
||||
|
||||
// Float64Counter creates a no-op instrument.
|
||||
func (NopMeter) Float64Counter(string, ...InstrumentOption) (Float64Counter, error) {
|
||||
return nopInstrumentFloat64, nil
|
||||
}
|
||||
func (nopMeter) Float64UpDownCounter(string, ...InstrumentOption) (Float64UpDownCounter, error) {
|
||||
return nopInstrument[float64]{}, nil
|
||||
|
||||
// Float64UpDownCounter creates a no-op instrument.
|
||||
func (NopMeter) Float64UpDownCounter(string, ...InstrumentOption) (Float64UpDownCounter, error) {
|
||||
return nopInstrumentFloat64, nil
|
||||
}
|
||||
func (nopMeter) Float64Gauge(string, ...InstrumentOption) (Float64Gauge, error) {
|
||||
return nopInstrument[float64]{}, nil
|
||||
|
||||
// Float64Gauge creates a no-op instrument.
|
||||
func (NopMeter) Float64Gauge(string, ...InstrumentOption) (Float64Gauge, error) {
|
||||
return nopInstrumentFloat64, nil
|
||||
}
|
||||
func (nopMeter) Float64Histogram(string, ...InstrumentOption) (Float64Histogram, error) {
|
||||
return nopInstrument[float64]{}, nil
|
||||
|
||||
// Float64Histogram creates a no-op instrument.
|
||||
func (NopMeter) Float64Histogram(string, ...InstrumentOption) (Float64Histogram, error) {
|
||||
return nopInstrumentFloat64, nil
|
||||
}
|
||||
func (nopMeter) Float64AsyncCounter(string, Float64Callback, ...InstrumentOption) (AsyncInstrument, error) {
|
||||
return nopInstrument[float64]{}, nil
|
||||
|
||||
// Float64AsyncCounter creates a no-op instrument.
|
||||
func (NopMeter) Float64AsyncCounter(string, Float64Callback, ...InstrumentOption) (AsyncInstrument, error) {
|
||||
return nopInstrumentFloat64, nil
|
||||
}
|
||||
func (nopMeter) Float64AsyncUpDownCounter(string, Float64Callback, ...InstrumentOption) (AsyncInstrument, error) {
|
||||
return nopInstrument[float64]{}, nil
|
||||
|
||||
// Float64AsyncUpDownCounter creates a no-op instrument.
|
||||
func (NopMeter) Float64AsyncUpDownCounter(string, Float64Callback, ...InstrumentOption) (AsyncInstrument, error) {
|
||||
return nopInstrumentFloat64, nil
|
||||
}
|
||||
func (nopMeter) Float64AsyncGauge(string, Float64Callback, ...InstrumentOption) (AsyncInstrument, error) {
|
||||
return nopInstrument[float64]{}, nil
|
||||
|
||||
// Float64AsyncGauge creates a no-op instrument.
|
||||
func (NopMeter) Float64AsyncGauge(string, Float64Callback, ...InstrumentOption) (AsyncInstrument, error) {
|
||||
return nopInstrumentFloat64, nil
|
||||
}
|
||||
|
||||
type nopInstrument[N any] struct{}
|
||||
@@ -65,3 +93,6 @@ func (nopInstrument[N]) Add(context.Context, N, ...RecordMetricOption) {}
|
||||
func (nopInstrument[N]) Sample(context.Context, N, ...RecordMetricOption) {}
|
||||
func (nopInstrument[N]) Record(context.Context, N, ...RecordMetricOption) {}
|
||||
func (nopInstrument[_]) Stop() {}
|
||||
|
||||
var nopInstrumentInt64 = nopInstrument[int64]{}
|
||||
var nopInstrumentFloat64 = nopInstrument[float64]{}
|
||||
|
||||
14
vendor/github.com/aws/smithy-go/middleware/ordered_group.go
generated
vendored
14
vendor/github.com/aws/smithy-go/middleware/ordered_group.go
generated
vendored
@@ -23,12 +23,14 @@ type orderedIDs struct {
|
||||
items map[string]ider
|
||||
}
|
||||
|
||||
const baseOrderedItems = 5
|
||||
// selected based on the general upper bound of # of middlewares in each step
|
||||
// in the downstream aws-sdk-go-v2
|
||||
const baseOrderedItems = 8
|
||||
|
||||
func newOrderedIDs() *orderedIDs {
|
||||
func newOrderedIDs(cap int) *orderedIDs {
|
||||
return &orderedIDs{
|
||||
order: newRelativeOrder(),
|
||||
items: make(map[string]ider, baseOrderedItems),
|
||||
order: newRelativeOrder(cap),
|
||||
items: make(map[string]ider, cap),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -141,9 +143,9 @@ type relativeOrder struct {
|
||||
order []string
|
||||
}
|
||||
|
||||
func newRelativeOrder() *relativeOrder {
|
||||
func newRelativeOrder(cap int) *relativeOrder {
|
||||
return &relativeOrder{
|
||||
order: make([]string, 0, baseOrderedItems),
|
||||
order: make([]string, 0, cap),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
2
vendor/github.com/aws/smithy-go/middleware/step_build.go
generated
vendored
2
vendor/github.com/aws/smithy-go/middleware/step_build.go
generated
vendored
@@ -79,7 +79,7 @@ type BuildStep struct {
|
||||
// initialization added to it.
|
||||
func NewBuildStep() *BuildStep {
|
||||
return &BuildStep{
|
||||
ids: newOrderedIDs(),
|
||||
ids: newOrderedIDs(baseOrderedItems),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
3
vendor/github.com/aws/smithy-go/middleware/step_deserialize.go
generated
vendored
3
vendor/github.com/aws/smithy-go/middleware/step_deserialize.go
generated
vendored
@@ -85,7 +85,8 @@ type DeserializeStep struct {
|
||||
// initialization added to it.
|
||||
func NewDeserializeStep() *DeserializeStep {
|
||||
return &DeserializeStep{
|
||||
ids: newOrderedIDs(),
|
||||
// downstream SDK typically has larger Deserialize step
|
||||
ids: newOrderedIDs(baseOrderedItems * 2),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
3
vendor/github.com/aws/smithy-go/middleware/step_finalize.go
generated
vendored
3
vendor/github.com/aws/smithy-go/middleware/step_finalize.go
generated
vendored
@@ -79,7 +79,8 @@ type FinalizeStep struct {
|
||||
// initialization added to it.
|
||||
func NewFinalizeStep() *FinalizeStep {
|
||||
return &FinalizeStep{
|
||||
ids: newOrderedIDs(),
|
||||
// downstream SDK typically has larger Finalize step
|
||||
ids: newOrderedIDs(baseOrderedItems * 2),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
2
vendor/github.com/aws/smithy-go/middleware/step_initialize.go
generated
vendored
2
vendor/github.com/aws/smithy-go/middleware/step_initialize.go
generated
vendored
@@ -79,7 +79,7 @@ type InitializeStep struct {
|
||||
// initialization added to it.
|
||||
func NewInitializeStep() *InitializeStep {
|
||||
return &InitializeStep{
|
||||
ids: newOrderedIDs(),
|
||||
ids: newOrderedIDs(baseOrderedItems),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
2
vendor/github.com/aws/smithy-go/middleware/step_serialize.go
generated
vendored
2
vendor/github.com/aws/smithy-go/middleware/step_serialize.go
generated
vendored
@@ -85,7 +85,7 @@ type SerializeStep struct {
|
||||
// serialize the input parameters into.
|
||||
func NewSerializeStep(newRequest func() interface{}) *SerializeStep {
|
||||
return &SerializeStep{
|
||||
ids: newOrderedIDs(),
|
||||
ids: newOrderedIDs(baseOrderedItems),
|
||||
newRequest: newRequest,
|
||||
}
|
||||
}
|
||||
|
||||
6
vendor/github.com/aws/smithy-go/transport/http/metrics.go
generated
vendored
6
vendor/github.com/aws/smithy-go/transport/http/metrics.go
generated
vendored
@@ -17,6 +17,12 @@ var now = time.Now
|
||||
func withMetrics(parent context.Context, client ClientDo, meter metrics.Meter) (
|
||||
context.Context, ClientDo, error,
|
||||
) {
|
||||
// WithClientTrace is an expensive operation - avoid calling it if we're
|
||||
// not actually using a metrics sink.
|
||||
if _, ok := meter.(metrics.NopMeter); ok {
|
||||
return parent, client, nil
|
||||
}
|
||||
|
||||
hm, err := newHTTPMetrics(meter)
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
|
||||
Reference in New Issue
Block a user