conf_iam

package
Version: v0.0.0-...-1f046af Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2015 License: BSD-2-Clause Imports: 6 Imported by: 0

Documentation

Overview

Manages writing roles credentials into the global conf.Vals state.

example use:

  iam_ready_chan := make(chan bool)
  go conf_iam.GoIAM(iam_ready_chan)
  iam_ready := <- iam_ready_chan
  if iam_ready {
	fmt.Printf("using iam\n")
  } else {
	fmt.Printf("not using iam\n")
  }

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssignCredentials

func AssignCredentials(rf *roles_files.RolesFiles) error

AssignCredentials will safely copy the credentials data from rf to the global conf.Vals.

func AssignCredentialsToConf

func AssignCredentialsToConf(rf *roles_files.RolesFiles, c *conf.AWS_Conf) error

AssignCredentialsToConf will safely copy the credentials data from rf to the conf c.

func GoIAM

func GoIAM(ready_chan chan bool)

GoIAM calls the GoIAMToConf credential manager, assigning to the global conf.Vals.

func GoIAMToConf

func GoIAMToConf(c *conf.AWS_Conf, ready_chan chan bool)

GoIAMToConf is a convenience wrapper for callers using roles_files instantiation of the roles interface. First there is a blocking read on the roles files to get the initial roles information. Then the file notification watcher will run as a goroutine, and resetting conf c's roles values. If IAM Credentials are ready for use, the parameter chan `ready_chan` will receive a true value, otherwise false. A false value on this chan should indicate to a caller that another auth mechanism (for example, hardocded credentials) should be used.

func ReadIAM

func ReadIAM(rf *roles_files.RolesFiles) error

ReadIAM will read the credentials data from rf and safely assign it to the global conf.Vals.

func ReadIAMToConf

func ReadIAMToConf(rf *roles_files.RolesFiles, c *conf.AWS_Conf) error

ReadIAMToConf will read the credentials data from rf and safely assign it to conf c.

func WatchIAM

func WatchIAM(rf *roles_files.RolesFiles, watch_err_chan chan error)

WatchIAMToConf will begin rf's RolesWatch method and wait to receive signals that new credentials are available to be assigned, which will then be safely copied to the global conf.Vals.

func WatchIAMToConf

func WatchIAMToConf(rf *roles_files.RolesFiles, c *conf.AWS_Conf, watch_err_chan chan error)

WatchIAMToConf will begin rf's RolesWatch method and wait to receive signals that new credentials are available to be assigned, which will then be safely copied to conf c.

Types

This section is empty.

Source Files

Jump to

Keyboard shortcuts

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