agent

package
v1.3000030.2 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AllowAllOperations = "*"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type OperationsFilter

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

func NewOperationsFilter

func NewOperationsFilter(operations ...string) OperationsFilter

func (OperationsFilter) IsAllowed

func (of OperationsFilter) IsAllowed(operationName string) bool

type Stats

type Stats struct {
	CpuPercent                *float64 `json:"cpu,omitempty"`
	MemoryBytes               *uint64  `json:"mem,omitempty"`
	FileDescriptorCount       *int32   `json:"fd,omitempty"`
	ThreadCount               *int32   `json:"th,omitempty"`
	LatencyMillis             *int64   `json:"lat,omitempty"`
	PayloadBytes              *int     `json:"load,omitempty"`
	StatusCode                *int     `json:"code,omitempty"`
	SharedConfigFallback      *int     `json:"scfb,omitempty"`
	ImdsFallbackSucceed       *int     `json:"ifs,omitempty"`
	AppSignals                *int     `json:"as,omitempty"`
	EnhancedContainerInsights *int     `json:"eci,omitempty"`
	RunningInContainer        *int     `json:"ric,omitempty"`
	RegionType                *string  `json:"rt,omitempty"`
	Mode                      *string  `json:"m,omitempty"`
}

func (*Stats) Marshal

func (s *Stats) Marshal() (string, error)

func (*Stats) Merge

func (s *Stats) Merge(other Stats)

Merge the other Stats into the current. If the field is not nil, then it'll overwrite the existing one.

type StatsConfig

type StatsConfig struct {
	// Operations are the allowed operation names to gather stats for.
	Operations []string `mapstructure:"operations,omitempty"`
}

type StatsProvider

type StatsProvider interface {
	Stats(operation string) Stats
}

Jump to

Keyboard shortcuts

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