Documentation ¶
Index ¶
Constants ¶
const (
TCP = "tcp"
)
Variables ¶
This section is empty.
Functions ¶
func GetVagrantTarget ¶
GetVagrantTarget concatenates the vagrant private ip with the port posses it into ParseTarget and returns the result.
func LoadConfigFile ¶
func LoadConfigFile(cm *ConfigManager, path string) error
LoadConfigFile updates ConfigManager with a config file if it can be read successfully.
func LogLevel ¶
func LogLevel(l config.AgwD_LogLevel) log.Level
LogLevel translates protobuf defined config.AgwD_LogLevel to log.Level.
func ParseTarget ¶
ParseTarget takes a target in string form and returns a resolved Target. Extends functionality in grpc/internal/grpcutil.ParseTarget to support ipv4 and ipv6 schemes. Return tcp4Scheme or tcp6Scheme so the Scheme can be passed directly to net.Listen.
Types ¶
type ConfigManager ¶
ConfigManager implements Configer via a loaded config.
func NewConfigManager ¶
func NewConfigManager() *ConfigManager
NewConfigManager constructs a *ConfigManager with default config values.
func (*ConfigManager) Config ¶
func (c *ConfigManager) Config() *config.AgwD
Config returns the current config.
func (*ConfigManager) Merge ¶
func (c *ConfigManager) Merge(update *config.AgwD)
Merge updates the managed config.
func (*ConfigManager) Replace ¶
func (c *ConfigManager) Replace(replace *config.AgwD)
Replace overwrites the managed config.
func (*ConfigManager) ReplaceConfig ¶
func (cm *ConfigManager) ReplaceConfig(config *config.AgwD) error
ReplaceConfig overwites the CongfigManager with a config file. TODO: Add validation and error checks. Note: this can lead to a race condition.
func (*ConfigManager) UpdateConfig ¶
func (cm *ConfigManager) UpdateConfig(config *config.AgwD) error
UpdateConfig updates CongfigManager with a config file. TODO: Add validation and error checks on fields being updated.
Directories ¶
Path | Synopsis |
---|---|
internal
|
|
grpcutil
Package grpcutil provides a bunch of utility functions to be used across the gRPC codebase.
|
Package grpcutil provides a bunch of utility functions to be used across the gRPC codebase. |
Package config is a generated GoMock package.
|
Package config is a generated GoMock package. |