config

package
v1.3.1-dev.17 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

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

  • Copyright 2019 Dell Inc. *
  • Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
  • in compliance with the License. You may obtain a copy of the License at *
  • http://www.apache.org/licenses/LICENSE-2.0 *
  • Unless required by applicable law or agreed to in writing, software distributed under the License
  • is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
  • or implied. See the License for the specific language governing permissions and limitations under
  • the License. ******************************************************************************

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigurationStruct

type ConfigurationStruct struct {
	Writable     WritableInfo
	MessageQueue MessageQueueInfo
	Clients      map[string]bootstrapConfig.ClientInfo
	Databases    map[string]bootstrapConfig.Database
	Logging      bootstrapConfig.LoggingInfo
	Registry     bootstrapConfig.RegistryInfo
	Service      bootstrapConfig.ServiceInfo
	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) 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 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
	Topic 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 queue

func (MessageQueueInfo) URL

func (m MessageQueueInfo) URL() string

URL constructs a URL from the protocol, host and port and returns that as a string.

type WritableInfo

type WritableInfo struct {
	DeviceUpdateLastConnected  bool
	MetaDataCheck              bool
	PersistData                bool
	ServiceUpdateLastConnected bool
	ValidateCheck              bool
	LogLevel                   string
	ChecksumAlgo               string
}

Jump to

Keyboard shortcuts

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