store

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Put

func Put(ctx context.Context, bs *BlockStore)

Put release BlockStore.

Types

type Allocator

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

func NewAllocator

func NewAllocator() *Allocator

func (*Allocator) Get

func (a *Allocator) Get(ctx context.Context, endpoint string) (*BlockStore, error)

Get acquire BlockStore.

func (*Allocator) Put

func (a *Allocator) Put(ctx context.Context, bs *BlockStore)

Put release BlockStore.

type BlockStore

type BlockStore struct {
	primitive.RefCount
	// contains filtered or unexported fields
}

func Get

func Get(ctx context.Context, endpoint string) (*BlockStore, error)

Get acquire BlockStore.

func (*BlockStore) Append

func (s *BlockStore) Append(ctx context.Context, block uint64, events *cloudevents.CloudEventBatch) ([]int64, error)

func (*BlockStore) Close

func (s *BlockStore) Close()

func (*BlockStore) Describe

func (s *BlockStore) Describe(ctx context.Context, block uint64) (*metapb.SegmentHealthInfo, error)

func (*BlockStore) Endpoint

func (s *BlockStore) Endpoint() string

func (*BlockStore) LookupOffset

func (s *BlockStore) LookupOffset(ctx context.Context, blockID uint64, t time.Time) (int64, error)

func (*BlockStore) Read

func (s *BlockStore) Read(
	ctx context.Context, block uint64, offset int64, size int16, pollingTimeout uint32,
) (*cloudevents.CloudEventBatch, error)

Jump to

Keyboard shortcuts

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