registry

package
v0.21.3 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2022 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var REGISTRY_SCHEMA_VERSION string = "1"
View Source
var REGISTRY_STORE_CLASS_FOR_SCHEME map[string]string = map[string]string{
	"gs":   "GCSRegistryStore",
	"s3":   "S3RegistryStore",
	"file": "LocalRegistryStore",
	"":     "LocalRegistryStore",
}

Functions

This section is empty.

Types

type LocalRegistryStore

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

A LocalRegistryStore is a file-based implementation of the RegistryStore interface.

func NewLocalRegistryStore

func NewLocalRegistryStore(config *RegistryConfig, repoPath string) *LocalRegistryStore

NewLocalRegistryStore creates a LocalRegistryStore with the given configuration and infers the file path from the repo path and registry path.

func (*LocalRegistryStore) GetRegistryProto

func (r *LocalRegistryStore) GetRegistryProto() (*core.Registry, error)

GetRegistryProto reads and parses the registry proto from the file path.

func (*LocalRegistryStore) Teardown

func (r *LocalRegistryStore) Teardown() error

func (*LocalRegistryStore) UpdateRegistryProto

func (r *LocalRegistryStore) UpdateRegistryProto(rp *core.Registry) error

type Registry

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

func NewRegistry

func NewRegistry(registryConfig *RegistryConfig, repoPath string) (*Registry, error)

func (*Registry) GetEntity

func (r *Registry) GetEntity(project, entityName string) (*model.Entity, error)

func (*Registry) GetFeatureService

func (r *Registry) GetFeatureService(project, featureServiceName string) (*model.FeatureService, error)

func (*Registry) GetFeatureView

func (r *Registry) GetFeatureView(project, featureViewName string) (*model.FeatureView, error)

func (*Registry) GetOnDemandFeatureView

func (r *Registry) GetOnDemandFeatureView(project, onDemandFeatureViewName string) (*model.OnDemandFeatureView, error)

func (*Registry) InitializeRegistry

func (r *Registry) InitializeRegistry()

func (*Registry) ListEntities

func (r *Registry) ListEntities(project string) ([]*model.Entity, error)

func (*Registry) ListFeatureServices

func (r *Registry) ListFeatureServices(project string) ([]*model.FeatureService, error)

func (*Registry) ListFeatureViews

func (r *Registry) ListFeatureViews(project string) ([]*model.FeatureView, error)

func (*Registry) ListOnDemandFeatureViews

func (r *Registry) ListOnDemandFeatureViews(project string) ([]*model.OnDemandFeatureView, error)

type RegistryConfig

type RegistryConfig struct {
	RegistryStoreType string `json:"registry_store_type"`
	Path              string `json:"path"`
	CacheTtlSeconds   int64  `json:"cache_ttl_seconds" default:"600"`
}

type RegistryStore

type RegistryStore interface {
	GetRegistryProto() (*core.Registry, error)
	UpdateRegistryProto(*core.Registry) error
	Teardown() error
}

A RegistryStore is a storage backend for the Feast registry.

type RepoConfig

type RepoConfig struct {
	// Feast project name
	Project string `json:"project"`
	// Feast provider name
	Provider string `json:"provider"`
	// Path to the registry. Custom registry loaders are not yet supported
	// Registry string `json:"registry"`
	Registry interface{} `json:"registry"`
	// Online store config
	OnlineStore map[string]interface{} `json:"online_store"`
	// Offline store config
	OfflineStore map[string]interface{} `json:"offline_store"`
	// Feature server config (currently unrelated to Go server)
	FeatureServer map[string]interface{} `json:"feature_server"`
	// Feature flags for experimental features
	Flags map[string]interface{} `json:"flags"`
	// RepoPath
	RepoPath string `json:"repo_path"`
}

func NewRepoConfigFromFile

func NewRepoConfigFromFile(repoPath string) (*RepoConfig, error)

NewRepoConfigFromFile reads the `feature_store.yaml` file in the repo path and converts it into a RepoConfig struct.

func NewRepoConfigFromJSON

func NewRepoConfigFromJSON(repoPath, configJSON string) (*RepoConfig, error)

NewRepoConfigFromJSON converts a JSON string into a RepoConfig struct and also sets the repo path.

func (*RepoConfig) GetRegistryConfig

func (r *RepoConfig) GetRegistryConfig() *RegistryConfig

Jump to

Keyboard shortcuts

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