Documentation ¶
Index ¶
- Variables
- type ApplicationSettings
- type ConfigurationStruct
- func (c *ConfigurationStruct) EmptyWritablePtr() interface{}
- func (c *ConfigurationStruct) GetBootstrap() bootstrapConfig.BootstrapConfiguration
- func (c *ConfigurationStruct) GetDataDatabaseInfo() map[string]bootstrapConfig.Database
- func (c *ConfigurationStruct) GetDatabaseInfo() map[string]bootstrapConfig.Database
- func (c *ConfigurationStruct) GetInsecureSecrets() bootstrapConfig.InsecureSecrets
- func (c *ConfigurationStruct) GetLogLevel() string
- func (c *ConfigurationStruct) GetLogPath() string
- func (c *ConfigurationStruct) GetPersisPeriod() int32
- func (c *ConfigurationStruct) GetPersistData() bool
- func (c *ConfigurationStruct) GetRedisInfo() map[string]bootstrapConfig.Database
- func (c *ConfigurationStruct) GetRegistryInfo() bootstrapConfig.RegistryInfo
- func (c *ConfigurationStruct) IsThingModel() bool
- func (c *ConfigurationStruct) UpdateFromRaw(rawConfig interface{}) bool
- func (c *ConfigurationStruct) UpdateWritableFromRaw(rawWritable interface{}) bool
- type DockerManage
- type MessageQueueInfo
- type TopicInfo
- type WritableInfo
Constants ¶
This section is empty.
Variables ¶
var (
DefaultEnv = "pro"
)
Functions ¶
This section is empty.
Types ¶
type ApplicationSettings ¶
type ConfigurationStruct ¶
type ConfigurationStruct struct { Writable WritableInfo MessageQueue MessageQueueInfo Clients map[string]bootstrapConfig.ClientInfo Databases map[string]map[string]bootstrapConfig.Database Registry bootstrapConfig.RegistryInfo Service bootstrapConfig.ServiceInfo RpcServer bootstrapConfig.RPCServiceInfo SecretStore bootstrapConfig.SecretStoreInfo WebServer bootstrapConfig.ServiceInfo DockerManage DockerManage ApplicationSettings ApplicationSettings Topics struct { CommandTopic TopicInfo } }
Struct used to parse the JSON configuration file
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.C'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.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) GetDataDatabaseInfo ¶
func (c *ConfigurationStruct) GetDataDatabaseInfo() map[string]bootstrapConfig.Database
GetDataDatabaseInfo returns a database information map for events & readings.
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) GetLogPath ¶
func (c *ConfigurationStruct) GetLogPath() string
func (*ConfigurationStruct) GetPersisPeriod ¶
func (c *ConfigurationStruct) GetPersisPeriod() int32
func (*ConfigurationStruct) GetPersistData ¶
func (c *ConfigurationStruct) GetPersistData() bool
func (*ConfigurationStruct) GetRedisInfo ¶
func (c *ConfigurationStruct) GetRedisInfo() map[string]bootstrapConfig.Database
GetDataDatabaseInfo returns a database information map for events & readings.
func (*ConfigurationStruct) GetRegistryInfo ¶
func (c *ConfigurationStruct) GetRegistryInfo() bootstrapConfig.RegistryInfo
GetRegistryInfo returns the RegistryInfo from the ConfigurationStruct.
func (*ConfigurationStruct) IsThingModel ¶
func (c *ConfigurationStruct) IsThingModel() bool
判断是否为物模型
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 DockerManage ¶
type MessageQueueInfo ¶
type MessageQueueInfo struct { // Host is the hostname or IP address of the broker, if applicable. Host string // Port defines the port on which to access the message queue. Port int // Protocol indicates the protocol to use when accessing the message queue. Protocol string // Indicates the message queue platform being used. Type string // Indicates the topic the data is published/subscribed SubscribeTopics []string // Indicates the topic prefix the data is published to. Note that /<device-profile-name>/<device-name> will be // added to this Publish Topic prefix as the complete publish topic PublishTopicPrefix string // Provides additional configuration properties which do not fit within the existing field. // Typically the key is the name of the configuration property and the value is a string representation of the // desired value for the configuration property. Optional map[string]string }
MessageQueueInfo provides parameters related to connecting to a message bus
func (MessageQueueInfo) Enable ¶
func (m MessageQueueInfo) Enable() bool
func (MessageQueueInfo) URL ¶
func (m MessageQueueInfo) URL() string
URL constructs a URL from the protocol, host and port and returns that as a string.