cmd

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2021 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package cmd contains code that is executed by a given command from the CLI.

Package cmd contains code that is executed by a given command from the CLI.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Execute

func Execute()

Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.

Types

type AdaptorConfig added in v0.4.0

type AdaptorConfig struct {
	// Host where the adaptor is running
	Host string `yaml:"host,omitempty"`
	// Port where the adaptor is listening from
	Port int32 `yaml:"port,omitempty"`
}

AdaptorConfig contains configuration about the adaptor

type Config added in v0.4.0

type Config struct {
	// DebugMode specifies whether to log debug or not
	DebugMode bool `yaml:"debugMode,omitempty"`
	// Adaptor specifies the adaptor configuration
	Adaptor *AdaptorConfig `yaml:"adaptor,omitempty"`
	// MetadataKeys is the key to look for in a service's metadata
	MetadataKeys []string `yaml:"metadataKeys"`
	// ServiceRegistry settings about the service registry to use
	ServiceRegistry *ServiceRegistrySettings `yaml:"serviceRegistry"`
}

Config contains the configuration of the program

type ServiceDirectoryConfig added in v0.4.0

type ServiceDirectoryConfig struct {
	// PollingInterval is number of seconds between two consecutive polls
	PollingInterval int `yaml:"pollInterval,omitempty"`
	// ProjectID is the name of the Google Cloud project
	ProjectID string `yaml:"projectID"`
	// Region where to look for
	Region string `yaml:"region"`
	// ServiceAccountPath is the path of the service account JSON
	ServiceAccountPath string `yaml:"serviceAccountPath"`
}

ServiceDirectoryConfig contains Service Directory configuration. Its fields are the same as the CLI flags, although the latter can override them.

type ServiceRegistrySettings added in v0.4.0

type ServiceRegistrySettings struct {
	// GCPServiceDirectory is the field with configuration about service
	// directory
	GCPServiceDirectory *ServiceDirectoryConfig `yaml:"gcpServiceDirectory,omitempty"`
}

ServiceRegistrySettings contains information

Jump to

Keyboard shortcuts

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