beater

package
v6.1.2+incompatible Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2018 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BackendTransactionsURL  = "/v1/transactions"
	FrontendTransactionsURL = "/v1/client-side/transactions"
	BackendErrorsURL        = "/v1/errors"
	FrontendErrorsURL       = "/v1/client-side/errors"
	HealthCheckURL          = "/healthcheck"
)

Variables

View Source
var (
	Routes = map[string]routeMapping{
		BackendTransactionsURL:  {backendHandler, transaction.NewProcessor},
		FrontendTransactionsURL: {frontendHandler, transaction.NewProcessor},
		BackendErrorsURL:        {backendHandler, err.NewProcessor},
		FrontendErrorsURL:       {frontendHandler, err.NewProcessor},
		HealthCheckURL:          {healthCheckHandler, healthcheck.NewProcessor},
	}
)

Functions

func New

func New(_ *beat.Beat, ucfg *common.Config) (beat.Beater, error)

Creates beater

Types

type Config

type Config struct {
	Host               string          `config:"host"`
	MaxUnzippedSize    int64           `config:"max_unzipped_size"`
	MaxHeaderBytes     int             `config:"max_header_bytes"`
	ReadTimeout        time.Duration   `config:"read_timeout"`
	WriteTimeout       time.Duration   `config:"write_timeout"`
	ShutdownTimeout    time.Duration   `config:"shutdown_timeout"`
	SecretToken        string          `config:"secret_token"`
	SSL                *SSLConfig      `config:"ssl"`
	ConcurrentRequests int             `config:"concurrent_requests" validate:"min=1"`
	Frontend           *FrontendConfig `config:"frontend"`
}

type FrontendConfig

type FrontendConfig struct {
	Enabled      *bool    `config:"enabled"`
	RateLimit    int      `config:"rate_limit"`
	AllowOrigins []string `config:"allow_origins"`
}

type ProcessorFactory

type ProcessorFactory func() processor.Processor

type ProcessorHandler

type ProcessorHandler func(ProcessorFactory, Config, reporter) http.Handler

type SSLConfig

type SSLConfig struct {
	Enabled    *bool  `config:"enabled"`
	PrivateKey string `config:"key"`
	Cert       string `config:"certificate"`
}

Jump to

Keyboard shortcuts

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