vault

package
v0.8.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 22, 2022 License: MPL-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	VaultClient *api.Client
	VaultConfig *api.Config
	// contains filtered or unexported fields
}

Client holds api.Client and handles state required to renew tokens and re-auth as required.

func NewClient

func NewClient(logger hclog.Logger, vaultConfig *api.Config, authConfig config.AuthConfig, awsSes *session.Session) (*Client, error)

NewClient uses the AWS IAM auth method configured in a Vault cluster to authenticate the execution role and create a Vault API client.

func (*Client) Token

func (c *Client) Token(ctx context.Context) (string, error)

Token synchronously renews/re-auths as required and returns a Vault token.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL