Documentation ¶
Index ¶
- Variables
- func NewWebsocketHandler(m <-chan []byte, keepAlive time.Duration, egressMetric *metricemitter.Counter) *websocketHandler
- type AdminAccessMiddleware
- type CORSMiddleware
- type CORSOption
- type DopplerProxy
- type FirehoseHandler
- type GrpcConnector
- type Health
- type HttpHandler
- type KeepAlive
- type LogAccessMiddleware
- type LogCacheClient
- type MetricClient
- type RecentLogsHandler
- type SetCookieHandler
- type StreamHandler
- type WebSocketServer
Constants ¶
This section is empty.
Variables ¶
View Source
var MetricsInterval = 15 * time.Second
Functions ¶
func NewWebsocketHandler ¶
func NewWebsocketHandler( m <-chan []byte, keepAlive time.Duration, egressMetric *metricemitter.Counter, ) *websocketHandler
Types ¶
type AdminAccessMiddleware ¶
type AdminAccessMiddleware struct {
// contains filtered or unexported fields
}
func NewAdminAccessMiddleware ¶
func NewAdminAccessMiddleware(a auth.AdminAccessAuthorizer) *AdminAccessMiddleware
type CORSMiddleware ¶
type CORSMiddleware struct{}
CORSMiddleware provides support for adding CORS headers to OPTIONS requests.
func NewCORSMiddleware ¶
func NewCORSMiddleware() *CORSMiddleware
NewCORSMiddleware is the constructor for CORSMiddleware.
func (CORSMiddleware) Wrap ¶
func (CORSMiddleware) Wrap(h http.Handler, opts ...CORSOption) http.Handler
Wrap appends CORS headers to all responses.
type CORSOption ¶
type CORSOption func(http.ResponseWriter)
CORSOption is the type of all configuration options.
func AllowCredentials ¶
func AllowCredentials() CORSOption
AllowCredentials enables credential sharing.
func AllowHeader ¶
func AllowHeader(header string) CORSOption
AllowHeader configures a single allowed header. For multiple headers, pass in a comma-space deliminated string, e.g., "header-a, header-b".
type DopplerProxy ¶
func NewDopplerProxy ¶
func NewDopplerProxy( logAuthorizer auth.LogAccessAuthorizer, adminAuthorizer auth.AdminAccessAuthorizer, grpcConn GrpcConnector, cookieDomain string, timeout time.Duration, slowConsumerTimeout time.Duration, m MetricClient, health Health, recentLogsHandler http.Handler, disableAccessControl bool, logCacheClient LogCacheClient, ) *DopplerProxy
type FirehoseHandler ¶
type FirehoseHandler struct {
// contains filtered or unexported fields
}
func NewFirehoseHandler ¶
func NewFirehoseHandler(grpcConn GrpcConnector, w *WebSocketServer, m MetricClient) *FirehoseHandler
func (*FirehoseHandler) Count ¶
func (h *FirehoseHandler) Count() int64
func (*FirehoseHandler) ServeHTTP ¶
func (h *FirehoseHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type GrpcConnector ¶
type HttpHandler ¶
type HttpHandler struct {
Messages <-chan []byte
}
func NewHttpHandler ¶
func NewHttpHandler(m <-chan []byte) *HttpHandler
func (*HttpHandler) ServeHTTP ¶
func (h *HttpHandler) ServeHTTP(rw http.ResponseWriter, r *http.Request)
type KeepAlive ¶
type KeepAlive struct {
// contains filtered or unexported fields
}
func NewKeepAlive ¶
type LogAccessMiddleware ¶
type LogAccessMiddleware struct {
// contains filtered or unexported fields
}
func NewLogAccessMiddleware ¶
func NewLogAccessMiddleware(authorize auth.LogAccessAuthorizer, disableAccessControl bool) *LogAccessMiddleware
type LogCacheClient ¶
type LogCacheClient interface { Read( ctx context.Context, sourceID string, start time.Time, opts ...logcache.ReadOption, ) ([]*loggregator_v2.Envelope, error) }
type MetricClient ¶
type MetricClient interface { NewCounter(name string, opts ...metricemitter.MetricOption) *metricemitter.Counter NewGauge(name string, unit string, opts ...metricemitter.MetricOption) *metricemitter.Gauge EmitEvent(title string, body string) }
type RecentLogsHandler ¶
type RecentLogsHandler struct {
// contains filtered or unexported fields
}
func NewRecentLogsHandler ¶
func NewRecentLogsHandler( recentLogProvider LogCacheClient, t time.Duration, m MetricClient, logCacheEnabled bool, ) *RecentLogsHandler
func (*RecentLogsHandler) ServeHTTP ¶
func (h *RecentLogsHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type SetCookieHandler ¶
type SetCookieHandler struct {
// contains filtered or unexported fields
}
func NewSetCookieHandler ¶
func NewSetCookieHandler(domain string) *SetCookieHandler
func (SetCookieHandler) ServeHTTP ¶
func (h SetCookieHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type StreamHandler ¶
type StreamHandler struct {
// contains filtered or unexported fields
}
func NewStreamHandler ¶
func NewStreamHandler(grpcConn GrpcConnector, w *WebSocketServer, m MetricClient) *StreamHandler
func (*StreamHandler) Count ¶
func (h *StreamHandler) Count() int64
func (*StreamHandler) ServeHTTP ¶
func (h *StreamHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type WebSocketServer ¶
type WebSocketServer struct {
// contains filtered or unexported fields
}
func NewWebSocketServer ¶
func NewWebSocketServer(slowConsumerTimeout time.Duration, m MetricClient, h Health) *WebSocketServer
func (*WebSocketServer) ServeWS ¶
func (s *WebSocketServer) ServeWS( w http.ResponseWriter, r *http.Request, recv func() ([]byte, error), egressMetric *metricemitter.Counter, )
Click to show internal directories.
Click to hide internal directories.