online

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GetOpt

type GetOpt struct {
	Entity     *types.Entity
	EntityKey  string
	RevisionID *int
	Group      *types.Group
	Features   types.FeatureList
}

type ImportOpt

type ImportOpt struct {
	Revision     *types.Revision
	Entity       *types.Entity
	ExportStream <-chan types.ExportRecord
	ExportError  <-chan error
	Features     types.FeatureList
}

type MultiGetOpt

type MultiGetOpt struct {
	Entity     *types.Entity
	EntityKeys []string
	RevisionID *int
	Group      *types.Group
	Features   types.FeatureList
}

type PrepareStreamTableOpt added in v0.0.4

type PrepareStreamTableOpt struct {
	Entity *types.Entity

	GroupID int

	// Feature is not nil to add a new row to the stream table;
	// otherwise it means the stream table will be created.
	Feature *types.Feature
}

type PushOpt added in v0.0.4

type PushOpt struct {
	Entity        *types.Entity
	EntityKey     string
	GroupID       int
	Features      types.FeatureList
	FeatureValues []interface{}
}

type Store

type Store interface {
	Get(ctx context.Context, opt GetOpt) (dbutil.RowMap, error)
	MultiGet(ctx context.Context, opt MultiGetOpt) (map[string]dbutil.RowMap, error)
	Purge(ctx context.Context, revisionID int) error

	// Batch import batch feature to online store
	Import(ctx context.Context, opt ImportOpt) error

	// Push streaming feature to online store
	// Note: Make sure that the table corresponding to the stream feature already exists before executing this method
	Push(ctx context.Context, opt PushOpt) error

	PrepareStreamTable(ctx context.Context, opt PrepareStreamTableOpt) error

	Ping(ctx context.Context) error
	io.Closer
}

Directories

Path Synopsis
Package mock_online is a generated GoMock package.
Package mock_online is a generated GoMock package.

Jump to

Keyboard shortcuts

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