agent

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2020 License: Apache-2.0 Imports: 39 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Agent

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

func NewAgent

func NewAgent(options ...Option) (*Agent, error)

Creates a new Scope Agent instance

func (*Agent) Flush

func (a *Agent) Flush()

Flush agent buffer

func (*Agent) Logger

func (a *Agent) Logger() *log.Logger

func (*Agent) PrintReport

func (a *Agent) PrintReport()

func (*Agent) Run added in v0.1.7

func (a *Agent) Run(m *testing.M) int

Runs the test suite

func (*Agent) Stop

func (a *Agent) Stop()

Stops the agent

func (*Agent) Tracer

func (a *Agent) Tracer() opentracing.Tracer

type Config

type Config struct {
	CurrentProfile string             `json:"currentProfile"`
	Profiles       map[string]Profile `json:"profiles"`
}

func GetConfig

func GetConfig() *Config

type DiffFileItem

type DiffFileItem struct {
	Path         string  `json:"path" msgpack:"path"`
	Added        int     `json:"added" msgpack:"added"`
	Removed      int     `json:"removed" msgpack:"removed"`
	Status       string  `json:"status" msgpack:"status"`
	PreviousPath *string `json:"previousPath" msgpack:"previousPath"`
}

type GitData

type GitData struct {
	Repository string
	Commit     string
	SourceRoot string
	Branch     string
}

type GitDiff

type GitDiff struct {
	Type    string         `json:"type" msgpack:"type"`
	Version string         `json:"version" msgpack:"version"`
	Uuid    string         `json:"uuid" msgpack:"uuid"`
	Files   []DiffFileItem `json:"files" msgpack:"files"`
}

type Option

type Option func(*Agent)

func WithAgentType

func WithAgentType(agentType string) Option

func WithApiEndpoint

func WithApiEndpoint(apiEndpoint string) Option

func WithApiKey

func WithApiKey(apiKey string) Option

func WithConfiguration added in v0.1.6

func WithConfiguration(values map[string]interface{}) Option

func WithConfigurationKeys added in v0.1.6

func WithConfigurationKeys(keys []string) Option

func WithDebugEnabled

func WithDebugEnabled() Option

func WithGitInfo

func WithGitInfo(repository string, commitSha string, sourceRoot string) Option

func WithGlobalPanicHandler added in v0.1.15

func WithGlobalPanicHandler() Option

func WithHandlePanicAsFail added in v0.1.7

func WithHandlePanicAsFail() Option

func WithMetadata

func WithMetadata(values map[string]interface{}) Option

func WithRecorders added in v0.1.12

func WithRecorders(recorders ...tracer.SpanRecorder) Option

func WithRetriesOnFail added in v0.1.7

func WithRetriesOnFail(retriesCount int) Option

func WithServiceName

func WithServiceName(service string) Option

func WithSetGlobalTracer

func WithSetGlobalTracer() Option

func WithTestingModeEnabled

func WithTestingModeEnabled() Option

func WithUserAgent

func WithUserAgent(userAgent string) Option

type PayloadEvent added in v0.1.13

type PayloadEvent map[string]interface{}

type PayloadSpan added in v0.1.13

type PayloadSpan map[string]interface{}

type Profile

type Profile struct {
	ApiEndpoint string `json:"apiEndpoint"`
	ApiKey      string `json:"apiKey"`
	OAuthToken  string `json:"oauthToken"`
}

func GetConfigCurrentProfile

func GetConfigCurrentProfile() *Profile

type RecorderStats added in v0.1.10

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

type SpanRecorder

type SpanRecorder struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func NewSpanRecorder

func NewSpanRecorder(agent *Agent) *SpanRecorder

func (*SpanRecorder) Flush added in v0.1.13

func (r *SpanRecorder) Flush() error

Flush recorder

func (*SpanRecorder) RecordSpan

func (r *SpanRecorder) RecordSpan(span tracer.RawSpan)

Appends a span to the in-memory buffer for async processing

func (*SpanRecorder) Stop added in v0.1.10

func (r *SpanRecorder) Stop()

Stop recorder

Jump to

Keyboard shortcuts

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