Documentation ¶
Index ¶
- Constants
- Variables
- func SpanContextFromRequest(req *fasthttp.Request) (sc trace.SpanContext, ok bool)
- func SpanContextFromW3CString(h string) (sc trace.SpanContext, ok bool)
- func TraceStateFromW3CString(h string) *trace.TraceState
- func UpdateSpanStatusFromHTTPStatus(span trace.Span, code int)
- type AuthServer
- type CORS
- type CertProviderConfig
- type ClaimRoleMap
- type HttpBinding
- type HttpBindingConfig
- type JWT
- type Log
- type Metrics
- type Middleware
- type MiddlewareConfig
- type Pipeline
- type Policy
- type Telemetry
- type Tracing
- type Trail
Constants ¶
View Source
const ( // AuthServerKuberenetes means we are using kubernetes api server as auth server AuthServerKuberenetes AuthServer = "kubernetes" SymphonyIssuer string = "symphony" )
Variables ¶
View Source
var (
ApiOperationMetrics *http.Metrics
)
Functions ¶
func SpanContextFromRequest ¶
func SpanContextFromRequest(req *fasthttp.Request) (sc trace.SpanContext, ok bool)
func SpanContextFromW3CString ¶
func SpanContextFromW3CString(h string) (sc trace.SpanContext, ok bool)
func TraceStateFromW3CString ¶
func TraceStateFromW3CString(h string) *trace.TraceState
Types ¶
type CORS ¶
type CORS struct {
Properties map[string]interface{}
}
func (CORS) CORS ¶
func (c CORS) CORS(next fasthttp.RequestHandler) fasthttp.RequestHandler
CORS middleware to allow CORS. The middleware doesn't override existing headers in incoming requests
type CertProviderConfig ¶
type CertProviderConfig struct { Type string `json:"type"` Config providers.IProviderConfig `json:"config"` }
type ClaimRoleMap ¶
type HttpBinding ¶
type HttpBinding struct { CertProvider certs.ICertProvider // contains filtered or unexported fields }
HttpBinding provides service endpoints as a fasthttp web server
func (*HttpBinding) Launch ¶
func (h *HttpBinding) Launch(config HttpBindingConfig, endpoints []v1alpha2.Endpoint, pubsubProvider pubsub.IPubSubProvider) error
Launch fasthttp server
type HttpBindingConfig ¶
type HttpBindingConfig struct { Port int `json:"port"` Pipeline []MiddlewareConfig `json:"pipeline"` TLS bool `json:"tls"` CertProvider CertProviderConfig `json:"certProvider"` }
HttpBindingConfig configures a HttpBinding.
type JWT ¶
type JWT struct { AuthHeader string `json:"authHeader"` VerifyKey string `json:"verifyKey"` MustHave []string `json:"mustHave,omitempty"` MustMatch map[string]interface{} `json:"mustMatch,omitempty"` AuthServer AuthServer `json:"authServer,omitempty"` IgnorePaths []string `json:"ignorePaths,omitempty"` Roles []ClaimRoleMap `json:"roles,omitempty"` EnableRBAC bool `json:"enableRBAC,omitempty"` Policy map[string]Policy `json:"policy,omitempty"` // contains filtered or unexported fields }
func (JWT) JWT ¶
func (j JWT) JWT(next fasthttp.RequestHandler) fasthttp.RequestHandler
type Log ¶
type Log struct {
Observability observability.Observability
}
func (Log) Log ¶
func (l Log) Log(next fasthttp.RequestHandler) fasthttp.RequestHandler
type Metrics ¶
type Metrics struct {
Observability observability.Observability
}
func (Metrics) Metrics ¶
func (m Metrics) Metrics(next fasthttp.RequestHandler) fasthttp.RequestHandler
type Middleware ¶
type Middleware func(h fasthttp.RequestHandler) fasthttp.RequestHandler
type MiddlewareConfig ¶
type MiddlewareConfig struct { Type string `json:"type"` Properties map[string]interface{} `json:"properties"` }
MiddlewareConfig configures a HTTP middleware.
type Pipeline ¶
type Pipeline struct { Handlers []Middleware Terminators []v1alpha2.Terminable }
func BuildPipeline ¶
func BuildPipeline(config HttpBindingConfig, pubsubProvider pubsub.IPubSubProvider) (Pipeline, error)
func (Pipeline) Apply ¶
func (p Pipeline) Apply(handler fasthttp.RequestHandler) fasthttp.RequestHandler
type Telemetry ¶
type Telemetry struct {
Properties map[string]interface{}
}
func (Telemetry) Telemetry ¶
func (c Telemetry) Telemetry(next fasthttp.RequestHandler) fasthttp.RequestHandler
CORS middleware to allow CORS. The middleware doesn't override existing headers in incoming requests
type Tracing ¶
type Tracing struct { Observability observability.Observability Buffer *v1alpha2.SafeBuffer // this is not used but should be a thread safe buffer }
func (Tracing) Tracing ¶
func (t Tracing) Tracing(next fasthttp.RequestHandler) fasthttp.RequestHandler
type Trail ¶
type Trail struct {
PubSubProvider pubsub.IPubSubProvider
}
func (*Trail) SetPubSubProvider ¶
func (j *Trail) SetPubSubProvider(provider pubsub.IPubSubProvider)
func (Trail) Trail ¶
func (j Trail) Trail(next fasthttp.RequestHandler) fasthttp.RequestHandler
Source Files ¶
Click to show internal directories.
Click to hide internal directories.