apistore

package
v0.2024.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 14, 2024 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

type Store struct {
	// contains filtered or unexported fields
}

Store implements history.Store backed by a gen.HistoryAdminApiClient. As a quirk of how the api works, it's more efficient to call Read then Len, than Len then Read.

func New

func New(client gen.HistoryAdminApiClient, name, source string) *Store

New creates a new history.Store backed by the given client and name. All records created or read by this store will have the given source.

func (*Store) Append

func (s *Store) Append(ctx context.Context, payload []byte) (history.Record, error)

func (*Store) Len

func (s *Store) Len(ctx context.Context) (int, error)

func (*Store) Read

func (s *Store) Read(ctx context.Context, into []history.Record) (int, error)

func (*Store) Slice

func (s *Store) Slice(from, to history.Record) history.Slice

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL