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

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