consul

package
v0.0.0-...-982e07a Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2023 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterCLIParametersWithFlagSet

func RegisterCLIParametersWithFlagSet(flags *flag.FlagSet, prefix, description string)

RegisterCLIParametersWithFlagSet look up for consul_connection_api_string, if none exists, consul_connection_api_string and consul_kv_config_path will be added to provided flags.

Types

type CLIOptions

type CLIOptions struct {
	Address             string
	EncryptorConfigPath string
	CAPath              string
	ClientCert          string
	ClientKey           string
	EnableTLS           bool
}

CLIOptions keep command-line options related to Consul encryptor config loader.

func ParseCLIParametersFromFlags

func ParseCLIParametersFromFlags(extractor *args.ServiceExtractor, prefix string) *CLIOptions

ParseCLIParametersFromFlags CLIOptions from provided FlagSet

func (*CLIOptions) ConsulHTTPClient

func (consul *CLIOptions) ConsulHTTPClient(extractor *args.ServiceExtractor) (*http.Client, error)

ConsulHTTPClient returns api.Config connection configuration

type Storage

type Storage struct {
	// contains filtered or unexported fields
}

Storage implementation config_loader.EncryptorConfigStorage

func (Storage) Copy

func (s Storage) Copy(src, dst string) error

Copy implementation of filesystem.Storage interface

func (Storage) Exists

func (s Storage) Exists(path string) (bool, error)

Exists implementation of filesystem.Storage interface

func (Storage) GetEncryptorConfigPath

func (s Storage) GetEncryptorConfigPath() string

GetEncryptorConfigPath implementation of config_loader.EncryptorConfigStorage

func (s Storage) Link(oldpath, newpath string) error

Link implementation of filesystem.Storage interface

func (Storage) MkdirAll

func (s Storage) MkdirAll(path string, perm os.FileMode) error

MkdirAll implementation of filesystem.Storage interface

func (Storage) ReadDir

func (s Storage) ReadDir(path string) ([]os.FileInfo, error)

ReadDir implementation of filesystem.Storage interface

func (Storage) ReadFile

func (s Storage) ReadFile(path string) ([]byte, error)

ReadFile implementation of filesystem.Storage interface

func (Storage) Remove

func (s Storage) Remove(path string) error

Remove implementation of filesystem.Storage interface

func (Storage) RemoveAll

func (s Storage) RemoveAll(path string) error

RemoveAll implementation of filesystem.Storage interface

func (Storage) Rename

func (s Storage) Rename(oldpath, newpath string) error

Rename implementation of filesystem.Storage interface

func (Storage) Stat

func (s Storage) Stat(path string) (os.FileInfo, error)

Stat implementation of filesystem.Storage interface

func (Storage) TempDir

func (s Storage) TempDir(pattern string, perm os.FileMode) (string, error)

TempDir implementation of filesystem.Storage interface

func (Storage) TempFile

func (s Storage) TempFile(pattern string, perm os.FileMode) (string, error)

TempFile implementation of filesystem.Storage interface

func (Storage) WriteFile

func (s Storage) WriteFile(path string, data []byte, perm os.FileMode) error

WriteFile implementation of filesystem.Storage interface

type StorageCreator

type StorageCreator struct{}

StorageCreator implement config_loader.EncryptorConfigStorage via Hashicorp Consul Backend

func (StorageCreator) IsStorageConfigured

func (s StorageCreator) IsStorageConfigured(extractor *args.ServiceExtractor, prefix string) bool

IsStorageConfigured check weather CLI flag for Consul using was provided

func (StorageCreator) NewStorage

func (s StorageCreator) NewStorage(extractor *args.ServiceExtractor, prefix string) (encryptor.ConfigStorage, error)

NewStorage create config_loader.EncryptorConfigStorage from FlagSet

func (StorageCreator) RegisterCLIParameters

func (s StorageCreator) RegisterCLIParameters(flags *flag.FlagSet, prefix, description string)

RegisterCLIParameters register CLI flags for FlagSet for Hashicorp Consul Backend

Jump to

Keyboard shortcuts

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