mcp: incorporate EventStore into StreamableServerTransport (#156)
Use the EventStore interface to implement resumption on the server side.
This commit is contained in:
parent
4529904c7a
commit
ea6162ca1c
1 changed files with 128 additions and 133 deletions
|
|
@ -85,9 +85,11 @@ func NewServer(impl *Implementation, opts *ServerOptions) *Server {
|
|||
if opts.PageSize < 0 {
|
||||
panic(fmt.Errorf("invalid page size %d", opts.PageSize))
|
||||
}
|
||||
// TODO(jba): don't modify opts, modify Server.opts.
|
||||
if opts.PageSize == 0 {
|
||||
opts.PageSize = DefaultPageSize
|
||||
}
|
||||
|
||||
return &Server{
|
||||
impl: impl,
|
||||
opts: *opts,
|
||||
|
|
|
|||
Loading…
Reference in a new issue