Documentation
¶
Index ¶
- Variables
- type ConnectWebServer
- type ContentTypeInterceptor
- func (i ContentTypeInterceptor) WrapStreamingClient(next connect.StreamingClientFunc) connect.StreamingClientFunc
- func (i ContentTypeInterceptor) WrapStreamingHandler(next connect.StreamingHandlerFunc) connect.StreamingHandlerFunc
- func (i ContentTypeInterceptor) WrapUnary(next connect.UnaryFunc) connect.UnaryFunc
- type ErrorsInterceptor
- func (i *ErrorsInterceptor) WrapStreamingClient(next connect.StreamingClientFunc) connect.StreamingClientFunc
- func (i *ErrorsInterceptor) WrapStreamingHandler(next connect.StreamingHandlerFunc) connect.StreamingHandlerFunc
- func (i *ErrorsInterceptor) WrapUnary(next connect.UnaryFunc) connect.UnaryFunc
- type HandlerGetter
- type HealthGRPCHandler
- type Option
Constants ¶
This section is empty.
Variables ¶
View Source
var InternalErrorMessage = "Unexpected error. Please try later."
Functions ¶
This section is empty.
Types ¶
type ConnectWebServer ¶
func New ¶
func New(handlerGetters []HandlerGetter, opts ...server.Option) *ConnectWebServer
func (*ConnectWebServer) Launch ¶
func (s *ConnectWebServer) Launch(serverListenerAddress string)
Launch should be run in a go func(), watch for termination by waiting on IsTerminating() channel
type ContentTypeInterceptor ¶
type ContentTypeInterceptor struct {
// contains filtered or unexported fields
}
func (ContentTypeInterceptor) WrapStreamingClient ¶
func (i ContentTypeInterceptor) WrapStreamingClient(next connect.StreamingClientFunc) connect.StreamingClientFunc
Noop
func (ContentTypeInterceptor) WrapStreamingHandler ¶
func (i ContentTypeInterceptor) WrapStreamingHandler(next connect.StreamingHandlerFunc) connect.StreamingHandlerFunc
type ErrorsInterceptor ¶
type ErrorsInterceptor struct {
// contains filtered or unexported fields
}
func NewErrorsInterceptor ¶
func NewErrorsInterceptor(fallbackLogger *zap.Logger, options ...Option) *ErrorsInterceptor
func (*ErrorsInterceptor) WrapStreamingClient ¶
func (i *ErrorsInterceptor) WrapStreamingClient(next connect.StreamingClientFunc) connect.StreamingClientFunc
func (*ErrorsInterceptor) WrapStreamingHandler ¶
func (i *ErrorsInterceptor) WrapStreamingHandler(next connect.StreamingHandlerFunc) connect.StreamingHandlerFunc
type HandlerGetter ¶
type HandlerGetter func(opts ...connect.HandlerOption) (string, http.Handler)
type HealthGRPCHandler ¶
type HealthGRPCHandler struct {
// contains filtered or unexported fields
}
func NewHealthGRPCHandler ¶
func NewHealthGRPCHandler(check server.HealthCheck) *HealthGRPCHandler
func (HealthGRPCHandler) Check ¶
func (c HealthGRPCHandler) Check(ctx context.Context, req *connect.Request[grpc_health_v1.HealthCheckRequest]) (*connect.Response[grpc_health_v1.HealthCheckResponse], error)
func (HealthGRPCHandler) Watch ¶
func (c HealthGRPCHandler) Watch(ctx context.Context, req *connect.Request[grpc_health_v1.HealthCheckRequest], stream *connect.ServerStream[grpc_health_v1.HealthCheckResponse]) error
Click to show internal directories.
Click to hide internal directories.