Documentation ¶
Index ¶
- Constants
- Variables
- func ConvertKeyValueSliceToMap(kvSlice []*proxypb.KeyValue) map[string]interface{}
- type AuthInfo
- type BatchResponse
- type EnvironmentInfo
- type MockGRPCHealthWatchServer
- type Router
- func (r *Router) Check(ctx context.Context, req *grpc_health_v1.HealthCheckRequest) (*grpc_health_v1.HealthCheckResponse, error)
- func (r *Router) Export(ctx context.Context, req *coltracepb.ExportTraceServiceRequest) (*coltracepb.ExportTraceServiceResponse, error)
- func (r *Router) ExportLogTraceProxy(ctx context.Context, in *proxypb.ExportLogTraceProxyServiceRequest) (*proxypb.ExportTraceProxyServiceResponse, error)
- func (r *Router) ExportTraceProxy(ctx context.Context, in *proxypb.ExportTraceProxyServiceRequest) (*proxypb.ExportTraceProxyServiceResponse, 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) Status(context.Context, *proxypb.StatusRequest) (*proxypb.StatusResponse, error)
- func (r *Router) Stop() error
- func (r *Router) Watch(req *grpc_health_v1.HealthCheckRequest, ...) error
- type TeamInfo
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, convert.ErrInvalidContentType.Message, convert.ErrInvalidContentType.HTTPStatusCode, false, true} )
View Source
var ErrGenericMessage = "unexpected error!"
Functions ¶
func ConvertKeyValueSliceToMap ¶
ConvertKeyValueSliceToMap converts a slice of KeyValue messages to a map of string to interface{}
Types ¶
type AuthInfo ¶
type AuthInfo struct { APIKeyAccess map[string]bool `json:"api_key_access"` Team TeamInfo `json:"team"` Environment EnvironmentInfo `json:"environment"` }
type BatchResponse ¶
type EnvironmentInfo ¶
type MockGRPCHealthWatchServer ¶
type MockGRPCHealthWatchServer struct { grpc_health_v1.Health_WatchServer // contains filtered or unexported fields }
func (*MockGRPCHealthWatchServer) GetSentMessages ¶
func (m *MockGRPCHealthWatchServer) GetSentMessages() []*grpc_health_v1.HealthCheckResponse
func (*MockGRPCHealthWatchServer) Send ¶
func (m *MockGRPCHealthWatchServer) Send(msg *grpc_health_v1.HealthCheckResponse) error
type Router ¶
type Router struct { Config config.Config `inject:""` Proxy *proxy.Proxy `inject:"proxyConfig"` Logger logger.Logger `inject:""` 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 coltracepb.UnimplementedTraceServiceServer proxypb.TraceProxyServiceServer // contains filtered or unexported fields }
func (*Router) Check ¶
func (r *Router) Check(ctx context.Context, req *grpc_health_v1.HealthCheckRequest) (*grpc_health_v1.HealthCheckResponse, error)
func (*Router) Export ¶
func (r *Router) Export(ctx context.Context, req *coltracepb.ExportTraceServiceRequest) (*coltracepb.ExportTraceServiceResponse, error)
Export - processes requests from GRPC
func (*Router) ExportLogTraceProxy ¶
func (r *Router) ExportLogTraceProxy(ctx context.Context, in *proxypb.ExportLogTraceProxyServiceRequest) (*proxypb.ExportTraceProxyServiceResponse, error)
func (*Router) ExportTraceProxy ¶
func (r *Router) ExportTraceProxy(ctx context.Context, in *proxypb.ExportTraceProxyServiceRequest) (*proxypb.ExportTraceProxyServiceResponse, 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 ¶
func (*Router) SetVersion ¶
func (*Router) Status ¶
func (r *Router) Status(context.Context, *proxypb.StatusRequest) (*proxypb.StatusResponse, error)
func (*Router) Watch ¶
func (r *Router) Watch(req *grpc_health_v1.HealthCheckRequest, server grpc_health_v1.Health_WatchServer) error
Click to show internal directories.
Click to hide internal directories.