Documentation ¶
Index ¶
- Constants
- Variables
- type AuthInfo
- type BatchResponse
- type Router
- func (router *Router) Export(ctx context.Context, req *collectortrace.ExportTraceServiceRequest) (*collectortrace.ExportTraceServiceResponse, error)
- func (r *Router) LnS(incomingOrPeer string)
- func (r *Router) SetEnvironmentCache(ttl time.Duration, getFn func(string) (string, error))
- func (r *Router) SetVersion(ver string)
- func (r *Router) Stop() error
- type SlugInfo
Constants ¶
View Source
const (
GRPCMessageSizeMax int = 5000000 // 5MB
)
Variables ¶
View Source
var ( ErrCaughtPanic = handlerError{nil, "caught panic", http.StatusInternalServerError, false, false} ErrJSONFailed = handlerError{nil, "failed to parse JSON", http.StatusBadRequest, false, true} ErrJSONBuildFailed = handlerError{nil, "failed to build JSON response", http.StatusInternalServerError, false, true} ErrPostBody = handlerError{nil, "failed to read request body", http.StatusInternalServerError, false, false} ErrAuthNeeded = handlerError{nil, "unknown API key - check your credentials", http.StatusBadRequest, true, true} ErrConfigReadFailed = handlerError{nil, "failed to read config", http.StatusBadRequest, false, false} ErrUpstreamFailed = handlerError{nil, "failed to create upstream request", http.StatusServiceUnavailable, true, true} ErrReqToEvent = handlerError{nil, "failed to parse event", http.StatusBadRequest, false, true} ErrBatchToEvent = handlerError{nil, "failed to parse event within batch", http.StatusBadRequest, false, true} ErrInvalidContentType = handlerError{nil, husky.ErrInvalidContentType.Message, husky.ErrInvalidContentType.HTTPStatusCode, false, true} )
View Source
var ErrGenericMessage = "unexpected error!"
Functions ¶
This section is empty.
Types ¶
type BatchResponse ¶
type Router ¶
type Router struct { Config config.Config `inject:""` Logger logger.Logger `inject:""` HTTPTransport *http.Transport `inject:"upstreamTransport"` UpstreamTransmission transmit.Transmission `inject:"upstreamTransmission"` PeerTransmission transmit.Transmission `inject:"peerTransmission"` Sharder sharder.Sharder `inject:""` Collector collect.Collector `inject:""` Metrics metrics.Metrics `inject:"metrics"` // used to identify Router as a OTLP TraceServer collectortrace.UnimplementedTraceServiceServer // contains filtered or unexported fields }
func (*Router) Export ¶ added in v0.16.0
func (router *Router) Export(ctx context.Context, req *collectortrace.ExportTraceServiceRequest) (*collectortrace.ExportTraceServiceResponse, error)
func (*Router) LnS ¶
LnS spins up the Listen and Serve portion of the router. A router is initialized as being for either incoming traffic from clients or traffic from a peer. They listen on different addresses so peer traffic can be prioritized.
func (*Router) SetEnvironmentCache ¶ added in v1.11.0
func (*Router) SetVersion ¶
Click to show internal directories.
Click to hide internal directories.