Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
APIHost string `json:"loggregator_api_host"`
APIPort int `json:"loggregator_api_port"`
CACertPath string `json:"loggregator_ca_path"`
CertPath string `json:"loggregator_cert_path"`
KeyPath string `json:"loggregator_key_path"`
JobDeployment string `json:"loggregator_job_deployment"`
JobName string `json:"loggregator_job_name"`
JobIndex string `json:"loggregator_job_index"`
JobIP string `json:"loggregator_job_ip"`
JobOrigin string `json:"loggregator_job_origin"`
SourceID string `json:"loggregator_source_id"`
InstanceID string `json:"loggregator_instance_id"`
BatchMaxSize uint `json:"loggregator_batch_max_size"`
BatchFlushInterval time.Duration
AppMetricExclusionFilter []string `json:"loggregator_app_metric_exclusion_filter"`
}
type ContainerMetric ¶
type ContainerMetric struct {
ApplicationId string //deprecated
InstanceIndex int32 //deprecated
CpuPercentage float64
CpuEntitlementPercentage float64
MemoryBytes uint64
DiskBytes uint64
MemoryBytesQuota uint64
DiskBytesQuota uint64
AbsoluteCPUUsage uint64
AbsoluteCPUEntitlement uint64
ContainerAge uint64
RxBytes *uint64
TxBytes *uint64
Tags map[string]string
}
A ContainerMetric records resource usage of an app in a container.
type IngressClient ¶
type IngressClient interface {
SendDuration(name string, value time.Duration, opts ...loggregator.EmitGaugeOption) error
SendMebiBytes(name string, value int, opts ...loggregator.EmitGaugeOption) error
SendMetric(name string, value int, opts ...loggregator.EmitGaugeOption) error
SendBytesPerSecond(name string, value float64) error
SendRequestsPerSecond(name string, value float64) error
IncrementCounter(name string) error
IncrementCounterWithDelta(name string, value uint64) error
SendAppLog(message, sourceType string, tags map[string]string) error
SendAppErrorLog(message, sourceType string, tags map[string]string) error
SendAppMetrics(metrics ContainerMetric) error
SendAppLogRate(rate, rateLimit float64, tags map[string]string) error
SendSpikeMetrics(metrics SpikeMetric) error
SendComponentMetric(name string, value float64, unit string) error
}
IngressClient is the shared contract between v1 and v2 clients.
func NewIngressClient ¶
func NewIngressClient(config Config) (IngressClient, error)
NewIngressClient returns a v2 client if the config.UseV2API is true, or a no op client.
func WrapClient ¶
func WrapClient(c logClient, s, i string, f []string) IngressClient
Click to show internal directories.
Click to hide internal directories.