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

Struct Mechanism

sasl/aws_msk_iam/msk_iam.go:35–44  ·  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

33// Mechanism implements sasl.Mechanism for the AWS_MSK_IAM mechanism, based on the official java implementation:
34// https://github.com/aws/aws-msk-iam-auth
35type Mechanism struct {
36 // The sigv4.Signer to use when signing the request. Required.
37 Signer *sigv4.Signer
38 // The region where the msk cluster is hosted, e.g. "us-east-1". Required.
39 Region string
40 // The time the request is planned for. Optional, defaults to time.Now() at time of authentication.
41 SignTime time.Time
42 // The duration for which the presigned request is active. Optional, defaults to 5 minutes.
43 Expiry time.Duration
44}
45
46func (m *Mechanism) Name() string {
47 return "AWS_MSK_IAM"

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected