Skip to content

Commit

Permalink
[receiver/k8sobjects] Do not export (#26306)
Browse files Browse the repository at this point in the history
**Link to tracking Issue:**
#26304
  • Loading branch information
atoulme authored Aug 30, 2023
1 parent 3ec9d22 commit be12485
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 3 deletions.
27 changes: 27 additions & 0 deletions .chloggen/k8sobjects_checkapi.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# 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. filelogreceiver)
component: k8sobjectsreceiver

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Do not export the function `NewTicker`

# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
issues: [26304]

# (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:

# If your change doesn't affect end users or the exported elements of any package,
# you should instead start your pull request title with [chore] or use the "Skip Changelog" label.
# 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]
1 change: 0 additions & 1 deletion cmd/checkapi/allowlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ receiver/dockerstatsreceiver
receiver/fluentforwardreceiver
receiver/jaegerreceiver
receiver/journaldreceiver
receiver/k8sobjectsreceiver
receiver/kafkareceiver
receiver/mongodbatlasreceiver
receiver/mongodbreceiver
Expand Down
4 changes: 2 additions & 2 deletions receiver/k8sobjectsreceiver/receiver.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ func (kr *k8sobjectsreceiver) startPull(ctx context.Context, config *K8sObjectsC
kr.mu.Lock()
kr.stopperChanList = append(kr.stopperChanList, stopperChan)
kr.mu.Unlock()
ticker := NewTicker(config.Interval)
ticker := newTicker(config.Interval)
listOption := metav1.ListOptions{
FieldSelector: config.FieldSelector,
LabelSelector: config.LabelSelector,
Expand Down Expand Up @@ -219,7 +219,7 @@ func getResourceVersion(ctx context.Context, config *K8sObjectsConfig, resource

// Start ticking immediately.
// Ref: https://stackoverflow.com/questions/32705582/how-to-get-time-tick-to-tick-immediately
func NewTicker(repeat time.Duration) *time.Ticker {
func newTicker(repeat time.Duration) *time.Ticker {
ticker := time.NewTicker(repeat)
oc := ticker.C
nc := make(chan time.Time, 1)
Expand Down

0 comments on commit be12485

Please sign in to comment.