Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New(ctx context.Context, rwc io.ReadWriteCloser, handler HandlerFunc) *jsonrpc2.Conn
func NewWithOptions ¶ added in v0.37.0
func NewWithOptions(ctx context.Context, rwc io.ReadWriteCloser, handler HandlerFunc, opts *Options) *jsonrpc2.Conn
Types ¶
type HandlerFunc ¶
type LoggingConfig ¶
type LoggingConfig struct {
Logger *log.Logger
// IncludeMethods is a list of methods to include in the request log.
// If empty, all methods are included. IncludeMethods takes precedence
// over ExcludeMethods.
IncludeMethods []string
// ExcludeMethods is a list of methods to exclude from the request log.
ExcludeMethods []string
LogInbound bool
LogOutbound bool
}
func (*LoggingConfig) ShouldLog ¶
func (cfg *LoggingConfig) ShouldLog(method string) bool
type Options ¶
type Options struct {
LoggingConfig LoggingConfig
}
Click to show internal directories.
Click to hide internal directories.