Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NewHandler ¶
NewHandler is a function that creates a new Handler
type Notifier ¶
type Notifier interface {
Notify(ctx context.Context, notification *jsonrpc.Notification) error
}
Notifier represents a notification handler
type RoundTrip ¶
type RoundTrip struct {
Request *jsonrpc.Request
Response *jsonrpc.Response
// contains filtered or unexported fields
}
RoundTrip represents a trip
func NewRoundTrip ¶
NewRoundTrip creates a new round trip
func (*RoundTrip) SetResponse ¶
SetResponse sets the response
type RoundTrips ¶
type RoundTrips struct {
Ring []*RoundTrip
// contains filtered or unexported fields
}
RoundTrips represents a collection of trips
func NewRoundTrips ¶
func NewRoundTrips(capacity int) *RoundTrips
NewRoundTrips creates a new round trips
func (*RoundTrips) Add ¶
func (r *RoundTrips) Add(request *jsonrpc.Request) (*RoundTrip, error)
Add adds a new trip
func (*RoundTrips) CloseWithError ¶
func (r *RoundTrips) CloseWithError(err error)
CloseWithError closes trips with error
func (*RoundTrips) Get ¶
func (r *RoundTrips) Get(index int) *RoundTrip
Get returns the trip at the given index
Click to show internal directories.
Click to hide internal directories.