online

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2022 License: Apache-2.0 Imports: 5 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateTableOpt added in v0.1.0

type CreateTableOpt struct {
	EntityName string
	TableName  string
	Features   types.FeatureList
}

type GetOpt

type GetOpt struct {
	EntityKey string
	Group     types.Group
	Features  types.FeatureList

	// Only works when get batch features, it should be nil when get stream features
	RevisionID *int
}

func (*GetOpt) Validate added in v0.1.0

func (g *GetOpt) Validate() error

type ImportOpt

type ImportOpt struct {
	Group        types.Group
	Features     types.FeatureList
	ExportStream <-chan types.ExportRecord
	RevisionID   *int
}

type MultiGetOpt

type MultiGetOpt struct {
	EntityKeys []string
	Group      types.Group
	Features   types.FeatureList

	// Only works when get batch features, it should be nil when get stream features
	RevisionID *int
}

func (*MultiGetOpt) Validate added in v0.1.0

func (m *MultiGetOpt) Validate() error

type PushOpt added in v0.0.4

type PushOpt struct {
	EntityName    string
	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
	CreateTable(ctx context.Context, opt CreateTableOpt) error

	// Import batch / streaming features 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

	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