diff --git a/.chloggen/confighttp-remove-deprecated-funcs.yaml b/.chloggen/confighttp-remove-deprecated-funcs.yaml new file mode 100644 index 00000000000..796df0362a1 --- /dev/null +++ b/.chloggen/confighttp-remove-deprecated-funcs.yaml @@ -0,0 +1,25 @@ +# Use this changelog template to create an entry for release notes. + +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: breaking + +# The name of the component, or a single word describing the area of concern, (e.g. otlpreceiver) +component: confighttp + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Removes deprecated functions `ToClientContext`, `ToListenerContext`, and `ToServerContext`. + +# One or more tracking issues or pull requests related to the change +issues: [10138] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: + +# Optional: The change log or logs in which this entry should be included. +# e.g. '[user]' or '[user, api]' +# Include 'user' if the change is relevant to end users. +# Include 'api' if there is a change to a library API. +# Default: '[user]' +change_logs: [api] diff --git a/config/confighttp/confighttp.go b/config/confighttp/confighttp.go index 303075571db..b210fa0dd8d 100644 --- a/config/confighttp/confighttp.go +++ b/config/confighttp/confighttp.go @@ -233,11 +233,6 @@ func (hcs *ClientConfig) ToClient(ctx context.Context, host component.Host, sett }, nil } -// Deprecated: [v0.99.0] Use ToClient instead. -func (hcs *ClientConfig) ToClientContext(ctx context.Context, host component.Host, settings component.TelemetrySettings) (*http.Client, error) { - return hcs.ToClient(ctx, host, settings) -} - // Custom RoundTripper that adds headers. type headerRoundTripper struct { transport http.RoundTripper @@ -286,11 +281,6 @@ type ServerConfig struct { ResponseHeaders map[string]configopaque.String `mapstructure:"response_headers"` } -// Deprecated: [v0.99.0] Use ToListener instead. -func (hss *ServerConfig) ToListenerContext(ctx context.Context) (net.Listener, error) { - return hss.ToListener(ctx) -} - // ToListener creates a net.Listener. func (hss *ServerConfig) ToListener(ctx context.Context) (net.Listener, error) { listener, err := net.Listen("tcp", hss.Endpoint) @@ -341,11 +331,6 @@ func WithDecoder(key string, dec func(body io.ReadCloser) (io.ReadCloser, error) } } -// Deprecated: [v0.99.0] Use ToServer instead. -func (hss *ServerConfig) ToServerContext(ctx context.Context, host component.Host, settings component.TelemetrySettings, handler http.Handler, opts ...ToServerOption) (*http.Server, error) { - return hss.ToServer(ctx, host, settings, handler, opts...) -} - // ToServer creates an http.Server from settings object. func (hss *ServerConfig) ToServer(_ context.Context, host component.Host, settings component.TelemetrySettings, handler http.Handler, opts ...ToServerOption) (*http.Server, error) { internal.WarnOnUnspecifiedHost(settings.Logger, hss.Endpoint)