common

package
v1.2.1-dev.45 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CoreCommandClientName   = "Command"
	CoreDataClientName      = "CoreData"
	NotificationsClientName = "Notifications"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AtomicBool added in v1.3.0

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

func (*AtomicBool) Set added in v1.3.0

func (b *AtomicBool) Set(v bool)

func (*AtomicBool) Value added in v1.3.0

func (b *AtomicBool) Value() bool

type BindingInfo

type BindingInfo struct {
	// Type of trigger to start pipeline
	//
	// example: messagebus
	// required: true
	// enum: messagebus (edgex-messagebus), http, external-mqtt
	Type           string
	SubscribeTopic string
	PublishTopic   string
}

BindingInfo contains Metadata associated with each binding

type ConfigurationStruct

type ConfigurationStruct struct {
	// Writable
	Writable WritableInfo
	// Logging
	Logging bootstrapConfig.LoggingInfo
	// Registry
	Registry bootstrapConfig.RegistryInfo
	// Service
	Service ServiceInfo
	// MessageBus
	MessageBus types.MessageBusConfig
	// MqttBroker
	MqttBroker MqttBrokerConfig
	// Binding
	Binding BindingInfo
	// ApplicationSettings
	ApplicationSettings map[string]string
	// Clients
	Clients map[string]bootstrapConfig.ClientInfo
	// Database
	Database db.DatabaseInfo
	// SecretStore
	SecretStore bootstrapConfig.SecretStoreInfo
	// SecretStoreExclusive
	SecretStoreExclusive bootstrapConfig.SecretStoreInfo
}

ConfigurationStruct swagger:model ConfigurationStruct

func (*ConfigurationStruct) EmptyWritablePtr added in v1.1.0

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

EmptyWritablePtr returns a pointer to an empty WritableInfo struct. It is used by the bootstrap to provide the appropriate structure for Config Client's WatchForChanges().

func (*ConfigurationStruct) GetBootstrap added in v1.1.0

GetBootstrap returns the configuration elements required by the bootstrap.

func (*ConfigurationStruct) GetLogLevel added in v1.1.0

func (c *ConfigurationStruct) GetLogLevel() string

GetLogLevel returns log level from the configuration

func (*ConfigurationStruct) GetRegistryInfo added in v1.1.0

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

GetRegistryInfo returns the RegistryInfo section from the configuration

func (*ConfigurationStruct) UpdateFromRaw added in v1.1.0

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 added in v1.1.0

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

UpdateWritableFromRaw updates the Writeable section of configuration from raw update received from Configuration Provider.

type Credentials added in v1.0.0

type Credentials struct {
	Username string
	Password string
}

Credentials encapsulates username-password attributes.

type EdgeXClients added in v1.0.0

type EdgeXClients struct {
	LoggingClient         logger.LoggingClient
	EventClient           coredata.EventClient
	CommandClient         command.CommandClient
	ValueDescriptorClient coredata.ValueDescriptorClient
	NotificationsClient   notifications.NotificationsClient
}

type InsecureSecrets added in v1.1.0

type InsecureSecrets map[string]InsecureSecretsInfo

InsecureSecrets is used to hold the secrets stored in the configuration

type InsecureSecretsInfo added in v1.1.0

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

InsecureSecretsInfo encapsulates info used to retrieve insecure secrets

type MqttBrokerConfig added in v1.3.0

type MqttBrokerConfig struct {
	// Url contains the fully qualified URL to connect to the MQTT broker
	Url string
	// ClientId to connect to the broker with.
	ClientId string
	// ConnectTimeout is a time duration indicating how long to wait timing out on the broker connection
	ConnectTimeout string
	// AutoReconnect indicated whether or not to retry connection if disconnected
	AutoReconnect bool
	// KeepAlive is seconds between client ping when no active data flowing to avoid client being disconnected
	KeepAlive int64
	// QoS for MQTT Connection
	QoS byte
	// Retain setting for MQTT Connection
	Retain bool
	// SkipCertVerify indicates if the certificate verification should be skipped
	SkipCertVerify bool
	// SecretPath is the name of the path in secret provider to retrieve your secrets
	SecretPath string
	// AuthMode indicates what to use when connecting to the broker. Options are "none", "cacert" , "usernamepassword", "clientcert".
	// If a CA Cert exists in the SecretPath then it will be used for all modes except "none".
	AuthMode string
}

MqttBrokerConfig contains the MQTT broker configuration for MQTT Trigger

type PipelineFunction added in v1.0.0

type PipelineFunction struct {
	// Name	string
	Parameters  map[string]string
	Addressable models.Addressable
}

type PipelineInfo added in v1.0.0

type PipelineInfo struct {
	ExecutionOrder           string
	UseTargetTypeOfByteArray bool
	Functions                map[string]PipelineFunction
}

type ServiceInfo

type ServiceInfo struct {
	BootTimeout    string
	CheckInterval  string
	Host           string
	HTTPSCert      string
	HTTPSKey       string
	ServerBindAddr string
	Port           int
	Protocol       string
	StartupMsg     string
	ReadMaxLimit   int
	Timeout        string
}

ServiceInfo is used to hold and configure various settings related to the hosting of this service

type StoreAndForwardInfo added in v1.0.0

type StoreAndForwardInfo struct {
	Enabled       bool
	RetryInterval string
	MaxRetryCount int
}

type WritableInfo

type WritableInfo struct {
	// Set level of logging to report
	//
	// example: TRACE
	// required: true
	// enum: TRACE,DEBUG,INFO,WARN,ERROR
	LogLevel        string
	Pipeline        PipelineInfo
	StoreAndForward StoreAndForwardInfo
	InsecureSecrets InsecureSecrets
}

WritableInfo is used to hold configuration information that is considered "live" or can be changed on the fly without a restart of the service.

Jump to

Keyboard shortcuts

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