package config

import "github.com/edgexfoundry/go-mod-bootstrap/config"

******************************************************************************

Index

Types

type BootstrapConfiguration

type BootstrapConfiguration struct {
	Clients     map[string]ClientInfo
	Service     ServiceInfo
	Config      ConfigProviderInfo
	Registry    RegistryInfo
	SecretStore SecretStoreInfo
}

BootstrapConfiguration defines the configuration elements required by the bootstrap.

type CertKeyPair

type CertKeyPair struct {
	Cert string
	Key  string
}

CertKeyPair encapsulates public certificate/private key pair for an SSL certificate

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
}

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

func (ClientInfo) Url

func (c ClientInfo) Url() string

type ConfigProviderInfo

type ConfigProviderInfo struct {
	Host string
	Port int
	Type string
}

ConfigProviderInfo defines the type and location (via host/port) of the desired configuration provider (e.g. Consul, Eureka)

type Credentials

type Credentials struct {
	Username string
	Password string
}

Credentials encapsulates username-password attributes.

type Database

type Database struct {
	Type    string
	Timeout int
	Host    string
	Port    int
	Name    string
}

type InsecureSecrets

type InsecureSecrets map[string]InsecureSecretsInfo

InsecureSecrets is used to hold the secrets stored in the configuration

type InsecureSecretsInfo

type InsecureSecretsInfo struct {
	Path    string
	Secrets map[string]string
}

InsecureSecretsInfo encapsulates info used to retrieve insecure secrets

type RegistryInfo

type RegistryInfo struct {
	Host string
	Port int
	Type string
}

RegistryInfo defines the type and location (via host/port) of the desired service registry (e.g. Consul, Eureka)

type SecretStoreInfo

type SecretStoreInfo struct {
	Host                    string
	Port                    int
	Path                    string
	Protocol                string
	Namespace               string
	RootCaCertPath          string
	ServerName              string
	Authentication          types.AuthenticationInfo
	AdditionalRetryAttempts int
	RetryWaitPeriod         string

	// TokenFile provides a location to a token file.
	TokenFile string
	// contains filtered or unexported fields
}

SecretStoreInfo encapsulates configuration properties used to create a SecretClient.

type ServiceInfo

type ServiceInfo struct {
	// BootTimeout indicates, in milliseconds, how long the service will retry connecting to upstream dependencies
	// before giving up. Default is 30,000.
	BootTimeout int
	// Health check interval
	CheckInterval string
	// 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
	// The protocol that should be used to call this service
	Protocol 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
	// Timeout specifies a timeout (in milliseconds) for
	// processing REST calls from other services.
	Timeout int
}

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

func (ServiceInfo) HealthCheck

func (s ServiceInfo) HealthCheck() string

HealthCheck is a URL specifying a health check REST endpoint used by the Registry to determine if the service is available.

func (ServiceInfo) Url

func (s ServiceInfo) Url() string

Url provides a way to obtain the full url of the host service for use in initialization or, in some cases, responses to a caller.

Source Files

types.go

Version
v0.0.72 (latest)
Published
Jan 19, 2021
Platform
linux/amd64
Imports
4 packages
Last checked
5 days ago

Tools for package owners.