rtv

package
v0.0.0-...-57974ef Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2022 License: Apache-2.0 Imports: 8 Imported by: 9

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RTVCache

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

func New

func New() (*RTVCache, error)

New returns a new cache for storing AMP runtime values, or an error if there was a problem initializing. To have it auto-refresh, call StartCron().

func (*RTVCache) GetCSS

func (r *RTVCache) GetCSS() string

GetCSS returns the cached value for the inline CSS.

func (*RTVCache) GetRTV

func (r *RTVCache) GetRTV() string

GetRTV returns the cached value for the runtime version.

func (*RTVCache) StartCron

func (r *RTVCache) StartCron()

StartCron starts a cron job to re-fill the RTVCache hourly.

func (*RTVCache) StopCron

func (r *RTVCache) StopCron()

StopCron stops the cron job.

Jump to

Keyboard shortcuts

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