fibonacci

package
v0.0.0-...-93fe3f0 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Fibonacci

type Fibonacci interface {
	GetFib(n int) (result string, err error)
	GetCacheSize() (size int, err error)
	GetCacheSizeLT(end int) (size int, err error)
	ClearCache() error
}

func New

func New(db *sql.DB, initFilePath string) (fib Fibonacci, err error)

type PgFib

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

func (*PgFib) ClearCache

func (f *PgFib) ClearCache() error

func (*PgFib) GetCacheSize

func (f *PgFib) GetCacheSize() (size int, err error)

func (*PgFib) GetCacheSizeLT

func (f *PgFib) GetCacheSizeLT(end int) (size int, err error)

Returns the number of cache entries in the exclusive range from 0 to `end`

func (*PgFib) GetFib

func (f *PgFib) GetFib(n int) (result string, err error)

Jump to

Keyboard shortcuts

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