telemetry

package
v1.56.0 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2024 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotMapOrStruct = errors.New("invalid response: expected a struct or map[string]interface{}")
	ErrFieldNotFound  = errors.New("field not found")
)

Functions

func AppendOption

func AppendOption(opt EventOpt)

func FinishTrackingCommand

func FinishTrackingCommand(opt TrackOptions)

func NewContext

func NewContext() context.Context

func StartTrackingCommand

func StartTrackingCommand(cmd *cobra.Command, args []string)

func StartedTrackingCommand

func StartedTrackingCommand() bool

func TrackAsk

func TrackAsk(qs []*survey.Question, response interface{}, opts ...survey.AskOpt) error

func TrackAskOne

func TrackAskOne(p survey.Prompt, response interface{}, opts ...survey.AskOpt) error

Types

type Authenticator

type Authenticator interface {
	PublicAPIKey() string
	PrivateAPIKey() string
	AccessToken() string
}

type CmdFlags

type CmdFlags interface {
	Flags() *pflag.FlagSet
}

type CmdName

type CmdName interface {
	CommandPath() string
	CalledAs() string
}

type ConfigNameGetter

type ConfigNameGetter interface {
	Name() string
}

type Event

type Event struct {
	Timestamp  time.Time              `json:"timestamp"`
	Source     string                 `json:"source"`
	Properties map[string]interface{} `json:"properties"`
}

type EventOpt

type EventOpt func(Event)

func WithDeploymentType

func WithDeploymentType(t string) EventOpt

type OrgIDGetter

type OrgIDGetter interface {
	OrgID() string
}

type Printer

type Printer interface {
	OutOrStdout() io.Writer
}

type ProjectIDGetter

type ProjectIDGetter interface {
	ProjectID() string
}

type ServiceGetter

type ServiceGetter interface {
	Service() string
	OpsManagerURL() string
}

type SkipUpdateGetter

type SkipUpdateGetter interface {
	SkipUpdateCheck() bool
}

type TrackOptions

type TrackOptions struct {
	Err    error
	Signal string
}

Jump to

Keyboard shortcuts

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