config

package
v2.0.10 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2025 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SecuritySecretStoreSetupServiceKey = "security-secretstore-setup"
)
View Source
const (
	Vault = "vault"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BootstrapConfiguration

type BootstrapConfiguration struct {
	Clients *ClientsCollection
	Service *ServiceInfo
}

BootstrapConfiguration defines the configuration elements required by the bootstrap.

type ClientInfo

type ClientInfo struct {
	// Host is the hostname or IP address of a service.
	Host string
	// Port defines the port on which to access a given service
	Port int
	// Protocol indicates the protocol to use when accessing a given service
	Protocol string
	// UseMessageBus indicates weather to use Messaging version of client
	UseMessageBus bool
	// SecurityOptions is a key/value map, used for configuring clients. Currently used for zero trust but
	// could be for other options additional security related configuration
	SecurityOptions map[string]string
}

ClientInfo provides the host and port of another service in the eco-system.

func (ClientInfo) Url

func (c ClientInfo) Url() string

type ClientsCollection

type ClientsCollection map[string]*ClientInfo

ClientsCollection is a collection of Client information for communicating to dependent clients.

func NewSecretStoreSetupClientInfo

func NewSecretStoreSetupClientInfo() *ClientsCollection

type GeneralConfiguration

type GeneralConfiguration struct {
	LogLevel        string
	Service         ServiceInfo
	SecretStore     SecretStoreInfo
	InsecureSecrets InsecureSecrets
}

func (*GeneralConfiguration) GetBootstrap

func (c *GeneralConfiguration) GetBootstrap() BootstrapConfiguration

GetBootstrap returns the configuration elements required by the bootstrap.

func (*GeneralConfiguration) GetInsecureSecrets

func (c *GeneralConfiguration) GetInsecureSecrets() InsecureSecrets

GetInsecureSecrets gets the config.InsecureSecrets field from the ConfigurationStruct.

func (*GeneralConfiguration) GetLogLevel

func (c *GeneralConfiguration) GetLogLevel() string

GetLogLevel returns the current ConfigurationStruct's log level.

type InsecureSecrets

type InsecureSecrets map[string]InsecureSecretsInfo

InsecureSecrets is used to hold the secrets stored in the configuration

type InsecureSecretsInfo

type InsecureSecretsInfo struct {
	SecretName string
	SecretData map[string]string
}

InsecureSecretsInfo encapsulates info used to retrieve insecure secrets

type SecretStoreInfo

type SecretStoreInfo struct {
	Type           string
	Host           string
	Port           int
	StoreName      string
	Protocol       string
	Namespace      string
	RootCaCertPath string
	ServerName     string
	Authentication types.AuthenticationInfo
	// TokenFile provides a location to a token file.
	TokenFile string
	// SecretsFile is optional Path to JSON file containing secrets to seed into service's SecretStore
	SecretsFile string
	// DisableScrubSecretsFile specifies to not scrub secrets file after importing. Service will fail start-up if
	// not disabled and file can not be written.
	DisableScrubSecretsFile bool
}

SecretStoreInfo encapsulates configuration properties used to create a SecretClient.

func NewSecretStoreInfo

func NewSecretStoreInfo(serviceKey string) SecretStoreInfo

type SecretsSetupInfo

type SecretsSetupInfo struct {
	// CertConfig is used for auto-generating the TLS certificates when user didn't specify the TLS_KEY_PATH and TLS_CERT_PATH
	CertConfig string
	// CertOutputDir indicates the folder for auto-generated TLS certificates
	CertOutputDir string
}

SecretsSetupInfo encapsulates the configuration used to auto-generate TLS certificates This is not a general config for all services. Only services that require auto-generated TLS certificates need this config.

type ServiceInfo

type ServiceInfo struct {
	// Host is the hostname or IP address of the service.
	Host string
	// Port is the HTTP port of the service.
	Port int
	// ServerBindAddr specifies an IP address or hostname
	// for ListenAndServe to bind to, such as 0.0.0.0
	ServerBindAddr string
	// StartupMsg specifies a string to log once service
	// initialization and startup is completed.
	StartupMsg string
	// MaxResultCount specifies the maximum size list supported
	// in response to REST calls to other services.
	MaxResultCount int
	// MaxRequestSize defines the maximum size of http request body in kilobytes
	MaxRequestSize int64
	// RequestTimeout specifies a timeout (in ISO8601 format) for
	// processing REST request calls from other services.
	RequestTimeout string
}

ServiceInfo contains configuration settings necessary for the basic operation of any Edge service.

Jump to

Keyboard shortcuts

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