Mechanism implements sasl.Mechanism for the AWS_MSK_IAM mechanism, based on the official java implementation: https://github.com/aws/aws-msk-iam-auth
| 36 | // Mechanism implements sasl.Mechanism for the AWS_MSK_IAM mechanism, based on the official java implementation: |
| 37 | // https://github.com/aws/aws-msk-iam-auth |
| 38 | type Mechanism struct { |
| 39 | // The sigv4.Signer of aws-sdk-go-v2 to use when signing the request. Required. |
| 40 | Signer *signer.Signer |
| 41 | // The aws.Config.Credentials or config.CredentialsProvider of aws-sdk-go-v2. Required. |
| 42 | Credentials aws.CredentialsProvider |
| 43 | // The region where the msk cluster is hosted, e.g. "us-east-1". Required. |
| 44 | Region string |
| 45 | // The time the request is planned for. Optional, defaults to time.Now() at time of authentication. |
| 46 | SignTime time.Time |
| 47 | // The duration for which the presigned request is active. Optional, defaults to 5 minutes. |
| 48 | Expiry time.Duration |
| 49 | } |
| 50 | |
| 51 | func (m *Mechanism) Name() string { |
| 52 | return "AWS_MSK_IAM" |
nothing calls this directly
no outgoing calls
no test coverage detected