Versions in this module Expand all Collapse all v0 v0.7.1 Dec 20, 2017 Changes in this version + func NewVaultClient(config *config.VaultConfig, logger *log.Logger, tokenDeriver TokenDeriverFunc) (*vaultClient, error) + type MockVaultClient struct + DeriveTokenErrors map[string]map[string]error + DeriveTokenFn func(a *structs.Allocation, tasks []string) (map[string]string, error) + RenewTokenErrors map[string]error + RenewTokens map[string]chan error + StoppedTokens []string + func NewMockVaultClient() *MockVaultClient + func (vc *MockVaultClient) DeriveToken(a *structs.Allocation, tasks []string) (map[string]string, error) + func (vc *MockVaultClient) GetConsulACL(string, string) (*vaultapi.Secret, error) + func (vc *MockVaultClient) RenewLease(leaseId string, interval int) (<-chan error, error) + func (vc *MockVaultClient) RenewToken(token string, interval int) (<-chan error, error) + func (vc *MockVaultClient) SetDeriveTokenError(allocID string, tasks []string, err error) + func (vc *MockVaultClient) SetRenewTokenError(token string, err error) + func (vc *MockVaultClient) Start() + func (vc *MockVaultClient) Stop() + func (vc *MockVaultClient) StopRenewLease(leaseId string) error + func (vc *MockVaultClient) StopRenewToken(token string) error + type TokenDeriverFunc func(*structs.Allocation, []string, *vaultapi.Client) (map[string]string, error) + type VaultClient interface + DeriveToken func(*structs.Allocation, []string) (map[string]string, error) + GetConsulACL func(string, string) (*vaultapi.Secret, error) + RenewLease func(string, int) (<-chan error, error) + RenewToken func(string, int) (<-chan error, error) + Start func() + Stop func() + StopRenewLease func(string) error + StopRenewToken func(string) error