partition

package
v0.0.0-...-52cadad Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ParallelPartitionLister

type ParallelPartitionLister struct {
	Lister      PartitionLister
	Concurrency int64
	Partitions  []Partition
	// contains filtered or unexported fields
}

func (*ParallelPartitionLister) Continue

func (p *ParallelPartitionLister) Continue() string

func (*ParallelPartitionLister) Err

func (p *ParallelPartitionLister) Err() error

func (*ParallelPartitionLister) List

func (p *ParallelPartitionLister) List(ctx context.Context, limit int, resume string) (<-chan []types.APIObject, error)

func (*ParallelPartitionLister) Revision

func (p *ParallelPartitionLister) Revision() string

type Partition

type Partition interface {
	Name() string
}

type PartitionLister

type PartitionLister func(ctx context.Context, partition Partition, cont string, revision string, limit int) (types.APIObjectList, error)

type Partitioner

type Partitioner interface {
	Lookup(apiOp *types2.APIRequest, schema *types2.APISchema, verb, id string) (Partition, error)
	All(apiOp *types2.APIRequest, schema *types2.APISchema, verb, id string) ([]Partition, error)
	Store(apiOp *types2.APIRequest, partition Partition) (types2.Store, error)
}

type Store

type Store struct {
	Partitioner Partitioner
}

func (*Store) ByID

func (s *Store) ByID(apiOp *types2.APIRequest, schema *types2.APISchema, id string) (types2.APIObject, error)

func (*Store) Create

func (s *Store) Create(apiOp *types2.APIRequest, schema *types2.APISchema, data types2.APIObject) (types2.APIObject, error)

func (*Store) Delete

func (s *Store) Delete(apiOp *types2.APIRequest, schema *types2.APISchema, id string) (types2.APIObject, error)

func (*Store) List

func (s *Store) List(apiOp *types2.APIRequest, schema *types2.APISchema) (types2.APIObjectList, error)

func (*Store) Update

func (s *Store) Update(apiOp *types2.APIRequest, schema *types2.APISchema, data types2.APIObject, id string) (types2.APIObject, error)

func (*Store) Watch

func (s *Store) Watch(apiOp *types2.APIRequest, schema *types2.APISchema, wr types2.WatchRequest) (chan types2.APIEvent, error)

Jump to

Keyboard shortcuts

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