config

package
v0.0.0-...-0490640 Latest Latest
Warning

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

Go to latest
Published: May 16, 2019 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CfgmgmtConfig

type CfgmgmtConfig struct {
	Target string `mapstructure:"target"`
}

type DataFeedConfig

type DataFeedConfig struct {
	ServiceConfig       ServiceConfig       `mapstructure:"service"`
	LogConfig           LogConfig           `mapstructure:"log"`
	TLSConfig           certs.TLSConfig     `mapstructure:"tls"`
	NotificationsConfig NotificationsConfig `mapstructure:"notifications"`
	SecretsConfig       SecretsConfig       `mapstructure:"secrets"`
	CfgmgmtConfig       CfgmgmtConfig       `mapstructure:"cfgmgmt"`
	ServiceCerts        *certs.ServiceCerts
}

Configuration for the Data Feed Service

func Configure

func Configure() (*DataFeedConfig, error)

Configure marshals configuration from the data-feed-service configuration file that has been read in by Viper during the root command's initConfig(). Settings are parsed by Viper into the DataFeedConfig struct.

func (*DataFeedConfig) GetCerts

func (c *DataFeedConfig) GetCerts() *certs.ServiceCerts

func (*DataFeedConfig) ListenAddress

func (c *DataFeedConfig) ListenAddress() string

ListenAddress is the address where gRPC server will bind and listen

func (*DataFeedConfig) SetLogLevel

func (c *DataFeedConfig) SetLogLevel()

SetLogLevel sets the log level for the service

type LogConfig

type LogConfig struct {
	LogLevel  string `mapstructure:"log_level"`
	LogFormat string `mapstructure:"log_format"`
}

type NotificationsConfig

type NotificationsConfig struct {
	Target string `mapstructure:"target"`
}

type SecretsConfig

type SecretsConfig struct {
	Target string `mapstructure:"target"`
}

type ServiceConfig

type ServiceConfig struct {
	Host         string        `mapstructure:"host"`
	Port         uint16        `mapstructure:"port"`
	FeedInterval time.Duration `mapstructure:"feed_interval"`
}

Jump to

Keyboard shortcuts

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