Documentation
¶
Index ¶
- Constants
- type BindingCacheConfig
- type BrokerConfig
- type CfResponse
- type Config
- type ContextBind
- type ContextCF
- type ContextK8S
- type ContextKey
- type ContextProvision
- type DBConfig
- type DrainType
- type ForwarderConfig
- type InstanceParam
- type KeepAliveConfig
- type Label
- type LogConfig
- type LogMetadata
- type ParsingKey
- type Pattern
- type Patterns
- type ProvisionParams
- type SourceLabel
- type SourceLabels
- type SyslogAddress
- type SyslogAddresses
- type WebConfig
- type WebTLSConfig
Constants ¶
View Source
const ( PlatformCF = "cloudfoundry" PlatformK8s = "kubernetes" RevKey = "rev" EndOfLifeKey ContextKey = "end-of-life" DrainTypeKey = "drain-type" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BindingCacheConfig ¶
type BrokerConfig ¶
type CfResponse ¶
type CfResponse struct { Entity struct { Name string `json:"name"` } `json:"entity"` }
type Config ¶
type Config struct { Web WebConfig `cloud:"web"` Log LogConfig `cloud:"log"` SyslogAddresses []SyslogAddress `cloud:"syslog_addresses"` Broker BrokerConfig `cloud:"broker"` DB DBConfig `cloud:"db"` Forwarder ForwarderConfig `cloud:"forwarder"` BindingCache BindingCacheConfig `cloud:"binding_cache"` }
type ContextBind ¶
type ContextBind struct {
AppGUID string `json:"app_guid"`
}
type ContextK8S ¶
type ContextKey ¶
type ContextKey string
type ContextProvision ¶
type ContextProvision struct { ContextCF ContextK8S Platform string `json:"platform"` }
func (ContextProvision) IsCloudFoundry ¶
func (c ContextProvision) IsCloudFoundry() bool
func (ContextProvision) IsKubernetes ¶
func (c ContextProvision) IsKubernetes() bool
type DBConfig ¶
type DBConfig struct { CnxMaxIdle int `cloud:"cnx_max_idle" cloud-default:"20"` CnxMaxOpen int `cloud:"cnx_max_open" cloud-default:"100"` CnxMaxLife string `cloud:"cnx_max_life" cloud-default:"1h"` SQLiteFallback bool `cloud:"sqlite_fallback"` SQLitePath string `cloud:"sqlite_path" cloud-default:"loghostsvc.db"` }
type ForwarderConfig ¶
type ForwarderConfig struct { AllowedHosts []string `cloud:"allowed_hosts"` ParsingKeys []ParsingKey `cloud:"parsing_keys"` IgnoreTagsStructuredData bool `cloud:"ignore_tags_structured_data"` }
type InstanceParam ¶
type InstanceParam struct { InstanceID string `gorm:"primary_key"` Revision int `gorm:"primary_key;auto_increment:false"` SpaceID string OrgID string Namespace string SyslogName string CompanyID string UseTls bool DrainType DrainType Patterns []Pattern `gorm:"foreignkey:InstanceID"` Tags []Label `gorm:"foreignkey:InstanceID"` SourceLabels []SourceLabel `gorm:"foreignkey:InstanceID"` }
func (*InstanceParam) BeforeDelete ¶
func (d *InstanceParam) BeforeDelete(tx *gorm.DB) (err error)
func (*InstanceParam) TagsToMap ¶
func (d *InstanceParam) TagsToMap() map[string]string
type KeepAliveConfig ¶
type KeepAliveConfig struct { Disabled bool `cloud:"disabled"` Duration string `cloud:"duration" cloud-default:"4m"` Fuzziness string `cloud:"fuzziness" cloud-default:"1m"` // contains filtered or unexported fields }
func (*KeepAliveConfig) GetDuration ¶
func (f *KeepAliveConfig) GetDuration() *time.Duration
func (*KeepAliveConfig) GetFuzziness ¶
func (f *KeepAliveConfig) GetFuzziness() *time.Duration
type Label ¶
type Label struct { ID uint `gorm:"primary_key;auto_increment"` Key string Value string `gorm:"size:600"` InstanceID string }
func MapToLabels ¶
type LogMetadata ¶
type LogMetadata struct { BindingID string `gorm:"primary_key"` InstanceParam InstanceParam `gorm:"foreignkey:InstanceID;association_foreignkey:InstanceID"` InstanceID string AppID string }
type ParsingKey ¶
type Pattern ¶
type Pattern struct { ID uint `gorm:"primary_key;auto_increment"` Pattern string `gorm:"size:2550"` InstanceID string }
func ListToPatterns ¶
type ProvisionParams ¶
type SourceLabel ¶
type SourceLabel struct { ID uint `gorm:"primary_key;auto_increment"` Key string Value string `gorm:"size:600"` InstanceID string }
func MapToSourceLabels ¶
func MapToSourceLabels(m map[string]string) []SourceLabel
type SourceLabels ¶
type SourceLabels []SourceLabel
func (SourceLabels) ToMap ¶
func (labels SourceLabels) ToMap() map[string]string
type SyslogAddress ¶
type SyslogAddress struct { ID string `cloud:"id"` Name string `cloud:"name"` CompanyID string `cloud:"company_id"` Description string `cloud:"description"` DefaultDrainType DrainType `cloud:"default_drain_type"` URLs []string `cloud:"urls"` Bullets []string `cloud:"bullets"` Patterns []string `cloud:"patterns"` Tags map[string]string `cloud:"tags"` SourceLabels map[string]string `cloud:"source_labels"` }
func (SyslogAddress) ToServicePlan ¶
func (a SyslogAddress) ToServicePlan() domain.ServicePlan
type SyslogAddresses ¶
type SyslogAddresses []SyslogAddress
func (SyslogAddresses) FoundSyslogWriter ¶
func (a SyslogAddresses) FoundSyslogWriter(planIDOrName string) (SyslogAddress, error)
func (SyslogAddresses) ToServicePlans ¶
func (a SyslogAddresses) ToServicePlans() []domain.ServicePlan
type WebConfig ¶
type WebConfig struct { Port int `cloud:"port"` MaxKeepAlive KeepAliveConfig `cloud:"max_keep_alive"` TLS WebTLSConfig `cloud:"tls"` }
type WebTLSConfig ¶
Click to show internal directories.
Click to hide internal directories.