config

package
v1.3.1-dev.18.0...-398431f Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ACLInfo

type ACLInfo struct {
	// the protocol used for registry's API calls, usually it is different from the protocol of waitFor, i.e. TCP
	Protocol string
	// filepath to save the registry's token generated from ACL bootstrapping
	BootstrapTokenPath string
	// filepath for the secretstore's token created from secretstore-setup
	SecretsAdminTokenPath string
	// filepath for the sentinel file to indicate the registry ACL is set up successfully
	SentinelFilePath string
	// filepath to save the registry's token created for management purposes
	ManagementTokenPath string
	// the roles for registry role-based access control list
	Roles map[string]ACLRoleInfo
}

ACLInfo defines the fields related to Registry's ACL process

func (ACLInfo) GetACLRoleNames

func (acl ACLInfo) GetACLRoleNames() []string

GetRoleNames gets the slice of the keys (i.e. the service keys) from map Roles as ACL role names

type ACLRoleInfo

type ACLRoleInfo struct {
	// the details about the role
	Description string
}

ACLRoleInfo defines the fields related to Registry's ACL roles

type BootStrapperInfo

type BootStrapperInfo struct {
	Host      string
	StartPort int
}

BootStrapperInfo defines the first stage gate info It is the first stage gate of security bootstrapping

type ConfigurationStruct

type ConfigurationStruct struct {
	LogLevel    string
	StageGate   StageGateInfo
	SecretStore bootstrapConfig.SecretStoreInfo
}

func (*ConfigurationStruct) EmptyWritablePtr

func (c *ConfigurationStruct) EmptyWritablePtr() interface{}

EmptyWritablePtr returns a pointer to a service-specific empty WritableInfo struct. It is used by the bootstrap to provide the appropriate structure to registry.Client's WatchForChanges().

func (*ConfigurationStruct) GetBootstrap

GetBootstrap returns the configuration elements required by the bootstrap. Currently, a copy of the configuration data is returned. This is intended to be temporary -- since ConfigurationStruct drives the configuration.toml's structure -- until we can make backwards-breaking configuration.toml changes (which would consolidate these fields into an bootstrapConfig.BootstrapConfiguration struct contained within ConfigurationStruct).

func (*ConfigurationStruct) GetDatabaseInfo

func (c *ConfigurationStruct) GetDatabaseInfo() map[string]bootstrapConfig.Database

GetDatabaseInfo returns a database information map.

func (*ConfigurationStruct) GetInsecureSecrets

func (c *ConfigurationStruct) GetInsecureSecrets() bootstrapConfig.InsecureSecrets

GetInsecureSecrets returns the service's InsecureSecrets.

func (*ConfigurationStruct) GetLogLevel

func (c *ConfigurationStruct) GetLogLevel() string

GetLogLevel returns the current ConfigurationStruct's log level.

func (*ConfigurationStruct) GetRegistryInfo

func (c *ConfigurationStruct) GetRegistryInfo() bootstrapConfig.RegistryInfo

GetRegistryInfo returns the RegistryInfo from the ConfigurationStruct.

func (*ConfigurationStruct) UpdateFromRaw

func (c *ConfigurationStruct) UpdateFromRaw(rawConfig interface{}) bool

UpdateFromRaw converts configuration received from the registry to a service-specific configuration struct which is then used to overwrite the service's existing configuration struct.

func (*ConfigurationStruct) UpdateWritableFromRaw

func (c *ConfigurationStruct) UpdateWritableFromRaw(rawWritable interface{}) bool

UpdateWritableFromRaw converts configuration received from the registry to a service-specific WritableInfo struct which is then used to overwrite the service's existing configuration's WritableInfo struct.

type DatabaseInfo

type DatabaseInfo struct {
	Host      string
	Port      int
	ReadyPort int
}

DatabaseInfo defines the fields related to stage gating the database bootstrapping

type KongDBInfo

type KongDBInfo struct {
	Host      string
	Port      int
	ReadyPort int
}

KongDBInfo defines the fields related to stage gating the Kong's database bootstrapping

type ReadyInfo

type ReadyInfo struct {
	ToRunPort int
}

ReadyInfo defines the ready stage gate info It is the last stage gate of security bootstrapping for Kong, and all other Edgex core services

type RegistryInfo

type RegistryInfo struct {
	Host      string
	Port      int
	ReadyPort int
	ACL       ACLInfo
}

RegistryInfo defines the fields related to stage gating the registry bootstrapping

type SecretStoreSetupInfo

type SecretStoreSetupInfo struct {
	Host   string
	Tokens TokensInfo
}

SecretStoreSetupInfo defines the fields related to stage gating the secretstore setup (formerly known as vault-worker) bootstrapping

type StageGateInfo

type StageGateInfo struct {
	BootStrapper     BootStrapperInfo
	Ready            ReadyInfo
	SecretStoreSetup SecretStoreSetupInfo
	Database         DatabaseInfo
	Registry         RegistryInfo
	KongDB           KongDBInfo
	WaitFor          WaitForInfo
}

StageGateInfo defines the gate info for the security bootstrapper in different stages for services. From the TOML structure perspective, it is segmented in the way that environment variables are easier to read when they become all upper cases in the environment override.

type TokensInfo

type TokensInfo struct {
	ReadyPort int
}

TokensInfo defines the tokens ready stage gate info for the secretstore setup (formerly known as vault-worker)

type WaitForInfo

type WaitForInfo struct {
	Timeout       string
	RetryInterval string
}

WaitForInfo defines some fields related to waitFor subcommand of security-bootstrapper

Jump to

Keyboard shortcuts

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