Documentation ¶
Overview ¶
Package interceptors provides the interceptors for RPC.
Index ¶
- Constants
- Variables
- type AdminServiceInterceptor
- func (i *AdminServiceInterceptor) WrapStreamingClient(next connect.StreamingClientFunc) connect.StreamingClientFunc
- func (i *AdminServiceInterceptor) WrapStreamingHandler(next connect.StreamingHandlerFunc) connect.StreamingHandlerFunc
- func (i *AdminServiceInterceptor) WrapUnary(next connect.UnaryFunc) connect.UnaryFunc
- type DefaultInterceptor
- func (i *DefaultInterceptor) WrapStreamingClient(next connect.StreamingClientFunc) connect.StreamingClientFunc
- func (i *DefaultInterceptor) WrapStreamingHandler(next connect.StreamingHandlerFunc) connect.StreamingHandlerFunc
- func (i *DefaultInterceptor) WrapUnary(next connect.UnaryFunc) connect.UnaryFunc
- type YorkieServiceInterceptor
- func (i *YorkieServiceInterceptor) WrapStreamingClient(next connect.StreamingClientFunc) connect.StreamingClientFunc
- func (i *YorkieServiceInterceptor) WrapStreamingHandler(next connect.StreamingHandlerFunc) connect.StreamingHandlerFunc
- func (i *YorkieServiceInterceptor) WrapUnary(next connect.UnaryFunc) connect.UnaryFunc
Constants ¶
const ( // SlowThreshold is the threshold for slow RPC. SlowThreshold = 100 * gotime.Millisecond )
Variables ¶
var ErrUnauthenticated = errors.New("authorization is not provided")
ErrUnauthenticated is returned when authentication is failed.
Functions ¶
This section is empty.
Types ¶
type AdminServiceInterceptor ¶ added in v0.4.25
type AdminServiceInterceptor struct {
// contains filtered or unexported fields
}
AdminServiceInterceptor is an interceptor for building additional context and handling authentication for AdminService.
func NewAdminServiceInterceptor ¶ added in v0.4.25
func NewAdminServiceInterceptor(be *backend.Backend, tokenManager *auth.TokenManager) *AdminServiceInterceptor
NewAdminServiceInterceptor creates a new instance of AdminServiceInterceptor.
func (*AdminServiceInterceptor) WrapStreamingClient ¶ added in v0.4.25
func (i *AdminServiceInterceptor) WrapStreamingClient(next connect.StreamingClientFunc) connect.StreamingClientFunc
WrapStreamingClient creates a stream client interceptor for authentication.
func (*AdminServiceInterceptor) WrapStreamingHandler ¶ added in v0.4.25
func (i *AdminServiceInterceptor) WrapStreamingHandler(next connect.StreamingHandlerFunc) connect.StreamingHandlerFunc
WrapStreamingHandler creates a stream server interceptor for authentication.
type DefaultInterceptor ¶
type DefaultInterceptor struct{}
DefaultInterceptor is an interceptor for common RPC.
func NewDefaultInterceptor ¶
func NewDefaultInterceptor() *DefaultInterceptor
NewDefaultInterceptor creates a new instance of DefaultInterceptor.
func (*DefaultInterceptor) WrapStreamingClient ¶ added in v0.4.11
func (i *DefaultInterceptor) WrapStreamingClient(next connect.StreamingClientFunc) connect.StreamingClientFunc
WrapStreamingClient creates a stream client interceptor for default.
func (*DefaultInterceptor) WrapStreamingHandler ¶ added in v0.4.11
func (i *DefaultInterceptor) WrapStreamingHandler(next connect.StreamingHandlerFunc) connect.StreamingHandlerFunc
WrapStreamingHandler creates a stream server interceptor for default.
type YorkieServiceInterceptor ¶ added in v0.4.25
type YorkieServiceInterceptor struct {
// contains filtered or unexported fields
}
YorkieServiceInterceptor is an interceptor for building additional context and handling authentication for YorkieService.
func NewYorkieServiceInterceptor ¶ added in v0.4.25
func NewYorkieServiceInterceptor(be *backend.Backend) *YorkieServiceInterceptor
NewYorkieServiceInterceptor creates a new instance of YorkieServiceInterceptor.
func (*YorkieServiceInterceptor) WrapStreamingClient ¶ added in v0.4.25
func (i *YorkieServiceInterceptor) WrapStreamingClient(next connect.StreamingClientFunc) connect.StreamingClientFunc
WrapStreamingClient creates a stream client interceptor for building additional context.
func (*YorkieServiceInterceptor) WrapStreamingHandler ¶ added in v0.4.25
func (i *YorkieServiceInterceptor) WrapStreamingHandler( next connect.StreamingHandlerFunc, ) connect.StreamingHandlerFunc
WrapStreamingHandler creates a stream server interceptor for building additional context.