AccessTokenProvider is the interface that encapsulates how implementors can generate access tokens for Kafka broker authentication.
| 104 | // AccessTokenProvider is the interface that encapsulates how implementors |
| 105 | // can generate access tokens for Kafka broker authentication. |
| 106 | type 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. |
no outgoing calls
no test coverage detected