Skip to content

Commit

Permalink
refactor(events): make private function
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielcorado committed Dec 24, 2024
1 parent bc76a1b commit 016d1e6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/events/auditlog.go
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,7 @@ func (l *AuditLog) StreamSessionEvents(ctx context.Context, sessionID session.ID
c := make(chan apievents.AuditEvent)

sessionStartCh := make(chan apievents.AuditEvent, 1)
if startCb, err := SessionStartCallbackFromContext(ctx); err == nil {
if startCb, err := sessionStartCallbackFromContext(ctx); err == nil {
go func() {
evt, ok := <-sessionStartCh
if !ok {
Expand Down Expand Up @@ -713,9 +713,9 @@ func ContextWithSessionStartCallback(ctx context.Context, cb SessionStartCallbac
return context.WithValue(ctx, sessionStartCallbackContextKey, cb)
}

// SessionStartCallbackFromContext returns the session start callback from
// sessionStartCallbackFromContext returns the session start callback from
// context.Context.
func SessionStartCallbackFromContext(ctx context.Context) (SessionStartCallback, error) {
func sessionStartCallbackFromContext(ctx context.Context) (SessionStartCallback, error) {
if ctx == nil {
return nil, trace.BadParameter("context is nil")
}
Expand Down

0 comments on commit 016d1e6

Please sign in to comment.