Skip to content

Commit

Permalink
Added doc.go files to the consumer package and subpackages (#3270)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
eddyleelin authored May 24, 2021
1 parent 22df2ec commit ffc56e0
Show file tree
Hide file tree
Showing 9 changed files with 90 additions and 5 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
- Remove unused logstest package (#3222)
- Introduce `AppSettings` instead of `Parameters` (#3163)

## 💡 Enhancements 💡

- Add `doc.go` files to the consumer package and its subpackages (#3270)

## v0.27.0 Beta

## 🛑 Breaking changes 🛑
Expand Down
1 change: 0 additions & 1 deletion consumer/consumer.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.

// Package consumer contains interfaces that receive and process consumerdata.
package consumer

import (
Expand Down
18 changes: 18 additions & 0 deletions consumer/consumererror/doc.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// Copyright The OpenTelemetry Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// Package consumererror provides wrappers to easily classify errors. This allows
// appropriate action by error handlers without the need to know each individual
// error type/instance.
package consumererror
3 changes: 0 additions & 3 deletions consumer/consumererror/permanent.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.

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

import "errors"
Expand Down
17 changes: 17 additions & 0 deletions consumer/consumerhelper/doc.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// Copyright The OpenTelemetry Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

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

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

// Package consumer contains interfaces that receive and process consumerdata.
package consumer
2 changes: 1 addition & 1 deletion consumer/pdata/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
// protocol. Note that the underlying data structure is kept private so that in the
// future we are free to make changes to it to make more optimal.
//
// Most of internal data structures must be created via New* functions. Zero-initialized
// Most of the internal data structures must be created via New* functions. Zero-initialized
// structures in most cases are not valid (read comments for each struct to know if it
// is the case). This is a slight deviation from idiomatic Go to avoid unnecessary
// pointer checks in dozens of functions which assume the invariant that "orig" member
Expand Down
17 changes: 17 additions & 0 deletions consumer/simple/doc.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// Copyright The OpenTelemetry Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// Package simple facilitates building pdata.Metrics in receivers in an
// easier and more fluent way than using pdata.Metrics directly.
package simple

0 comments on commit ffc56e0

Please sign in to comment.