Skip to content

Commit ffc56e0

Browse files
authored
Added doc.go files to the consumer package and subpackages (#3270)
* Added consumertest doc.go * Added consumerhelper doc.go * Fixed typo in consumerhelper doc.go * Moved consumererror doc to doc.go * Added consumer doc.go * Added newline to end of doc.go * Added simple doc.go * Fixed typo in pdata doc.go * Update CHANGELOG.md
1 parent 22df2ec commit ffc56e0

File tree

9 files changed

+90
-5
lines changed

9 files changed

+90
-5
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@
77
- Remove unused logstest package (#3222)
88
- Introduce `AppSettings` instead of `Parameters` (#3163)
99

10+
## 💡 Enhancements 💡
11+
12+
- Add `doc.go` files to the consumer package and its subpackages (#3270)
13+
1014
## v0.27.0 Beta
1115

1216
## 🛑 Breaking changes 🛑

consumer/consumer.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
// Package consumer contains interfaces that receive and process consumerdata.
1615
package consumer
1716

1817
import (

consumer/consumererror/doc.go

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
// Copyright The OpenTelemetry Authors
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
// Package consumererror provides wrappers to easily classify errors. This allows
16+
// appropriate action by error handlers without the need to know each individual
17+
// error type/instance.
18+
package consumererror

consumer/consumererror/permanent.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
// Package consumererror provides wrappers to easily classify errors. This allows
16-
// appropriate action by error handlers without the need to know each individual
17-
// error type/instance.
1815
package consumererror
1916

2017
import "errors"

consumer/consumerhelper/doc.go

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// Copyright The OpenTelemetry Authors
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
// Package consumerhelper defines types and functions used to create consumer
16+
// Logs, Metrics, and Traces.
17+
package consumerhelper

consumer/consumertest/doc.go

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// Copyright The OpenTelemetry Authors
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
// Package consumertest defines types and functions used to help test packages
16+
// implementing the consumer package interfaces.
17+
package consumertest

consumer/doc.go

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// Copyright The OpenTelemetry Authors
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
// Package consumer contains interfaces that receive and process consumerdata.
16+
package consumer

consumer/pdata/doc.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
// protocol. Note that the underlying data structure is kept private so that in the
2323
// future we are free to make changes to it to make more optimal.
2424
//
25-
// Most of internal data structures must be created via New* functions. Zero-initialized
25+
// Most of the internal data structures must be created via New* functions. Zero-initialized
2626
// structures in most cases are not valid (read comments for each struct to know if it
2727
// is the case). This is a slight deviation from idiomatic Go to avoid unnecessary
2828
// pointer checks in dozens of functions which assume the invariant that "orig" member

consumer/simple/doc.go

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// Copyright The OpenTelemetry Authors
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
// Package simple facilitates building pdata.Metrics in receivers in an
16+
// easier and more fluent way than using pdata.Metrics directly.
17+
package simple

0 commit comments

Comments
 (0)