engine

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2018 License: AGPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSession added in v0.4.0

func NewSession(assetCache *AssetCache, assetServer AssetServer) flows.Session

NewSession creates a new session

func NewSessionAssets added in v0.4.0

func NewSessionAssets(cache *AssetCache, server AssetServer) flows.SessionAssets

NewSessionAssets creates a new session assets instance with the provided base URLs

func ReadSession added in v0.4.0

func ReadSession(assetCache *AssetCache, assetServer AssetServer, data json.RawMessage) (flows.Session, error)

ReadSession decodes a session from the passed in JSON

Types

type AssetCache added in v0.4.0

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

AssetCache fetches and caches assets for the engine

func NewAssetCache added in v0.4.0

func NewAssetCache(maxSize int64, pruneItems int, fetchUserAgent string) *AssetCache

NewAssetCache creates a new asset cache

func (*AssetCache) Include added in v0.4.0

func (c *AssetCache) Include(data json.RawMessage) error

Include loads assets from the given raw JSON into the cache

func (*AssetCache) Shutdown added in v0.4.0

func (c *AssetCache) Shutdown()

Shutdown shuts down this asset cache

type AssetServer added in v0.4.0

type AssetServer interface {
	// contains filtered or unexported methods
}

AssetServer describes the asset server we'll fetch missing assets from

func NewAssetServer added in v0.4.0

func NewAssetServer(authToken string, typeURLs map[assetType]string) AssetServer

NewAssetServer creates a new asset server

func NewMockAssetServer added in v0.4.0

func NewMockAssetServer() AssetServer

NewMockAssetServer creates a new mocked asset server for testing

func ReadAssetServer added in v0.4.0

func ReadAssetServer(authToken string, data json.RawMessage) (AssetServer, error)

ReadAssetServer reads an asset server fronm the given JSON

Jump to

Keyboard shortcuts

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