add ability to register RPC endpoint
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
@@ -110,3 +110,10 @@ func ContentTypeHandler(ct string, h http.HandlerFunc) server.Option {
|
||||
o.Context = context.WithValue(o.Context, contentTypeHandlerKey{}, v)
|
||||
}
|
||||
}
|
||||
|
||||
type registerRPCHandlerKey struct{}
|
||||
|
||||
// RegisterRPCHandler registers compatibility endpoints with /ServiceName.ServiceEndpoint method POST
|
||||
func RegisterRPCHandler(b bool) server.Option {
|
||||
return server.SetOption(registerRPCHandlerKey{}, b)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user