fetchmgr

package
v0.0.0-...-4f10b81 Latest Latest
Warning

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

Go to latest
Published: May 10, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FetchFn

type FetchFn func(db *gorm.DB, gtRevision uint64) (ResourceList, error)

One of these exists off of the top-level API object.`

func (FetchFn) Close

func (f FetchFn) Close()

func (FetchFn) Fetch

func (f FetchFn) Fetch(db *gorm.DB, gtRevision uint64) (ResourceList, error)

type FetchManager

type FetchManager interface {
	Open(key string, cacheSize int, fetchFn FetchFn) Fetcher
}

One of these exists off of the top-level API object.

type Fetcher

type Fetcher interface {
	Fetch(db *gorm.DB, gtRevision uint64) (ResourceList, error)
	Close()
}

type ResourceItem

type ResourceItem struct {
	Item      any            `json:"item,omitempty"`
	Id        string         `json:"id,omitempty"`
	Revision  uint64         `json:"revision,omitempty"`
	DeletedAt gorm.DeletedAt `json:"deleted_at"`
}

type ResourceItemList

type ResourceItemList []ResourceItem

func (ResourceItemList) Item

func (ResourceItemList) Len

func (l ResourceItemList) Len() int

type ResourceList

type ResourceList interface {
	Len() int
	Item(i int) (any, string, uint64, gorm.DeletedAt)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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