meta

package
v0.5.4 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	COLLABORATIVE_FILTERING_MODEL = "COLLABORATIVE_FILTERING_MODEL"
	CLICK_THROUGH_RATE_MODEL      = "CLICK_THROUGH_RATE_MODEL"
	RECOMMEND_CONFIG              = "RECOMMEND_CONFIG"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Database

type Database interface {
	Close() error
	Init() error
	UpdateNode(node *Node) error
	ListNodes() ([]*Node, error)
	Put(key, value string) error
	Get(key string) (*string, error)
	Delete(key string) error
}

func Open

func Open(path string, ttl time.Duration) (Database, error)

Open a connection to a database.

type Model

type Model[T any] struct {
	ID     int64
	Type   string
	Params model.Params
	Score  T
}

func (*Model[T]) Equal

func (m *Model[T]) Equal(other Model[T]) bool

Equal checks if two models have the same type and parameters.

func (*Model[T]) FromJSON

func (m *Model[T]) FromJSON(data string) error

func (*Model[T]) ToJSON

func (m *Model[T]) ToJSON() string

type Node

type Node struct {
	UUID       string
	Hostname   string
	Type       string
	Version    string
	UpdateTime time.Time
}

type SQLite

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

func (*SQLite) Close

func (s *SQLite) Close() error

func (*SQLite) Delete added in v0.5.3

func (s *SQLite) Delete(key string) error

func (*SQLite) Get

func (s *SQLite) Get(key string) (*string, error)

func (*SQLite) Init

func (s *SQLite) Init() error

func (*SQLite) ListNodes

func (s *SQLite) ListNodes() ([]*Node, error)

func (*SQLite) Put

func (s *SQLite) Put(key, value string) error

func (*SQLite) UpdateNode

func (s *SQLite) UpdateNode(node *Node) error

Jump to

Keyboard shortcuts

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