commandline

package
v0.0.13 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

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

  • Copyright 2020 Intel Corp. *
  • 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

View Source
const (
	DefaultConfigProvider = "consul.http://localhost:8500"
	DefaultConfigFile     = "configuration.toml"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CommonFlags

type CommonFlags interface {
	UseRegistry() bool
	ConfigProviderUrl() string
	Profile() string
	ConfigDirectory() string
	ConfigFileName() string
	Parse([]string)
	Help()
}

CommonFlags is an interface that defines AP for the common command-line flags used by most EdgeX services

type DefaultCommonFlags

type DefaultCommonFlags struct {
	FlagSet *flag.FlagSet
	// contains filtered or unexported fields
}

DefaultCommonFlags is the Default implementation of CommonFlags used by most EdgeX services

func NewDefaultCommonFlags

func NewDefaultCommonFlags(additionalUsage string) *DefaultCommonFlags

NewDefaultCommonFlags creates and initializes a DefaultCommonFlags

func (*DefaultCommonFlags) ConfigDirectory

func (f *DefaultCommonFlags) ConfigDirectory() string

ConfigDirectory returns the directory where the config file(s) are located, if it was specified.

func (*DefaultCommonFlags) ConfigFileName

func (f *DefaultCommonFlags) ConfigFileName() string

ConfigFileName returns the name of the local configuration file

func (*DefaultCommonFlags) ConfigProviderUrl

func (f *DefaultCommonFlags) ConfigProviderUrl() string

ConfigProviderUrl returns the url for the Configuration Provider, if one was specified.

func (*DefaultCommonFlags) Help

func (f *DefaultCommonFlags) Help()

Help displays the usage help message and exit.

func (*DefaultCommonFlags) Parse

func (f *DefaultCommonFlags) Parse(arguments []string)

Parse parses the passed in command-lie arguments looking to the default set of common flags

func (*DefaultCommonFlags) Profile

func (f *DefaultCommonFlags) Profile() string

Profile returns the profile name to use, if one was specified

func (*DefaultCommonFlags) UseRegistry

func (f *DefaultCommonFlags) UseRegistry() bool

UseRegistry returns whether the Registry should be used or not

Jump to

Keyboard shortcuts

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