Versions in this module Expand all Collapse all v0 v0.6.0 Dec 4, 2026 v0.5.0 Dec 2, 2026 Changes in this version + const ContractName + const MaxBatchBytes + const MaxItems + func CloseMethod() author.Method[CloseRequest, Empty] + func Contract() plugin.ContractRef + func OpenMethod() author.Method[OpenRequest, OpenResponse] + func ReadMethod() author.Method[ReadRequest, Batch] + type Batch struct + Done bool + Items []json.RawMessage + type Client struct + func Open(ctx context.Context, caller author.Caller, parameters json.RawMessage) (*Client, error) + func (c *Client) Close(ctx context.Context) error + func (c *Client) Read(ctx context.Context, limit int) (Batch, error) + type CloseRequest struct + ID string + type Empty struct + type OpenRequest struct + Parameters json.RawMessage + type OpenResponse struct + ID string + type Options struct + Capacity int + MaxAge time.Duration + Open func(context.Context, plugin.Request, json.RawMessage) (Reader, error) + Scope func(context.Context, plugin.Request) (string, error) + type ReadRequest struct + ID string + Limit int + Sequence uint64 + type Reader interface + Close func() error + Read func(context.Context, int) ([]json.RawMessage, bool, error) + type Service struct + func New(opts Options) (*Service, error) + func (s *Service) Close() error + func (s *Service) Register(r *author.Registry) error