MCPcopy
hub / github.com/IBM/sarama / AccessTokenProvider

Interface AccessTokenProvider

broker.go:106–115  ·  broker.go::AccessTokenProvider

AccessTokenProvider is the interface that encapsulates how implementors can generate access tokens for Kafka broker authentication.

Source from the content-addressed store, hash-verified

104// AccessTokenProvider is the interface that encapsulates how implementors
105// can generate access tokens for Kafka broker authentication.
106type AccessTokenProvider interface {
107 // Token returns an access token. The implementation should ensure token
108 // reuse so that multiple calls at connect time do not create multiple
109 // tokens. The implementation should also periodically refresh the token in
110 // order to guarantee that each call returns an unexpired token. This
111 // method should not block indefinitely--a timeout error should be returned
112 // after a short period of inactivity so that the broker connection logic
113 // can log debugging information and retry.
114 Token() (*AccessToken, error)
115}
116
117// SCRAMClient is a an interface to a SCRAM
118// client implementation.

Callers 1

Implementers 2

DummyTokenProviderconfig_test.go
TokenProviderbroker_test.go

Calls

no outgoing calls

Tested by

no test coverage detected