Documentation ¶
Index ¶
- type ConfigurationStruct
- func (c *ConfigurationStruct) EmptyWritablePtr() interface{}
- func (c *ConfigurationStruct) GetBootstrap() bootstrapConfig.BootstrapConfiguration
- func (c *ConfigurationStruct) GetInsecureSecrets() bootstrapConfig.InsecureSecrets
- func (c *ConfigurationStruct) GetLogLevel() string
- func (c *ConfigurationStruct) GetRegistryInfo() bootstrapConfig.RegistryInfo
- func (c *ConfigurationStruct) GetTelemetryInfo() *bootstrapConfig.TelemetryInfo
- func (c *ConfigurationStruct) GetWritablePtr() any
- func (c *ConfigurationStruct) UpdateFromRaw(rawConfig interface{}) bool
- func (c *ConfigurationStruct) UpdateWritableFromRaw(rawWritable interface{}) bool
- type DeviceInfo
- type DiscoveryInfo
- type Reading
- type Telemetry
- type WritableInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConfigurationStruct ¶
type ConfigurationStruct struct { // WritableInfo contains configuration settings that can be changed in the Registry . Writable WritableInfo // Clients is a collection of services used by a DS. Clients bootstrapConfig.ClientsCollection // Registry contains registry-specific settings. Registry bootstrapConfig.RegistryInfo // Service contains DeviceService-specific settings. Service bootstrapConfig.ServiceInfo // Device contains device-specific configuration settings. Device DeviceInfo // Driver is a string map contains customized configuration for the protocol driver implemented based on Device SDK Driver map[string]string // MessageBus contains information for connecting to MessageBus which provides alternative way to publish event MessageBus bootstrapConfig.MessageBusInfo // MaxEventSize is the maximum event size that can be sent to MessageBus or CoreData MaxEventSize int64 }
ConfigurationStruct contains the configuration properties for the device service.
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 ¶
func (c *ConfigurationStruct) GetBootstrap() bootstrapConfig.BootstrapConfiguration
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.yaml's structure -- until we can make backwards-breaking configuration.yaml changes (which would consolidate these fields into an bootstrapConfig.BootstrapConfiguration struct contained within ConfigurationStruct).
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 gets the config.RegistryInfo field from the ConfigurationStruct.
func (*ConfigurationStruct) GetTelemetryInfo ¶
func (c *ConfigurationStruct) GetTelemetryInfo() *bootstrapConfig.TelemetryInfo
GetTelemetryInfo returns the service's Telemetry settings.
func (*ConfigurationStruct) GetWritablePtr ¶
func (c *ConfigurationStruct) GetWritablePtr() any
GetWritablePtr returns pointer to the writable section
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 DeviceInfo ¶
type DeviceInfo struct { // DataTransform specifies whether or not the DS perform transformations // specified by value descriptor on a actuation or query command. DataTransform bool // MaxCmdOps defines the maximum number of resource operations that // can be sent to a Driver in a single command. MaxCmdOps int // MaxCmdValueLen is the maximum string length of a command parameter or // result (including the value descriptor name) that can be returned // by a Driver. MaxCmdValueLen int // ProfilesDir specifies a directory which contains device profiles // files which should be imported on startup. ProfilesDir string // DevicesDir specifies a directory contains devices files which should be imported on startup. DevicesDir string // ProvisionWatchersDir specifies a directory contains provision watcher files which should be imported on startup. ProvisionWatchersDir string Discovery DiscoveryInfo // AsyncBufferSize defines the size of asynchronous channel AsyncBufferSize int // EnableAsyncReadings to determine whether the Device Service would deal with the asynchronous readings EnableAsyncReadings bool // Labels are properties applied to the device service to help with searching Labels []string }
DeviceInfo is a struct which contains device specific configuration settings.
type DiscoveryInfo ¶
type DiscoveryInfo struct { // Enabled controls whether or not device discovery is enabled. Enabled bool // Interval indicates how often the discovery process will be triggered. // It represents as a duration string. Interval string }
DiscoveryInfo is a struct which contains configuration of device auto discovery.
type Reading ¶
type Reading struct { // ReadingUnits specifies whether or not to indicate the units of measure for the value in the reading ReadingUnits bool }
Reading is a struct which contains reading configuration settings.
type Telemetry ¶
type Telemetry struct { Alloc, TotalAlloc, Sys, Mallocs, Frees, LiveObjects uint64 }
Telemetry provides metrics (on a given device service) to system management.
type WritableInfo ¶
type WritableInfo struct { // Level is the logging level of writing log message LogLevel string InsecureSecrets config.InsecureSecrets Reading Reading Telemetry config.TelemetryInfo }
WritableInfo is a struct which contains configuration settings that can be changed in the Registry .