Skip to content

Commit 063f5dd

Browse files
authored
[confighttp] Remove deprecated items (#9625)
**Description:** Removes deprecated items from `confighttp` **Link to tracking Issue:** Related to #6767
1 parent 31ccef9 commit 063f5dd

File tree

3 files changed

+27
-24
lines changed

3 files changed

+27
-24
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Use this changelog template to create an entry for release notes.
2+
3+
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
4+
change_type: breaking
5+
6+
# The name of the component, or a single word describing the area of concern, (e.g. otlpreceiver)
7+
component: confighttp
8+
9+
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
10+
note: Remove deprecated `HTTPClientSettings`, `NewDefaultHTTPClientSettings`, and `CORSSettings`.
11+
12+
# One or more tracking issues or pull requests related to the change
13+
issues: [9625]
14+
15+
# (Optional) One or more lines of additional information to render under the primary note.
16+
# These lines will be padded with 2 spaces and then inserted directly into the document.
17+
# Use pipe (|) for multiline entries.
18+
subtext:
19+
20+
# Optional: The change log or logs in which this entry should be included.
21+
# e.g. '[user]' or '[user, api]'
22+
# Include 'user' if the change is relevant to end users.
23+
# Include 'api' if there is a change to a library API.
24+
# Default: '[user]'
25+
change_logs: []

config/confighttp/confighttp.go

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,6 @@ import (
2929

3030
const headerContentEncoding = "Content-Encoding"
3131

32-
// HTTPClientSettings defines settings for creating an HTTP client.
33-
// Deprecated: [v0.94.0] Use ClientConfig instead
34-
type HTTPClientSettings = ClientConfig
35-
3632
// ClientConfig defines settings for creating an HTTP client.
3733
type ClientConfig struct {
3834
// The target URL to send data to (e.g.: http://some.url:9411/v1/traces).
@@ -103,15 +99,6 @@ type ClientConfig struct {
10399
HTTP2PingTimeout time.Duration `mapstructure:"http2_ping_timeout"`
104100
}
105101

106-
// NewDefaultHTTPClientSettings returns HTTPClientSettings type object with
107-
// the default values of 'MaxIdleConns' and 'IdleConnTimeout'.
108-
// Other config options are not added as they are initialized with 'zero value' by GoLang as default.
109-
// We encourage to use this function to create an object of HTTPClientSettings.
110-
// Deprecated: [v0.94.0] Use NewDefaultClientConfig instead
111-
func NewDefaultHTTPClientSettings() ClientConfig {
112-
return NewDefaultClientConfig()
113-
}
114-
115102
// NewDefaultClientConfig returns ClientConfig type object with
116103
// the default values of 'MaxIdleConns' and 'IdleConnTimeout'.
117104
// Other config options are not added as they are initialized with 'zero value' by GoLang as default.
@@ -263,10 +250,6 @@ func (interceptor *headerRoundTripper) RoundTrip(req *http.Request) (*http.Respo
263250
return interceptor.transport.RoundTrip(req)
264251
}
265252

266-
// HTTPServerSettings defines settings for creating an HTTP server.
267-
// Deprecated: [v0.94.0] Use ServerConfig instead
268-
type HTTPServerSettings = ServerConfig
269-
270253
// ServerConfig defines settings for creating an HTTP server.
271254
type ServerConfig struct {
272255
// Endpoint configures the listening address for the server.
@@ -419,11 +402,6 @@ func responseHeadersHandler(handler http.Handler, headers map[string]configopaqu
419402
})
420403
}
421404

422-
// CORSSettings configures a receiver for HTTP cross-origin resource sharing (CORS).
423-
// See the underlying https://github.com/rs/cors package for details.
424-
// Deprecated: [v0.94.0] Use CORSConfig instead
425-
type CORSSettings = CORSConfig
426-
427405
// CORSConfig configures a receiver for HTTP cross-origin resource sharing (CORS).
428406
// See the underlying https://github.com/rs/cors package for details.
429407
type CORSConfig struct {

config/confighttp/confighttp_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1008,7 +1008,7 @@ func verifyHeadersResp(t *testing.T, url string, expected map[string]configopaqu
10081008
}
10091009
}
10101010

1011-
func ExampleHTTPServerSettings() {
1011+
func ExampleServerConfig() {
10121012
settings := ServerConfig{
10131013
Endpoint: "localhost:443",
10141014
}
@@ -1087,7 +1087,7 @@ func TestHttpClientHostHeader(t *testing.T) {
10871087
}))
10881088
defer server.Close()
10891089
serverURL, _ := url.Parse(server.URL)
1090-
setting := HTTPClientSettings{
1090+
setting := ClientConfig{
10911091
Endpoint: serverURL.String(),
10921092
TLSSetting: configtls.TLSClientSetting{},
10931093
ReadBufferSize: 0,

0 commit comments

Comments
 (0)