service

package
v0.0.0-...-b1d25d0 Latest Latest
Warning

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

Go to latest
Published: May 10, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type REST

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

func NewREST

func NewREST(s Storage, address string, timeout time.Duration) *REST

func (REST) Start

func (r REST) Start(context.Context) error

func (REST) Stop

func (r REST) Stop() error

type Storage

type Storage interface {
	Start(context.Context) error
	Stop() error

	WriteOne(b bucket.Bucket, e log.Entry) (map[string]any, error)
	WriteBatch(b bucket.Bucket, e []log.Entry) (map[string]any, error)

	All(b bucket.Bucket) ([]log.Entry, error)
	Last(b bucket.Bucket, n uint64) ([]log.Entry, error)
	Count(b bucket.Bucket) (uint64, error)
}

Jump to

Keyboard shortcuts

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