integration

package
v1.5.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	DEFAULT_INTERVAL = 60
)

Variables

This section is empty.

Functions

func NewConfigWithFile

func NewConfigWithFile(configFile string) error

func NewConfigWithPaths

func NewConfigWithPaths() error

Types

type BuildInfo

type BuildInfo struct {
	Id        string
	Name      string
	Version   string
	GitCommit string
	BuildDate string
}

type InfraIntegrationArgs

type InfraIntegrationArgs struct {
	nriSdkArgs.DefaultArgumentList
	ConfigPath  string `help:"Path to configuration"`
	ShowVersion bool   `default:"false" help:"Print build information and exit"`
	EnvPrefix   string `default:"" help:"Prefix to use for environment variable lookup"`
}

type LabsIntegration

type LabsIntegration struct {
	BuildInfo    *BuildInfo
	App          *newrelic.Application
	Integration  *nriSdk.Integration
	Logger       *logrus.Logger
	Interval     time.Duration
	NrClient     *nrClient.NewRelic
	RunAsService bool
	DryRun       bool
	// contains filtered or unexported fields
}

func NewInfraIntegration

func NewInfraIntegration(
	buildInfo *BuildInfo,
	labsIntegrationOpts ...LabsIntegrationOpt,
) (*LabsIntegration, error)

func NewLambdaIntegration added in v1.3.1

func NewLambdaIntegration(
	buildInfo *BuildInfo,
	appName string,
	labsIntegrationOpts ...LabsIntegrationOpt,
) (*LabsIntegration, error)

func NewStandaloneIntegration

func NewStandaloneIntegration(
	buildInfo *BuildInfo,
	appName string,
	labsIntegrationOpts ...LabsIntegrationOpt,
) (*LabsIntegration, error)

func (*LabsIntegration) AddEvent added in v1.4.0

func (i *LabsIntegration) AddEvent(
	ctx context.Context,
	eventType string,
	attributes map[string]string,
) error

func (*LabsIntegration) AddPipeline

func (i *LabsIntegration) AddPipeline(p pipeline.Pipeline)

func (*LabsIntegration) GetApiKey

func (i *LabsIntegration) GetApiKey() string

func (*LabsIntegration) GetLicenseKey

func (i *LabsIntegration) GetLicenseKey() string

func (*LabsIntegration) GetRegion

func (i *LabsIntegration) GetRegion() region.Name

func (*LabsIntegration) Run

func (i *LabsIntegration) Run(ctx context.Context) error

func (*LabsIntegration) Shutdown

func (i *LabsIntegration) Shutdown(ctx context.Context)

type LabsIntegrationOpt

type LabsIntegrationOpt func(li *LabsIntegration) error

func WithAccountId

func WithAccountId() LabsIntegrationOpt

func WithApiKey

func WithApiKey() LabsIntegrationOpt

func WithClient

func WithClient() LabsIntegrationOpt

func WithEvents

func WithEvents(ctx context.Context) LabsIntegrationOpt

func WithInterval

func WithInterval(defaultInterval int) LabsIntegrationOpt

func WithLicenseKey

func WithLicenseKey() LabsIntegrationOpt

func WithLogs

func WithLogs(ctx context.Context) LabsIntegrationOpt

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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