factory

package
v2.40.0 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2024 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var EnvCumulocityHostNames = []string{
	"C8Y_HOST",
	"C8Y_BASEURL",
	"C8Y_URL",
}

Functions

func CreateCumulocityClient

func CreateCumulocityClient(f *cmdutil.Factory, sessionFile, username, password string, disableEncryptionCheck bool) func() (*c8y.Client, error)

func GetHostFromEnvironment

func GetHostFromEnvironment() string

GetHostFromEnvironment gets the first non-empty host environment variable value as Cumulocity uses different environment variable names for different tooling

func New

func New(appVersion string, buildBranch string, configFunc func() (*config.Config, error), clientFunc func() (*c8y.Client, error), loggerFunc func() (*logger.Logger, error), activityLoggerFunc func() (*activitylogger.ActivityLogger, error), dataViewFunc func() (*dataview.DataView, error), consoleFunc func() (*console.Console, error)) *cmdutil.Factory

func WithCompression added in v2.15.0

func WithCompression(enable bool) c8y.ClientOption

WithCompression sets the compression option for the http client

func WithProxyDisabled

func WithProxyDisabled(disable bool) c8y.ClientOption

Types

type RetryLogger added in v2.39.0

type RetryLogger struct {
	// contains filtered or unexported fields
}

RetryLogger to customize the log messages produced by the http retry client

func (RetryLogger) Printf added in v2.39.0

func (l RetryLogger) Printf(format string, args ...interface{})

Jump to

Keyboard shortcuts

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