Documentation
¶
Overview ¶
loggregator provides a top-level client for connecting to the loggregator v1 and v2 API's.
All members in the package here are deprecated and will be removed in the next major version of this library. Instead, see the v1 and v2 packages for the preferred way of connecting to the respective loggregator API.
Index ¶
- type Configdeprecated
- type IngressClientdeprecated
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config
deprecated
type Config struct {
UseV2API bool `json:"loggregator_use_v2_api"`
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"`
BatchMaxSize uint
BatchFlushInterval time.Duration
}
Config is the shared configuration between v1 and v2 clients.
Deprecated: Config will be removed in the next major version. Instead, create a v1 or v2 client directly.
type IngressClient
deprecated
type IngressClient interface {
SendDuration(name string, value time.Duration) error
SendMebiBytes(name string, value int) error
SendMetric(name string, value int) error
SendBytesPerSecond(name string, value float64) error
SendRequestsPerSecond(name string, value float64) error
IncrementCounter(name string) error
IncrementCounterWithDelta(name string, value uint64) error
SendAppLog(appID, message, sourceType, sourceInstance string) error
SendAppErrorLog(appID, message, sourceType, sourceInstance string) error
SendAppMetrics(metrics *events.ContainerMetric) error
SendComponentMetric(name string, value float64, unit string) error
}
IngressClient is the shared contract between v1 and v2 clients.
Deprecated: This interface will be removed in the next major version. Instead, use the v1 or v2 clients directly.
func NewIngressClient
deprecated
func NewIngressClient(config Config) (IngressClient, error)
NewIngressClient returns a v1 or v2 client depending on the value of `UseV2API` from the config
Deprecated: NewIngressClient will be removed in the next major version. Instead, create a v1 or v2 client directly.
func NewV1IngressClient
deprecated
func NewV1IngressClient(config Config) (IngressClient, error)
NewV1IngressClient creates a V1 connection to the Loggregator API.
Deprecated: NewV1IngressClient will be removed in the next major version. Instead, use v1.NewIngressClient.
func NewV2IngressClient
deprecated
func NewV2IngressClient(config Config) (IngressClient, error)
NewV2IngressClient creates a V2 connection to the Loggregator API.
Deprecated: NewV2IngressClient will be removed in the next major version. Instead, use v2.NewIngressClient.