client

package
v0.0.0-...-179c803 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Copyright © 2020 The Platform9 Systems Inc.

Index

Constants

View Source
const HTTPMaxRetry = 15
View Source
const HTTPRetryMaxWait = 30 * time.Second
View Source
const HTTPRetryMinWait = 10 * time.Second

Variables

View Source
var SegmentWriteKey string

Added segment key for the source PRD-PMKFT Metrics-Aggregator

Functions

func InfraCheck

func InfraCheck() bool

Types

type Client

type Client struct {
	Resmgr   resmgr.Resmgr
	Keystone keystone.Keystone
	Qbert    qbert.Qbert
	Executor cmdexec.Executor
	Segment  Segment
}

Clients struct encapsulate the collection of external services

func NewClient

func NewClient(fqdn string, executor cmdexec.Executor, allowInsecure bool, noTracking bool) (Client, error)

New creates the clients needed by the CLI to interact with the external services.

type NoopSegment

type NoopSegment struct {
}

func (NoopSegment) Close

func (c NoopSegment) Close()

func (NoopSegment) SendEvent

func (c NoopSegment) SendEvent(name string, data interface{}, status string, err string) error

The Noop Implementation of Segment

func (NoopSegment) SendGroupTraits

func (c NoopSegment) SendGroupTraits(name string, data interface{}) error

type Segment

type Segment interface {
	SendEvent(string, interface{}, string, string) error
	SendGroupTraits(string, interface{}) error
	Close()
}

func NewSegment

func NewSegment(fqdn string, noTracking bool) Segment

type SegmentImpl

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

func (SegmentImpl) Close

func (c SegmentImpl) Close()

func (SegmentImpl) SendEvent

func (c SegmentImpl) SendEvent(name string, data interface{}, status string, err string) error

func (SegmentImpl) SendGroupTraits

func (c SegmentImpl) SendGroupTraits(name string, data interface{}) error

type SegmentNoopLogger

type SegmentNoopLogger struct {
}

func (*SegmentNoopLogger) Errorf

func (c *SegmentNoopLogger) Errorf(err string, args ...interface{})

func (*SegmentNoopLogger) Logf

func (c *SegmentNoopLogger) Logf(err string, args ...interface{})

Jump to

Keyboard shortcuts

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