MCPcopy
hub / github.com/segmentio/kafka-go / Mechanism

Struct Mechanism

sasl/aws_msk_iam_v2/msk_iam.go:38–49  ·  view source on GitHub ↗

Mechanism implements sasl.Mechanism for the AWS_MSK_IAM mechanism, based on the official java implementation: https://github.com/aws/aws-msk-iam-auth

Source from the content-addressed store, hash-verified

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
38type 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
51func (m *Mechanism) Name() string {
52 return "AWS_MSK_IAM"

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected