cfg

package
v0.4.14 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2020 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MesheryCtl

type MesheryCtl struct {
	// BaseMesheryURL is the base URL of the meshery server
	BaseMesheryURL string `json:"baseMesheryURL"`
	// Perf stores the perf subcommand configurations
	Perf *PerfCfg `json:"perf"`

	CtlVersion *Version `json:"ctl_version"`
}

MesheryCtl stores the configurations used by mesheryctl CLI Default config:

 baseMesheryURL: "http://localhost:9081/api",
 perf:
	  authTokenURI:    "/gettoken",
	  loadTestSmpURI: "/perf/load-test-smp",
	  loadTestURI: "/perf/load-test",

func GetMesheryCtl

func GetMesheryCtl(v *viper.Viper) (*MesheryCtl, error)

GetMesheryCtl returns a reference to the mesheryctl configuration object.

func (*MesheryCtl) GetBaseMesheryURL

func (mc *MesheryCtl) GetBaseMesheryURL() string

GetBaseMesheryURL returns the base meshery server URL

func (*MesheryCtl) GetPerf

func (mc *MesheryCtl) GetPerf() *PerfCfg

GetPerf returns a reference to the perf configuration object

func (*MesheryCtl) GetVersion added in v0.4.0

func (mc *MesheryCtl) GetVersion() *Version

GetVersion returns the version details of this binary

type PerfCfg

type PerfCfg struct {

	// AuthTokenURI stores the URI for the token endpoint
	AuthTokenURI string `json:"AuthtokenURI"`
	// LoadTestSmpURI stores the URI for the load test SMP endpoint
	LoadTestSmpURI string `json:"loadTestSmpURI"`
	LoadTestURI    string `json:"loadTestURI"`
	// contains filtered or unexported fields
}

PerfCfg stores the perf subcommand configurations

func (*PerfCfg) GetAuthTokenURL

func (pc *PerfCfg) GetAuthTokenURL() string

GetAuthTokenURL returns a fully qualified URL to the token endpoint

func (*PerfCfg) GetLoadTestSmpURL added in v0.4.7

func (pc *PerfCfg) GetLoadTestSmpURL() string

GetLoadTestSmpURL returns a fully qualified URL to the Load Test SMP endpoint

func (*PerfCfg) GetLoadTestURL added in v0.3.18

func (pc *PerfCfg) GetLoadTestURL() string

GetLoadTestURL returns a fully qualified URL to the Load Test endpoint

type Version added in v0.4.0

type Version struct {
	Build     string `json:"build,omitempty"`
	CommitSHA string `json:"commitsha,omitempty"`
}

Version unmarshals the json response from the server's version api

func (*Version) GetBuild added in v0.4.0

func (v *Version) GetBuild() string

GetBuild returns the build number for the binary

func (*Version) GetCommitSHA added in v0.4.0

func (v *Version) GetCommitSHA() string

GetCommitSHA returns the commit sha for the binary

Jump to

Keyboard shortcuts

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