1
0
mirror of https://github.com/redis/go-redis.git synced 2025-07-31 05:04:23 +03:00

Change function type name

Change CancelProviderFunc to UnsubscribeFunc
This commit is contained in:
Nedyalko Dyakov
2025-04-16 12:12:53 +03:00
parent 40a89c56cc
commit d0a8c76d84
2 changed files with 5 additions and 4 deletions

View File

@ -10,12 +10,12 @@ type StreamingCredentialsProvider interface {
// It returns the current credentials, a cancel function to unsubscribe from the provider,
// and an error if any.
// TODO(ndyakov): Should we add context to the Subscribe method?
Subscribe(listener CredentialsListener) (Credentials, CancelProviderFunc, error)
Subscribe(listener CredentialsListener) (Credentials, UnsubscribeFunc, error)
}
// CancelProviderFunc is a function that is used to cancel the subscription to the credentials provider.
// UnsubscribeFunc is a function that is used to cancel the subscription to the credentials provider.
// It is used to unsubscribe from the provider when the credentials are no longer needed.
type CancelProviderFunc func() error
type UnsubscribeFunc func() error
// CredentialsListener is an interface that defines the methods for a credentials listener.
// It is used to receive updates when the credentials change.